N=int (input()) A=[[int (i) for i in input ().split()]for i in range (N)] nd=0 A[0][1]=A[0][1]*4 A[0][0]+=A[0][1] M=A[0][0] i=1 while nd==0 and i