a,b,c = map(int,input().split('.')) x,y,z = map(int,input().split('.')) flg = False if a