import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
double[] a = new double[n];
int[] t = new int[n];
int max = 0;
for (int i = 0; i <n ; i++) {
a[i] =sc.nextDouble();
t[i] =sc.nextInt();
if(a[i]*t[i]>max)
max = (int)a[i]*t[i];
}
boolean[] light = new boolean[max+1];
for (int i = 0; i <a.length ; i++) {
for (int j =t[i]; j >=1 ; j--) {
light[(int)(a[i]*j)] = !light[(int)(a[i]*j)];
}
}
for (int i = 0; i <light.length ; i++) {
if(light[i]==true)
System.out.println(i);
}
}
}