from scipy.spatial import ConvexHull, qhull P = [tuple(map(int, input().split())) for _ in range(5)] try: x = ConvexHull(P,qhull_options='QR0').simplices print('YES' if len(x) == 5 else 'NO') except qhull.QhullError: print('NO')