XY = [list(map(int, input().split())) for _ in range(5)] LS = [[0, 1, 2, 3], [0, 1, 2, 4], [0, 2, 3, 1], [0, 2, 3, 4], [0, 2, 4, 1], [0, 2, 4, 3], [0, 1, 3, 2], [0, 1, 3, 4], [0, 1, 4, 2], [0, 1, 4, 3], [0, 2, 4, 1], [0, 2, 4, 3], [1, 2, 3, 0], [1, 2, 3, 4], [1, 2, 4, 0], [1, 2, 4, 3], [1, 3, 4, 0], [1, 3, 4, 2], [2, 3, 4, 0], [2, 3, 4, 1]] for L in LS: x0, y0 = XY[L[0]] x1, y1 = XY[L[1]] x2, y2 = XY[L[2]] x3, y3 = XY[L[3]] V1 = [[] for _ in range(3)] V2 = [[] for _ in range(3)] for i in range(3): for j in range(2): V1[i].append(XY[L[(i+1)%3]][j]-XY[L[i]][j]) V2[i].append(XY[L[3]][j]-XY[L[i]][j]) tmp = 0 for i in range(3): tmp += abs(V1[i][0] * V2[i][1] - V1[i][1] * V2[i][0]) tmp -= abs(V1[1][0] * V1[0][1] - V1[1][1] * V1[0][0]) if tmp == 0: print("NO") exit() print("YES")