a, b = sorted(list(map(int, input().split()))), sorted(list(map(int, input().split())))
print("Yes" if a[0] < b[1] and a[1] < b[2] else "No")