coor=[]
u=[]
for i in range(4):
  x1,y1,x2,y2=map(int,input().split())
  coor.append((x1,y1))
  coor.append((x2,y2))
  u.append([x2-x1,y2-y1])
coor=list(set(coor))
if len(coor)!=4:
  print("NO")
else:
  temp=[]
  for i in range(3,-1,-1):
    temp.append(u[i][0]*u[i-1][0]+u[i][1]*u[i-1][1])
  if sum(temp)==0:
    print("YES")
  else:
    print("NO")