from itertools import combinations as comb def cross_p(p1,p2): return p1[0]*p2[1]-p1[1]*p2[0] def vec_s(p1,p2): return (p1[0]-p2[0],p1[1]-p2[1]) def check(c): for i in range(5): if i in c: continue d = [cross_p(vec_s(p[c[(j+1)%3]],p[c[j]]),vec_s(p[i],p[c[(j+1)%3]])) for j in range(3)] if (d[0] >= 0 and d[1] >= 0 and d[2] >= 0) or (d[0] <= 0 and d[1] <= 0 and d[2] <= 0): return True return False p = [map(int,raw_input().split()) for i in range(5)] for c in comb(range(5),3): if check(c): print "NO" break else: print "YES"