# -*- coding: utf-8 -*- import math def sita(X1, Y1): if X1 == 0 and Y1 == 0: return 0 else: R = (X1 ** 2 + Y1 ** 2) ** 0.5 if Y1 > 0: S = math.acos(X1 / R) elif Y1 < 0: S = 2 * math.pi - math.acos(X1 / R) elif Y1 == 0 and X1 > 0: S = 0.0 elif Y1 == 0 and X1 < 0: S = math.pi return S def ch2(X1, Y1, X2, Y2, X3, Y3): vec1 = [X2 - X1, Y2 - Y1] vec2 = [X3 - X1, Y3 - Y1] rot = vec1[0] * vec2[1] - vec1[1] * vec2[0] if rot < 0: return 1 else: return 0 X = [0.0] * 5 Y = [0.0] * 5 S = [0.0] * 5 sX = [0.0] * 7 sY = [0.0] * 7 sS = [0.0] * 5 for i in range(0, 5): X[i], Y[i] = map(int, raw_input().split()) cntX = sum(X)/5.0 cntY = sum(Y)/5.0 for i in range(0, 5): X[i] -= cntX Y[i] -= cntY S[i] = sita(X[i], Y[i]) sS = sorted(S) for i in range(0, 5): for j in range(0, 5): if S[i] == sS[j]: sX[j] = X[i] sY[j] = Y[i] for i in range(0, 4): if sS[i] == sS[i+1]: print "NO" exit() sX[5] = sX[0] sY[5] = sY[0] sX[6] = sX[1] sY[6] = sY[1] point = 0 for i in range(0, 5): point += ch(sX[i], sY[i], sX[i+2], sY[i+2], sX[i+1], sY[i+1]) if point == 5: print "YES" else: print "NO"