x,y=map(int,raw_input().split()) x2,y2=map(int,raw_input().split()) ans=max(x,y) if x==y and x2==y2 and x2