a = list(map(int, input().split()))
b = sorted(a)
if a[2] == b[1]:
  print("Yes")
else:
  print("No")
f25741a55608d61a16ec2c4895b52d38dc663cc7
<mask token>

<mask token>
if a[2] == b[1]:
    print('Yes')
else:
    print('No')

a = list(map(int, input().split()))
b = sorted(a)
if a[2] == b[1]:
    print('Yes')
else:
    print('No')

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