EPS/29-01-24/king_escape2.py
2024-01-30 15:04:05 +01:00

16 lines
406 B
Python

def main():
n = int(input())
ax, ay = [int(i) for i in input().split()] # queen
bx, by = [int(i) for i in input().split()] # king
cx, cy = [int(i) for i in input().split()] # dest
if (bx > ax and ax > cx) or (cx > ax and ax > bx):
print("NO")
return
if (by > ay and ay > cy) or (cy > ay and ay > by):
print("NO")
return
print("YES")
main()