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 ((a[1] - a[0]) * (a[1] - a[2]) > 0 and a[0] != a[2] and (b[1] - b[0]) * (b[1] - b[2]) > 0 and b[0] != b[2]): print("Yes") break a[i], b[j] = b[j], a[i] else: continue break else: print("No")