a = list(map(int,input().split()))
b = list(map(int,input().split()))
if (a[0]a[1]>a[2] and b[0]>b[1]>b[2]):
print("Yes")
else:
for i in range(3):
for j in range(3):
a[i], b[j] = b[j], a[i]
if (a[0]a[1]>a[2] and b[0]>b[1]>b[2]):
print("Yes")
exit()
a[i], b[j] = b[j], a[i]
print("No")