a = list(map(int, input().split())) b = list(map(int, input().split())) for i in range(3): for j in range(3): na=a[:] nb=b[:] na[i], nb[j] = nb[j], na[i] if na[0]==na[2]: continue if nb[0]==nb[2]: continue if (na[0]na[2]) or (na[0]>na[1] and na[1]nb[2]) or (nb[0]>nb[1] and nb[1]