num = int(input())fac = []for i in range(num): fac.append(list(map(int,input().split())))
fac2 = [] for i in fac: fac2.append((i[0]**2)+(i[1]**2) )
fac3 = sorted(fac2) x = fac2.index(fac3[-2])print(*fac[x])