#!/usr/bin/env python import numpy as np A = np.array([int(x) for x in input().split()]) B = np.array([int(x) for x in input().split()]) C = np.array([int(x) for x in input().split()]) D = np.array([int(x) for x in input().split()]) AB = B-A AC = C-A AD = D-A Z = np.cross(AB, AC) M = np.matrix([AB, AC, Z]).I Co = AD * M if Co[0, 0] <= 1 and Co[0, 1] <= 1: print('YES') else: print('NO')