from decimal import Decimal,ROUND_HALF_UP import itertools import math from dataclasses import dataclass @dataclass class Point: x: int y: int def length(P,Q): return math.sqrt(abs(P.x-Q.x)**2+abs(P.y-Q.y)**2) P=[] P.append(Point(*map(int,input().split()))) P.append(Point(*map(int,input().split()))) P.append(Point(*map(int,input().split()))) P.append(Point(*map(int,input().split()))) for a,b,c,d in itertools.permutations(range(4)): if (P[a].y-P[c].y)*(P[b].x-P[a].x)==(P[b].y-P[a].y)*(P[a].x-P[c].x) or \ (P[a].y-P[c].y)*(P[d].x-P[a].x)==(P[d].y-P[a].y)*(P[a].x-P[c].x): # 4点が同一直線上にある場合は同一円周上にない continue # トレミーの定理 l=Decimal(length(P[a],P[c])*length(P[b],P[d])).quantize(Decimal("0.000001"),rounding=ROUND_HALF_UP) r=Decimal(length(P[a],P[d])*length(P[b],P[c])+length(P[a],P[b])*length(P[d],P[c])).quantize(Decimal("0.000001"),rounding=ROUND_HALF_UP) if l==r: exit(print("YES")) print("NO")