<filename>problemsets/Codeforces/Python/A1033.py
"""
 *
 * Author:  <NAME>(coderemite)
 * Email: <EMAIL>
 *
 """
I=lambda:map(int,input().split())
input()
a,b=I()
c,d=I()
e,f=I()
print('YNEOS'[(c-a)*(e-a)<0 or (d-b)*(f-b)<0::2])
<filename>problemsets/Codeforces/Python/A1033.py
"""
 *
 * Author:  <NAME>(coderemite)
 * Email: <EMAIL>
 *
 """
I=lambda:map(int,input().split())
input()
a,b=I()
c,d=I()
e,f=I()
print('YNEOS'[(c-a)*(e-a)<0 or (d-b)*(f-b)<0::2])
*  * Author:  <NAME>(coderemite)  * Email: <EMAIL>  *