a = list(map(int, input().split())) b = list(map(int, input().split())) def check(): for c in a, b: if not (c[1] < min(c[0], c[2]) or c[1] > max(c[0], c[2])): return False return True for i in range(3): for j in range(3): a[i], b[j] = b[j], a[i] if check(): print('Yes') exit() a[i], b[j] = b[j], a[i] print('No') exit()