https://www.acmicpc.net/problem/3009
x1,y1=map(int,input().split())
x=0
y=0
cx=0
cy=0
for i in range(2):
x2,y2=map(int,input().split())
if x1==x2: cx+=1
else: x=x2
if y1==y2: cy+=1
else: y=y2
print("%d %d"%(x if cx==1 else x1,y if cy==1 else y1))