import sys import math as mas X,Y=map(int,input().split()) x,y=map(int,input().split()) t=max(X,Y) if X==Y and x==y and x