import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np data = np.array(read().split(), np.int64) A,B,C,D = [data[3*i:3*i+3] for i in range(4)] def test(A,B,C,D): v = np.cross(B-A, C-A) n = np.cross(B-A, v) return np.sign(np.dot(n,C-A)) == np.sign(np.dot(n,D-A)) bl = True for _ in range(3): A,B,C = B,C,A bl &= test(A,B,C,D) answer = 'YES' if bl else 'NO' print(answer)