ax,ay=map(int, input().split()) bx,by=map(int, input().split()) cx,cy=map(int, input().split()) dx,dy=map(int, input().split()) def c(x1, y1, x2, y2, x3, y3): """ 3点を通る円の中心と半径を取得 """ d = 2 * ((y1 - y3) * (x1 - x2) - (y1 - y2) * (x1 - x3)) if d==0: return 0,0,-1 x = ((y1 - y3) * (y1 ** 2 - y2 ** 2 + x1 ** 2 - x2 ** 2) - (y1 - y2) * (y1 ** 2 - y3 ** 2 + x1 ** 2 - x3 ** 2)) / d y = ((x1 - x3) * (x1 ** 2 - x2 ** 2 + y1 ** 2 - y2 ** 2) - (x1 - x2) * (x1 ** 2 - x3 ** 2 + y1 ** 2 - y3 ** 2)) / -d r=((x - x1) ** 2 + (y - y1) ** 2) return x,y,r x,y,r=c(ax,ay,bx,by,cx,cy) if r==-1: print('NO') exit() if (x-dx)**2+(y-dy)**2==r: print('YES') else: print('NO')