#!/usr/bin/env python3 import itertools cross = lambda a, b: (a.conjugate() * b).imag ccw = lambda a, b, c: cross(b - a, c - a) ps = [ complex(*[ int(it) for it in input().split() ]) for _ in range(5) ] ans = False for ps in itertools.permutations(ps): for i in range(5): f = lambda *args: ccw(*[ ps[(i+j)%5] for j in args ]) if not (f(0, 1, 2) < 0 and f(0, 1, 3) > 0 and f(0, 1, 4) < 0): break else: ans = True print(['NO','YES'][ans])