1 #include<iostream>
2 #include<cstdio>
3 #include<cstring>
4 using namespace std;
5 int ans[100001];
6 int main()
7 {
8 int n;
9 scanf("%d",&n);
10 int maxn=-1;
11 int bh;
12 for(int i=1;i<=n;i++)
13 {
14 int a,b;
15 scanf("%d%d",&a,&b);
16 ans[i]=a*b;
17 if(ans[i]>=maxn)
18 {
19 maxn=ans[i];
20 bh=i;
21 }
22 }
23 for(int i=1;i<=n;i++)
24 {
25 printf("%d\n",ans[i]);
26 }
27 printf("%d",bh);
28 return 0;
29 }