def is_kadomatsu(a, b, c):
    if a != b != c and a != c and (a < b > c or a > b < c):
        return True
    else:
        return False

a = list(map(int, input().split()))
b = list(map(int, input().split()))
for i in range(3):
    for j in range(3):
        a[i], b[j] = b[j], a[i]
        if is_kadomatsu(*a) and is_kadomatsu(*b):
            print('Yes')
            exit(0)
        a[i], b[j] = b[j], a[i]
print('No')