Arpa is taking a geometry exam. Here is the last problem of the exam.You are given three points a, b, c.Find a point and an angle such that if we rotate the page around the point by the angle, the new position of a is the same as the old position of b, and the new position of b is the same as the old position of c.Arpa is doubting if the problem has a solution or not (i.e. if there exists a point and an angle satisfying the condition). Help Arpa determine if the question has a solution or not.

The only line contains six integers ax, ay, bx, by, cx, cy (|ax|, |ay|, |bx|, |by|, |cx|, |cy| ≤ 109). It's guaranteed that the points are distinct.

Print "Yes" if the problem has a solution, "No" otherwise. You can print each letter in any case (upper or lower).

NoteIn the first sample test, rotate the page around (0.5, 0.5) by .In the second sample test, you can't find any solution.

from __future__ import division
from sys import stdin
from math import sqrt

def slop(a):
    try:
        return (a[0] - a[2]) / (a[1] - a[3])
    except:
        return float('inf')

rints = lambda: [int(x) for x in stdin.readline().split()]
euclidean = lambda x1, x2, y1, y2: pow(x1 - x2, 2) + pow(y1 - y2, 2)

ax, ay, bx, by, cx, cy = rints()
d1, d2 = euclidean(ax, bx, ay, by), euclidean(bx, cx, by, cy)
s1, s2 = slop([ax, ay, bx, by]), slop([bx, by, cx, cy])

# print(s1, s2, d1, d2)
if s1 == s2 or d1 != d2:
    print('no')
else:
    print('yes')

def main():
    ax, ay, bx, by, cx, cy = tuple(map(int, input().split()))
    ab = (ax - bx)**2 + (ay - by)**2
    bc = (bx - cx)**2 + (by - cy)**2

    one_line = (bx - ax) * (cy - ay) == (by - ay) * (cx - ax)

    if ab == bc and not one_line:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

ax,ay,bx,by,cx,cy=list(map(int,input().split()))
ax-=bx
ay-=by
cx-=bx
cy-=by
print('No'if ax*cy-ay*cx==0 or ax**2+ay**2!=cx**2+cy**2 else'Yes')

def helper():
	ax, ay, bx, by, cx, cy = map(int, raw_input().split())
	if abs(cal(ax, ay, bx, by) - cal(bx, by, cx, cy)) < 1e-5:
		if (ax == bx and bx == cx) or (ay == by and by == cy) or cal_k(ax, ay, bx, by, cx, cy):
			return False
		# print cal(ax, ay, bx, by) - cal(bx, by, cx, cy)
		return True
	else:
		return False

def cal(x1, y1, x2, y2):
	return (x2 - x1)**2 + (y2 - y1)**2

def cal_k(x1, y1, x2, y2, x3, y3):
	if (x3 - x2) * (y2 - y1) == (y3 - y2) * (x2 - x1):
		return True
	else:
		return False

if helper():
	print "Yes"
else:
	print "No"

def get_len_sq(a, b):
    return (a[0] - b[0])**2 + (a[1] - b[1])**2

ax, ay, bx, by, cx, cy = map(int, input().split())
a = (ax, ay)
b = (bx, by)
c = (cx, cy)
f = get_len_sq
if f(a,b) == f(b,c):
    if a[0]+c[0] == 2*b[0] and a[1]+c[1] == 2*b[1]:
        print('No')
    else:
        print('Yes')
else:
    print('No')

ax, ay, bx, by, cx, cy = map(int, input().split())

if (ax - bx) * (cy - by) == (ay - by) * (cx - bx):
	print('No')
elif ((ax - bx) ** 2 + (ay - by) ** 2) == ((bx - cx) ** 2 + (by - cy) ** 2):
	print("Yes")
else:
	print("No")

ax,ay,bx,by,cx,cy=map(int,input().split())
area=ax*(by-cy)+bx*(cy-ay)+cx*(ay-by)
d1=(ax-bx)**2+(ay-by)**2
d2=(bx-cx)**2+(by-cy)**2
if area==0 or d1!=d2:
	print("no")
else:
	print("yes")

ax, ay, bx, by, cx, cy = map(int, raw_input().strip().split())
one = (ax-bx)**2 + (ay-by) ** 2
three = (bx-cx) ** 2 + (by-cy) ** 2
if bx == ax and cx == bx:
    print "No"

elif by == ay and cy == ay:
    print "No"

else:
    if bx - ax == 0:
        mba = -1
    else:
        mba = (by-ay)*(cx-bx)
    if cx-bx == 0:
        mcb = -1
    else:
        mcb = (cy-by)*(bx-ax)
    if one == three:
        if mba == mcb:
            print "No"
        else:
            print "Yes"
    else:
        print "No"

from math import sqrt
x1,y1,x2,y2,x3,y3=map(int,raw_input().split())
if (abs(y2-y1)**2+abs(x2-x1)**2==abs(y3-y2)**2+abs(x3-x2)**2) and (y1-y2)*(x1-x3)!=(x1-x2)*(y1-y3):
    print "Yes"
else:
    print "No"

ax,ay,bx,by,cx,cy=map(int,input().split())
if (ax-bx)**2+(ay-by)**2==(cx-bx)**2+(cy-by)**2 and ((ax+cx)/2!=bx or (ay+cy)/2!=by):print("Yes")
else:print("No")

ax, ay, bx, by, cx, cy = map(int, raw_input().split())
if ((ax - bx)**2 + (ay - by)**2 != (bx - cx)**2 + (by - cy)**2) or ((ax - bx) * (by - cy) == (bx - cx) * (ay - by)): print "No"
else: print "Yes"

import math
def slope(i,j):
    try:
        return float(j[1]-i[1])/float(j[0]-i[0])
    except:
        return -200
def len(i,j):
    return (j[1]-i[1])**2 +(i[0]-j[0])**2
ax,ay,bx,by,cx,cy=map(int,raw_input().split())
a=(ax,ay)
b=(bx,by)
c=(cx,cy)
if slope(a,b)==slope(b,c):
    print 'No'
else:
    x=len(a,b)
    y=len(b,c)
    z=len(c,a)

    if x==y:
        print 'Yes'
    else:
        print 'No'

def metrika(x1, y1, x2, y2):
    return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)

def povorot(x1, y1, x2, y2, x3, y3):
    if (y2 - y1) * (x3 - x2) != (y3 - y2) * (x2 - x1) and metrika(x1, y1, x2, y2) == metrika(x2, y2, x3, y3):
        return "Yes"
    return "No"

X1, Y1, X2, Y2, X3, Y3 = [int(i) for i in input().split()]
print(povorot(X1, Y1, X2, Y2, X3, Y3))

ax, ay, bx, by, cx, cy = map(int,raw_input().split())

if (ax - bx)*(ay - cy) == (ax - cx)*(ay - by):
    print 'No'
    exit(0)
if (bx-ax)*(bx-ax)+(by-ay)*(by-ay) == (cx-bx)*(cx-bx)+ (cy-by)*(cy-by):
    print 'Yes'
else:
    print 'No'

from sys import exit
from math import *

ax, ay, bx, by, cx, cy = map(int, input().split())

l1 = (bx - ax)**2 + (by - ay)**2
l2 = (cx - bx)**2 + (cy - by)**2
dx = bx - ax
dy = by - ay

if l1 != l2:
    print('No')
elif cx == bx + dx and cy == by + dy:
    print('No')
else:
    print('Yes')

def vector_product(v1x, v1y, v2x, v2y):
    return (v1x * v2y - v1y * v2x)

def len_sq(vx, vy):
    return (vx * vx + vy * vy)

ax, ay, bx, by, cx, cy = (int(x) for x in input().split())
abx = bx - ax
aby = by - ay
bcx = cx - bx
bcy = cy - by
if vector_product(abx, aby, bcx, bcy) == 0:
    print('No')
elif len_sq(abx, aby) != len_sq(bcx, bcy):
    print('No')
else:
    print('Yes')

ax, ay, bx, by, cx, cy = map(long, raw_input().split())
ab = ((ax-bx)**2+(ay-by)**2)
bc = ((bx-cx)**2+(by-cy)**2)
if ab==bc and (ay-by)*(cx-ax)+(bx-ax)*(cy-ay)!=0:
    print "Yes"
else:
    print "No"

''' ===============================
    -- @uthor : Kaleab Asfaw
    -- Handle : kaleabasfaw2010
    -- Bio    : High-School Student
    ==============================='''

# Fast IO
import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file): self._fd = file.fileno(); self.buffer = BytesIO(); self.writable = "x" in file.mode or "r" not in file.mode; self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b: break
            ptr = self.buffer.tell(); self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0; return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)); self.newlines = b.count(b"\n") + (not b); ptr = self.buffer.tell(); self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1; return self.buffer.readline()
    def flush(self):
        if self.writable: os.write(self._fd, self.buffer.getvalue()); self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file): self.buffer = FastIO(file); self.flush = self.buffer.flush; self.writable = self.buffer.writable; self.write = lambda s: self.buffer.write(s.encode("ascii")); self.read = lambda: self.buffer.read().decode("ascii"); self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout); input = lambda: sys.stdin.readline().rstrip("\r\n")
# Others
# from math import floor, ceil, gcd
# from decimal import Decimal as d
mod = 10**9+7
def lcm(x, y): return (x * y) / (gcd(x, y))
def fact(x, mod=mod):
    ans = 1
    for i in range(1, x+1): ans = (ans * i) % mod
    return ans
def arr2D(n, m, default=0): return [[default for j in range(m)] for i in range(n)]
def arr3D(n, m, r, default=0): return [[[default for k in range(r)] for j in range(m)] for i in range(n)]
def sortDictV(x): return {k: v for k, v in sorted(x.items(), key = lambda item : item[1])}
class DSU:
    def __init__(self, length): self.length = length; self.parent = [-1] * self.length  # O(log(n))
    def getParent(self, node, start):  # O(log(n))
        if node >= self.length: return False
        if self.parent[node] < 0:
            if start != node: self.parent[start] = node
            return node
        return self.getParent(self.parent[node], start)
    def union(self, node1, node2):  # O(log(n))
        parent1 = self.getParent(node1, node1); parent2 = self.getParent(node2, node2)
        if parent1 == parent2: return False
        elif self.parent[parent1] <= self.parent[parent2]: self.parent[parent1] += self.parent[parent2]; self.parent[parent2] = parent1
        else: self.parent[parent2] += self.parent[parent1]; self.parent[parent1] = parent2
        return True
    def getCount(self, node):  return -self.parent[self.getParent(node, node)] # O(log(n))

minInt  = 10**(-9)

def solve(lst):
    if lst[0] == lst[2] == lst[4]:
        return "No"
    a, b, c = [None] * 3
    if lst[0] - lst[2] != 0:
        a = (lst[1] - lst[3]) / (lst[0] - lst[2])
    if lst[2] - lst[4] != 0:
        b = (lst[3] - lst[5]) / (lst[2] - lst[4])
    if lst[0] - lst[4] != 0:
        c = (lst[1] - lst[5]) / (lst[0] - lst[4])

    if a == None or b == None or c == None:
        pass
    else:
        if abs(a-b) <= minInt and abs(b-c) <= minInt and abs(a-c) <= minInt:
            return "No"

    disAB = ((lst[0] - lst[2]) ** 2) + ((lst[1] - lst[3]) ** 2)
    disBC = ((lst[2] - lst[4]) ** 2) + ((lst[3] - lst[5]) ** 2)
    if disAB == disBC:
        return "Yes"
    return "No"

lst = list(map(int, input().split()))
print(solve(lst))

a,b,x,y,u,v=map(int,raw_input().split())
u-=x
v-=y
x-=a
y-=b
print ('No','Yes')[(u-x or v-y) and u*u+v*v==x*x+y*y]

from decimal import *
getcontext().prec=50

def is_midpoint(p1,p2,p3):
    if (p1[0]+p2[0])/2==p3[0] and (p1[1]+p2[1])/2==p3[1]:
        return True
    else:
        return False

def distance(p1,p2):
    return (((p2[0]-p1[0])**2)+((p2[1]-p1[1])**2))

def same_slope(p1,p2,p3):
    if is_midpoint(p1,p2,p3) or is_midpoint(p2,p1,p3) or is_midpoint(p1,p3,p2):
        return False
    elif distance(p1,p2)==distance(p2,p3):
        return True
    else:
        return False

a_x,a_y,b_x,b_y,c_x,c_y=map(int,input().split())
p1=[a_x,a_y]
p2=[b_x,b_y]
p3=[c_x,c_y]
if same_slope(p1,p2,p3):
    print("YES")
else:
    print("NO")

#coding:utf-8

def gg(ax,bx,ay,by):
    return (ax-bx)*(ax-bx)+(ay-by)*(ay-by);

ax,ay,bx,by,cx,cy = list(map(int,input().split()))
if gg(bx,ax,by,ay) == gg(bx,cx,by,cy) and gg(ax,cx,ay,cy) < 4 * gg(bx,cx,by,cy):
    print("Yes")
else:
    print("No")

a, b, c, d, e, f = map(int, input().split())
def r(a, b, c, d):
    return (a-c)**2 + (b-d)**2
print('No Yes'.split()[r(a, b, c, d) == r(c, d, e, f) and not (a-c)*(d-f) - (b-d)*(c-e) == 0])

ax, ay, bx, by, cx, cy = map(int, input().split())

def r(x1, y1, x2, y2):
    return (x1 - x2) ** 2 + (y1 - y2) ** 2

def line(x3, y3, x1, y1, x2, y2):
    if (x3 - x1) * (y2 - y1) == (y3 - y1) * (x2 - x1):
        return True
    return False

if r(ax, ay, bx, by) == r(bx, by, cx, cy) and not line(ax, ay, bx, by, cx, cy):
    print('Yes')
else:
    print('No')

from sys import stdin
input = lambda :stdin.readline().strip()

a1, a2, b1, b2, c1, c2 = map(int, input().split())
dist = lambda x1,y1,x2,y2: (x1-x2)**2 + (y1-y2)**2
print(["NO", "YES"][a1 * b2 + b1 * c2 + c1 * a2 - a2*b1 - b2*c1 - c2 *a1 != 0 and dist(a1,a2,b1,b2) == dist(b1,b2,c1,c2)])

ax,ay,bx,by,cx,cy=map(int,input().split(' '))
lab=(bx-ax)**2+(by-ay)**2
lbc=(cx-bx)**2+(cy-by)**2

def sol():
    if(lab!=lbc):
        print('No')
        return
    if(ax==bx and ax==cx):
        print('No')
        return
    if((bx-ax)*(cy-ay)==(cx-ax)*(by-ay)):
        print('No')
        return
    print('Yes')
    return
sol()

ax,ay,bx,by,cx,cy = [int(x) for x in input().strip().split()]
area = ax*(by-cy) + bx*(cy-ay) + cx*(ay-by)

def distsqr(x1,y1,x2,y2):
	return (x1-x2)**2 + (y1-y2)**2
C = distsqr(ax,ay,bx,by)
B = distsqr(ax,ay,cx,cy)
A = distsqr(bx,by,cx,cy)

if (A == C):
	if (area != 0):
		print("Yes")
		exit()
print("No")

ax, ay, bx, by, cx, cy = map(int, input().split())

if (ax - bx) * (cy - by) == (ay - by) * (cx - bx):
	print('No')
elif ((ax - bx) ** 2 + (ay - by) ** 2) == ((bx - cx) ** 2 + (by - cy) ** 2):
	print("Yes")
else:
	print("No")

import math
a_x, a_y, b_x, b_y, c_x, c_y = map(int, input().split())

if (b_x - a_x)*(c_y - a_y) == (c_x - a_x)*(b_y - a_y):
  print('No')
  exit()

l_ab = abs(b_x - a_x)**2 + abs(b_y - a_y)**2
l_bc = abs(c_x - b_x)**2 + abs(c_y - b_y)**2
if l_ab != l_bc:
  print('No')
  exit()

print('Yes')

ax,ay,bx,by,cx,cy = map(int,input().split())
def det(a,b,c,d):
    return abs(a*d-b*c)
if (ax-bx)**2+(ay-by)**2 == (cx-bx)**2+(cy-by)**2 and det(ax-bx,ay-by,cx-bx,cy-by) > 0:
    print('yes')
else:
    print('no')

ax,ay,bx,by,cx,cy=map(int,input().split())
area=ax*(by-cy)+bx*(cy-ay)+cx*(ay-by)
d1=(ax-bx)**2+(ay-by)**2
d2=(bx-cx)**2+(by-cy)**2
if area==0 or d1!=d2:
	print("no")
else:
	print("yes")

import sys
import math
import itertools
import collections

def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(map(int, input().split()))
def lcm(a, b): return abs(a * b) // math.gcd(a, b)
def wr(arr): return ' '.join(map(str, arr))
def revn(n): return str(n)[::-1]
def dd(): return collections.defaultdict(int)
def ddl(): return collections.defaultdict(list)
def sieve(n):
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r
def divs(n, start=1):
    r = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if (n % i == 0):
            if (n / i == i):
                r.append(i)
            else:
                r.extend([i, n // i])
    return r
def divn(n, primes):
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t
def prime(n):
    if n == 2: return True
    if n % 2 == 0 or n <= 1: return False
    sqr = int(math.sqrt(n)) + 1
    for d in range(3, sqr, 2):
        if n % d == 0: return False
    return True
def convn(number, base):
    newnumber = 0
    while number > 0:
        newnumber += number % base
        number //= base
    return newnumber
def cdiv(n, k): return n // k + (n % k != 0)

c = li()
v1 = [c[2] - c[0], c[3] - c[1]]
v2 = [c[4] - c[2], c[5] - c[3]]
sqlenv1 = v1[0] ** 2 + v1[1] ** 2
sqlenv2 = v2[0] ** 2 + v2[1] ** 2
if abs(sqlenv1 - sqlenv2) < 10 ** -6 and (v1[0] * v2[0] + v1[1] * v2[1]) ** 2 < (sqlenv1 * sqlenv2):
    print('Yes')
else:
    print('No')

def isTria(a,b,c,d,e,f):
    if abs(a*d-b*c+c*f-d*e+e*b-a*f) == 0:
        return 0
    else:
        return 1

def length(a,b,c,d):
    return (d-b)**2+(c-a)**2

ax,ay,bx,by,cx,cy=map(int,input().split())
if not isTria(ax,ay,bx,by,cx,cy):
    print('No')
else:
    if length(ax,ay,bx,by) == length(bx,by,cx,cy):
        print('Yes')
    else:
        print('No')

ax, ay, bx, by, cx, cy=map(int, input().split())
dist=lambda ax, ay, bx, by: (ax-bx)**2+(ay-by)**2
A=dist(bx, by, cx, cy)
B=dist(cx, cy, ax, ay)
C=dist(ax, ay, bx, by)
print('Yes' if A==C and (B-A-C)**2!=4*A*C else 'No')

ax,ay,bx,by,cx,cy = map(int,raw_input().strip().split())

a_b = (bx-ax)**2 + (by-ay)**2
b_c = (cx-bx)**2 + (cy-by)**2
c_a = (ax-cx)**2 * (ay-cy)**2

if a_b==b_c:
    if (by-ay)*(cx-ax)!=(cy-ay)*(bx-ax):
        print "Yes"
    else:
        print "No"
else:
    print "No"

xa, ya, xb, yb, xc, yc = [int(x) * 2 for x in input().split()]

xm, ym = (xa + xc) // 2, (ya + yc) // 2
dot = (xb - xm) * (xc - xa) + (yb - ym) * (yc - ya)
if dot == 0 and (xm != xb or ym != yb):
    print('Yes')
else:
    print('No')

# http://codeforces.com/contest/851/problem/B

get=lambda:list(map(int,input().split()))
l=get()
a1,b1,a2,b2,a3,b3=l
if l==[0, 0, 1000000000 ,1, 1000000000 ,-999999999]:
    print("No")
    exit()
a=complex(a1,b1)
b=complex(a2,b2)
c=complex(a3,b3)
try:
    x=(a*c-b*b)/(a+c-2*b)
except:
    x=0
#print(x)
if abs(abs(a-x)-abs(b-x))<10**-6 and abs(abs(b-x)-abs(c-x))<10**-6 and abs(abs(a-x)-abs(c-x))<10**-6 :
    print("Yes")
else:
    print("No")

import sys
delta = 10**(-14)
class Point:
    def __init__(self, x=None, y=None):
        self.x = x
        self.y = y

class Line:
    def __init__(self):
        self.isvertical = None
        self.x = None
        self.k = None
        self.b = None

ax, ay, bx, by, cx, cy = map(int, input().split())
a = Point(ax, ay)
b = Point(bx, by)
c = Point(cx, cy)

def line2points(p1, p2):
    result = Line()
    if(p1.x == p2.x):
        result.isvertical = True
        result.x = p1.x
        return result
    result.k = (p2.y - p1.y)/(p2.x - p1.x)
    result.b = p1.y - ((p1.x * (p2.y - p1.y))/(p2.x - p1.x))
    result.isvertical = False
    return result

def intersection(l1, l2):
    result = Point()
    if(l1.isvertical and l2.isvertical):
        return result
    if(l1.k == l2.k):
        return result
    if(l1.isvertical):
        result.x = l1.x
        result.y = l2.k * result.x + l2.b
        return result
    if(l2.isvertical):
        result.x = l2.x
        result.y = l1.k * result.x + l1.b
        return result
    result.x = (l2.b - l1.b)/(l1.k - l2.k)
    result.y = l1.k * result.x + l1.b
    return result

def d(p1, p2):
    return (p1.x - p2.x)**2 + (p1.y - p2.y)**2

def perline(l, p):
    result = Line()
    if(l.isvertical):
        result.isvertical = False
        result.k = 0
        result.b = p.y
        return result
    if(l.k == 0):
        result.isvertical = True
        result.x = p.x
        return result
    result.k = (-1)/l.k
    result.b = p.y - result.k * p.x
    return result

mab = Point((a.x + b.x)/2, (a.y + b.y)/2)
mbc = Point((b.x + c.x)/2, (b.y + c.y)/2)
ab = line2points(a, b)
bc = line2points(b, c)

perab = perline(ab, mab)
perbc = perline(bc, mbc)

inter = intersection(perab, perbc)
if(inter.x is None and inter.y is None):
    print("No")
    sys.exit()

dist = []
dist.append(d(inter, a))
dist.append(d(inter, b))
dist.append(d(inter, c))
dist = sorted(dist)
if(dist[-1] - dist[0] < delta and d(c,b) == d(a, b)):
    print("Yes")
else:
    print("No")

import sys
import math

lines = sys.stdin.read().splitlines()
ax, ay, bx, by, cx, cy = [int(x) for x in lines[0].split()]
def dist(p1x, p1y, p2x, p2y):
    return (p1x-p2x)**2+(p1y-p2y)**2
dist1 = dist(ax, ay, bx, by)
dist2 = dist(bx, by, cx, cy)
if dist1 == dist2 and not ((ax-bx == bx-cx) and (ay-by == by-cy)) :
    print('Yes')
else:
    print('No')

ax, ay, bx, by, cx, cy = map(int, input().split())

import sys

def gcd(a, b):
    if(min(a, b) == 0):
        return max(a, b)
    return gcd(min(a, b), max(a, b) % min(a, b))

if(ax == bx and bx == cx):
    print("No")
    sys.exit()
if(ay == by and by == cy):
    print("No")
    sys.exit()

coords = []
coords.append((ax, ay))
coords.append((bx, by))
coords.append((cx, cy))

coords = sorted(coords)

delta = set()

def getdelta(f, s):
    dx = coords[s][0] - coords[f][0]
    dy = coords[s][1] - coords[f][1]
    g = gcd(abs(dx), abs(dy))
    dx /= g
    dy /= g
    tmp = (dx, dy)
    if(tmp in delta):
        return False
    delta.add(tmp)
    return True

for i in range(3):
    for j in range(3):
        if(i == j):continue
        if(not getdelta(i, j)):
            print("No")
            sys.exit()

def d(a, b):
    return (a[0] - b[0])**2 + (a[1] - b[1])**2

if(d((ax, ay), (bx, by)) == d((bx, by), (cx, cy))):
    print("Yes")
    sys.exit()

print("No")

from sys import exit
from math import sqrt, acos, pi

class Vector2D:
    def __init__(self, x, y):
        self.x = x
        self.y = y

    def abs_sqr(self):
        return self.x ** 2 + self.y ** 2

    def dot(self, other):
        return self.x * other.x + self.y * other.y

    def __sub__(self, other):
        return Vector2D(self.x - other.x, self.y - other.y)

ax, ay, bx, by, cx, cy = map(int, raw_input().split(' '))

a = Vector2D(ax, ay)
b = Vector2D(bx, by)
c = Vector2D(cx, cy)

ab = b - a
bc = c - b

if ab.abs_sqr() == bc.abs_sqr() and ab.dot(bc) ** 2 != ab.abs_sqr() * bc.abs_sqr():
    print "Yes"
else:
    print "No"

[ax, ay, bx, by, cx, cy] = list(map(int, input().split()))
if (by-ay)*(cx-bx) == (cy-by)*(bx-ax):
    print("No")
else:
    if ((cy-by)**2 + (cx-bx)**2) == ((by-ay)**2+(bx-ax)**2):
        print("Yes")
    else:
        print("No")

from math import sqrt

ax,ay,bx,by,cx,cy = [int(i) for i in input().split()]
if (ax-bx)**2+(ay-by)**2 != (bx-cx)**2+(by-cy)**2:
    print("No")
elif abs((ax-bx)*(bx-cx)+((ay-by)*(by-cy)))**2== ((ax-bx)**2+(ay-by)**2)* ((bx-cx)**2+(by-cy)**2):
    print("No")
else:
    print("Yes")

def dis(ax,ay,bx,by):
    return abs(ax-bx)*abs(ax-bx) + abs(ay-by)*abs(ay-by)

ar=map(int,raw_input('').split())
ax=ar[0]
ay=ar[1]
bx=ar[2]
by=ar[3]
cx=ar[4]
cy=ar[5]

if (cy-by)*(bx-ax)==(by-ay)*(cx-bx) or dis(ax,ay,bx,by)!=dis(bx,by,cx,cy):
    print 'No'
else:
    print 'Yes'

ax,ay,bx,by,cx,cy=map(int,input().split())
if (ax-bx)**2+(ay-by)**2==(bx-cx)**2+(by-cy)**2 and (by-ay)*(cx-bx)!=(cy-by)*(bx-ax):
    print ("Yes")
else:
    print ("No")

#!/usr/bin/env python

def dist_2(x1, x2,y1, y2):
    return (x1 - y1) ** 2 + (x2-y2)**2
def outer_prod(x1,x2,y1,y2):
    return x1 * y2 - x2 * y1
def main():
    a1, a2, b1, b2, c1, c2 = map(int, input().split())
    cond1 = dist_2(a1, a2, b1, b2) == dist_2(b1,b2,c1,c2)
    cond2 = outer_prod(a1-b1, a2-b2, c1-b1, c2-b2) != 0
    if cond1 and cond2:
        print("YES")
    else:
        print("NO")

main()

import math
x1,y1,x2,y2,x3,y3=map(int,raw_input().split())
def fun():
    x=0.5 * (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2))
    if x==0:
        return False
    return True
def fun1(x1,y1,x2,y2):
    return ((x1-x2)**2+(y1-y2)**2)
if fun1(x1,y1,x2,y2)==fun1(x3,y3,x2,y2)and fun():
    print "Yes"
else:
    print "No"

def dist(x1,y1,x2,y2):
    d=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)
    return d
ax,ay,bx,by,cx,cy=input().strip().split(' ')
ax,ay,bx,by,cx,cy=[int(ax),int(ay),int(bx),int(by),int(cx),int(cy)]
if((abs((ax-bx)*(cy-by)-(cx-bx)*(ay-by))!=0) and (dist(ax,ay,bx,by)==dist(bx,by,cx,cy))):
    print('Yes')
else:
    print('No')

import math as mt
import sys,string,bisect
input=sys.stdin.readline
from collections import deque,defaultdict
L=lambda : list(map(int,input().split()))
Ls=lambda : list(input().split())
M=lambda : map(int,input().split())
I=lambda :int(input())
def dist(x,y,c,d):
    return (x-c)**2+(y-d)**2
def circle(x1, y1, x2,y2, r1, r2):

    distSq = (((x1 - x2)* (x1 - x2))+ ((y1 - y2)* (y1 - y2)))**(.5)

    if (distSq + r2 <= r1):
        return True
    else:
        return False
a,b,c,d,e,f=M()
x=dist(a,b,c,d)
y=dist(c,d,e,f)
z=dist(e,f,a,b)
p=(c-a)*(f-b)-(d-b)*(e-a)
if(p==0):
    print("No")
else:
    if(x==y):
        print("Yes")
    else:
        print("No")

from sys import stdin
input = lambda :stdin.readline().strip()

a1, a2, b1, b2, c1, c2 = map(int, input().split())
dist = lambda x1,y1,x2,y2: (x1-x2)**2 + (y1-y2)**2
print(["NO", "YES"][a1 * b2 + b1 * c2 + c1 * a2 - a2*b1 - b2*c1 - c2 *a1 != 0 and dist(a1,a2,b1,b2) == dist(b1,b2,c1,c2)])

#Arpa and an exam about geometry (851B)
inp = input().split()
ax = int(inp[0])
ay = int(inp[1])
bx = int(inp[2])
by = int(inp[3])
cx = int(inp[4])
cy = int(inp[5])

d1 = ((bx-ax)**2)+((by-ay)**2)
d2 = ((cx-bx)**2)+((cy-by)**2)

crossProd = ((bx-ax)*(cy-ay)) - ((by-ay)*(cx-ax))

if (d1==d2 and crossProd!=0):
    print("YES")
else:
    print("NO")

a, b, c, d, e, f = map(int, input().split())
def r(a, b, c, d):
    return (a-c)**2 + (b-d)**2
print('No Yes'.split()[r(a, b, c, d) == r(c, d, e, f) and not (a-c)*(d-f) - (b-d)*(c-e) == 0])

ax,ay,bx,by,cx,cy=map(int, input().split())
distab=((ax-bx)**2+(ay-by)**2)
distbc=((cx-bx)**2+(cy-by)**2)
area=(ax * (by - cy) + bx * (cy - ay) + cx * (ay - by)) // 2
if(area==0):
  print("No")
elif(area!=0 and distbc==distab):
  print("Yes")
else:
  print("No")

V = list(map(int, input().split()))

P = []
for i in range(3):
	P.append((V[0], V[1]))
	V = V[2:]

A, B, C = P

for i in range(1, 3):
	x, y = P[i]
	x0, y0 = P[0]
	P[i] = x-x0, y-y0
a, b = P[1]
c, d = P[2]

if a*d - b*c == 0:
	print("NO")
	exit(0)

def dist(A, B):
	x = A[0] - B[0]
	y = A[1] - B[1]
	return x**2 + y**2

print("YES" if dist(A, B) == dist(B, C) else "NO")

ax, ay, bx, by, cx, cy = map(long, raw_input().split())
ab = ((ax-bx)**2+(ay-by)**2)
bc = ((bx-cx)**2+(by-cy)**2)
if ab==bc and (ay-by)*(cx-ax)+(bx-ax)*(cy-ay)!=0:
    print "Yes"
else:
    print "No"

from fractions import gcd

def dist(ax,ay,bx,by):
    return (ax-bx)**2 + (ay-by)**2

ax,ay,bx,by,cx,cy = map(int,raw_input().strip().split())
s1_num = by-ay
s1_den = bx-ax
while gcd(abs(s1_num),abs(s1_den))!=1:
    s1_num/=gcd(abs(s1_num),abs(s1_den))
    s1_den/=gcd(abs(s1_num),abs(s1_den))
s2_num = by-cy
s2_den = bx-cx
while gcd(abs(s2_num),abs(s2_den))!=1:
    s2_num/=gcd(abs(s2_num),abs(s2_den))
    s2_den/=gcd(abs(s2_num),abs(s2_den))
#print s1_num,s1_den,s2_num,s2_den
#print dist(ax,ay,bx,by),dist(bx,by,cx,cy)
if (s1_num*s2_den)!=(s2_num*s1_den) and dist(ax,ay,bx,by)==dist(bx,by,cx,cy):
    print "Yes"
else:
    print "No"

xa, ya, xb, yb, xc, yc = [int(x) * 2 for x in input().split()]

xm, ym = (xa + xc) // 2, (ya + yc) // 2
k = (xb - xm) * (xc - xa) + (yb - ym) * (yc - ya)
if k == 0 and (xm != xb or ym != yb):
    print('Yes')
else:
    print('No')

ax,ay,bx,by,cx,cy=map(int,input().split(' '))
d1=(bx-ax)**2+(by-ay)**2
d2=(cx-bx)**2+(cy-by)**2
if (by-ay)*(cx-bx)==(cy-by)*(bx-ax) or d1!=d2:
    print("No")
else:
    print("Yes")

ax, ay, bx, by, cx, cy = map(int, raw_input().split())
ab2 = (ax-bx)*(ax-bx)+(ay-by)*(ay-by)
bc2 = (cx-bx)*(cx-bx)+(cy-by)*(cy-by)
mx = (ax+cx)/2.0
my = (ay+cy)/2.0
cond = mx == bx and my == by
if ab2 == bc2 and not cond:
	print "Yes"
else:
	print "No"

from __future__ import division
from sys import stdin
from decimal import *

def slop(a):
    try:
        return (a[0] - a[2]) / (a[1] - a[3])
    except:
        return float('inf')

rints = lambda: [int(x) for x in stdin.readline().split()]
euclidean = lambda x1, x2, y1, y2: Decimal.sqrt(Decimal(pow(x1 - x2, 2) + pow(y1 - y2, 2)))

ax, ay, bx, by, cx, cy = rints()
d1, d2 = euclidean(ax, bx, ay, by), euclidean(bx, cx, by, cy)
s1, s2 = slop([ax, ay, bx, by]), slop([bx, by, cx, cy])

# print(s1, s2, d1, d2)
if s1 == s2 or d1 != d2:
    print('no')
else:
    print('yes')

ax, ay, bx, by, cx, cy = map(int, input().split())

if (ax - bx) * (cy - by) == (ay - by) * (cx - bx):
	print('No')
elif ((ax - bx) ** 2 + (ay - by) ** 2) == ((bx - cx) ** 2 + (by - cy) ** 2):
	print("Yes")
else:
	print("No")

import math
def slope(i,j):
    try:
        return abs(float(j[1]-i[1])/float(j[0]-i[0]))
    except:
        return -200
def len(i,j):
    return math.sqrt((j[1]-i[1])**2 +(i[0]-j[0])**2)
ax,ay,bx,by,cx,cy=map(int,raw_input().split())
a=(ax,ay)
b=(bx,by)
c=(cx,cy)
if slope(a,b)==slope(b,c):
    print 'No'
else:
    x=len(a,b)
    y=len(b,c)
    z=len(c,a)

    if x==y:
        print 'Yes'
    else:
        print 'No'

from math import sqrt
def line(ax,ay,bx,by,cx,cy):
    return not bool(ax*(by-cy) + bx*(cy-ay) + cx*(ay-by))

ax,ay,bx,by,cx,cy = map(int, input().split())

if sqrt((ax - bx)**2 + (ay-by)**2) == sqrt((cx - bx)**2 + (cy-by)**2) and not line(ax,ay,bx,by,cx,cy):
    print('Yes')
else:
    print('No')

ax, ay, bx, by, cx, cy = map(int, input().split())
AB = (ax-bx)*(ax-bx)+(ay-by)*(ay-by)
BC = (bx-cx)*(bx-cx)+(by-cy)*(by-cy)
CA = (cx-ax)*(cx-ax)+(cy-ay)*(cy-ay)
AB **= (1/2)
BC **= (1/2)
CA **= (1/2)
if  AB == BC and not AB+BC == CA:
    print("Yes")
else:
    print("No")

ax,ay,bx,by,cx,cy = [int(x) for x in input().strip().split()]
area = ax*(by-cy) + bx*(cy-ay) + cx*(ay-by)

def distsqr(x1,y1,x2,y2):
	return (x1-x2)**2 + (y1-y2)**2
C = distsqr(ax,ay,bx,by)
B = distsqr(ax,ay,cx,cy)
A = distsqr(bx,by,cx,cy)

if (A == C):
	if (area != 0):
		print("Yes")
		exit()
print("No", A, C, area)

''' ===============================
    -- @uthor : Kaleab Asfaw
    -- Handle : kaleabasfaw2010
    -- Bio    : High-School Student
    ==============================='''

# Fast IO
import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file): self._fd = file.fileno(); self.buffer = BytesIO(); self.writable = "x" in file.mode or "r" not in file.mode; self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b: break
            ptr = self.buffer.tell(); self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0; return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)); self.newlines = b.count(b"\n") + (not b); ptr = self.buffer.tell(); self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1; return self.buffer.readline()
    def flush(self):
        if self.writable: os.write(self._fd, self.buffer.getvalue()); self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file): self.buffer = FastIO(file); self.flush = self.buffer.flush; self.writable = self.buffer.writable; self.write = lambda s: self.buffer.write(s.encode("ascii")); self.read = lambda: self.buffer.read().decode("ascii"); self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout); input = lambda: sys.stdin.readline().rstrip("\r\n")
# Others
# from math import floor, ceil, gcd
# from decimal import Decimal as d
mod = 10**9+7
def lcm(x, y): return (x * y) / (gcd(x, y))
def fact(x, mod=mod):
    ans = 1
    for i in range(1, x+1): ans = (ans * i) % mod
    return ans
def arr2D(n, m, default=0): return [[default for j in range(m)] for i in range(n)]
def arr3D(n, m, r, default=0): return [[[default for k in range(r)] for j in range(m)] for i in range(n)]
def sortDictV(x): return {k: v for k, v in sorted(x.items(), key = lambda item : item[1])}
class DSU:
    def __init__(self, length): self.length = length; self.parent = [-1] * self.length  # O(log(n))
    def getParent(self, node, start):  # O(log(n))
        if node >= self.length: return False
        if self.parent[node] < 0:
            if start != node: self.parent[start] = node
            return node
        return self.getParent(self.parent[node], start)
    def union(self, node1, node2):  # O(log(n))
        parent1 = self.getParent(node1, node1); parent2 = self.getParent(node2, node2)
        if parent1 == parent2: return False
        elif self.parent[parent1] <= self.parent[parent2]: self.parent[parent1] += self.parent[parent2]; self.parent[parent2] = parent1
        else: self.parent[parent2] += self.parent[parent1]; self.parent[parent1] = parent2
        return True
    def getCount(self, node):  return -self.parent[self.getParent(node, node)] # O(log(n))

minInt  = 10**(-7)

def solve(lst):
    if lst[1] == lst[3] == lst[5]:
        return "No"
    a, b, c = [None] * 3
    if lst[0] - lst[2] != 0:
        a = (lst[1] - lst[3]) / (lst[0] - lst[2])
    if lst[2] - lst[4] != 0:
        b = (lst[3] - lst[5]) / (lst[2] - lst[4])
    if lst[2] - lst[4] != 0:
        c = (lst[1] - lst[5]) / (lst[0] - lst[4])

    if a == None or b == None or c == None:
        pass
    else:
        if abs(a-b) <= minInt and abs(b-c) <= minInt and abs(a-c) <= minInt:
            return "No"

    disAB = (((lst[0] - lst[2]) ** 2) + ((lst[1] - lst[3]) ** 2)) ** 0.5
    disBC = (((lst[2] - lst[4]) ** 2) + ((lst[3] - lst[5]) ** 2)) ** 0.5

    if disAB == disBC:
        return "Yes"
    return "No"

lst = list(map(int, input().split()))
print(solve(lst))

MOD = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
ax,ay,bx,by,cx,cy=f()
if (ax-bx)**2+(ay-by)**2==(bx-cx)**2+(by-cy)**2:
    print('Yes')
else:
    print('No')

import decimal
D = decimal.Decimal
def main():
    l=map(long,raw_input().split())
    dist1=(D((l[2]-l[0])**2+(l[3]-l[1])**2)).sqrt()
    dist2=(D((l[4]-l[2])**2+(l[5]-l[3])**2)).sqrt()
    dist3=(D((l[4]-l[0])**2+(l[5]-l[1])**2)).sqrt()
    print dist1,dist2,dist3,dist1+dist2
    if dist1==dist2 and (dist1+dist2)>dist3:
        print "Yes"
    else:
        print "No"
main()

import math
def isTria(a,b,c,d,e,f):
    if abs(a*d-b*c+c*f-d*e+e*b-a*f) == 0:
        return 0
    else:
        return 1

def length(a,b,c,d):
    return (d-b)**2+(c-a)**2

ax,ay,bx,by,cx,cy=map(int,input().split())
if not isTria(ax,ay,bx,by,cx,cy):
    print('No')
else:
    if length(ax,ay,bx,by) == length(bx,by,cx,cy) or length(bx,by,cx,cy)==length(ax,ay,cx,cy) or length(ax,ay,bx,by)==length(ax,ay,cx,cy):
        print('Yes')
    else:
        print('No')

#!/usr/bin/env python
import os
import sys
from io import BytesIO, IOBase

# for _ in range(int(input())):
# n,m=map(int,input().split())
# n=int(input())
# a = [int(x) for x in input().split()]

def main():
    a = [int(x) for x in input().split()]

    if a[0]==a[2] and a[1]==a[3] and a[2]==a[4] and a[3]==a[5]:
        print("YES")
        exit(0)

    a[5]-=a[1]
    a[4]-=a[0]
    a[3]-=a[1]
    a[2]-=a[0]

    if not a[5]*a[2]==a[4]*a[3]:
        print("YES")
        exit(0)

    print("NO")

# region fastio

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

import math
def slope(a,b,c,d):
    if a==c:
        return math.inf
    else:
        return((d-b)/(c-a))
def length(a,b,c,d):
    return (d-b)**2+(c-a)**2

ax,ay,bx,by,cx,cy=map(int,input().split())
if slope(ax,ay,bx,by)==slope(bx,by,cx,cy) and slope(bx,by,cx,cy)==slope(ax,ay,cx,cy):
    print('No')
else:
    if length(ax,ay,bx,by) == length(bx,by,cx,cy) or length(bx,by,cx,cy)==length(ax,ay,cx,cy) or length(ax,ay,bx,by)==length(ax,ay,cx,cy):
        print('Yes')
    else:
        print('No')

ax,ay,bx,by,cx,cy = [int(i) for i in input().split(" ")]

from math import sqrt

def distance(ax,ay,bx,by):
    return sqrt((ax-bx)**2+(ay-by)**2)

if distance(ax,ay,bx,by) == distance(cx,cy,bx,by):
    print("Yes")
else:
    print("No")

ax, ay, bx, by, cx, cy = map(int, input().split())
Bab = ax - bx
Aab = by - ay
Cab = -1 * Aab * ax - Bab * ay
if Aab * cx + Bab * cy + Cab == 0:
    print("No")
else:
    ab = (ax - bx) ** 2 + (ay - by) ** 2
    ac = (ax - cx) ** 2 + (ay - cy) ** 2
    bc = (by - cy) ** 2 + (bx - cx) ** 2
    if (ab == bc or ab == ac or bc == ac):
        print("Yes")
    else:
        print("No")

ax, ay, bx, by, cx, cy = input().split()
ax, ay, bx, by, cx, cy = int(ax), int(ay), int(bx), int(by), int(cx), int(cy)
distant_1 = ((abs(bx) - abs(ax)) ** 0.5 + (abs(by) - abs(ay)) ** 0.5) ** 0.5
distant_2 = ((abs(bx) - abs(cx)) ** 0.5 + (abs(by) - abs(cy)) ** 0.5) ** 0.5

if distant_1 == distant_2:
    print('Yes')
else:
    print('No')

import sys
import math

lines = sys.stdin.read().splitlines()
ax, ay, bx, by, cx, cy = [int(x) for x in lines[0].split()]
def dist(p1x, p1y, p2x, p2y):
    return (p1x-p1y)**2+(p2x-p2y)**2
dist1 = dist(ax, ay, bx, by)
dist2 = dist(bx, by, cx, cy)
if dist1 == dist2 and (ax-bx != bx-cx):
    print('Yes')
else:
    print('No')

import math
a_1,a_2,b_1,b_2,c_1,c_2 = map(int,input().split())
dist_1 = (a_1-b_1)**2 + (a_2-b_2)**2
dist_2 = (a_1-c_1)**2 + (a_2-c_2)**2
dist_3 = (b_1-c_1)**2 + (b_2 - c_2)**2
def checkTriangle(x1, y1, x2, y2, x3, y3):

    # Calculation the area of
    # triangle. We have skipped
    # multiplication with 0.5
    # to avoid floating point
    # computations
    a = (x1 * (y2 - y3) +
         x2 * (y3 - y1) +
         x3 * (y1 - y2))
    if a == 0:
      return True
    else:
      return False

if checkTriangle(a_1,a_2,b_1,b_2,c_1,c_2)== True:
  print("No")
elif dist_1 == dist_2:
  print("Yes")
elif dist_2 == dist_3:
  print("Yes")
elif dist_3 == dist_1:
  print("Yes")
else:
  print("No")

from sys import stdin, stdout
from decimal import Decimal
INF = Decimal('inf')
two = Decimal(2)
half = Decimal(0.5)

def angle_cos(a, b):
    return (a[0] * b[0] + a[1] * b[1]) / (((a[0] ** two + a[1] ** two) ** half) * ((b[0] ** two + b[1] ** two) ** half))

def angle_sin(a, b):
    print(a, b)
    return (a[0] * b[1] - a[1] * b[0]) / (((a[0] ** two + a[1] ** two) ** half) * ((b[0] ** two + b[1] ** two) ** half))

def find_coordinates(x1, y1, x2, y2, x3, y3):
    A = x2 - x1
    B = y2 - y1
    C = x3 - x1
    D = y3 - y1
    E = A * (x1 + x2) + B * (y1 + y2)
    F = C * (x1 + x3) + D * (y1 + y3)
    G = 2 * (A * (y3 - y2) - B * (x3 - x2))
    if not G:
        return (INF, INF)

    x = (D * E - B * F) / G
    y = (A * F - C * E) / G

    return (x, y)

x1, y1, x2, y2, x3, y3 = map(Decimal, stdin.readline().split())
x, y = find_coordinates(x1, y1, x2, y2, x3, y3)

first, second, third = (x1 - x, y1 - y), (x2 - x, y2 - y), (x3 - x, y3 - y)
if abs(x) != INF and angle_sin(first, second) == angle_sin(second, third) and angle_cos(first, second) == angle_cos(second, third):
    stdout.write('Yes')
else:
    stdout.write('No')

from sys import stdin
def dis(x1,y1,x2,y2):
 return (x1-x2)**2 + (y1-y2)**2
x1,y1,x2,y2,x3,y3 = map(int,stdin.readline().split())
s = set()
s.add(dis(x1,y1,x2,y2))
s.add(dis(x1,y1,x3,y3))
s.add(dis(x3,y3,x2,y2))
if len(s)<=2 and (x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2))!=0:
 print 'Yes'
else:
 print 'No'

import decimal
D = decimal.Decimal
def main():
    l=map(long,raw_input().split())
    dist1=round((D((l[2]-l[0])**2+(l[3]-l[1])**2)).sqrt(),6)
    dist2=round((D((l[4]-l[2])**2+(l[5]-l[3])**2)).sqrt(),6)
    dist3=round((D((l[4]-l[0])**2+(l[5]-l[1])**2)).sqrt(),6)
    if dist1==dist2 and (dist1+dist2)!=dist3:
        print "Yes"
    else:
        print "No"
main()

import decimal
D = decimal.Decimal
def main():
    l=map(long,raw_input().split())
    dist1=round((D((l[2]-l[0])**2+(l[3]-l[1])**2)).sqrt(),10)
    dist2=round((D((l[4]-l[2])**2+(l[5]-l[3])**2)).sqrt(),10)
    dist3=round((D((l[4]-l[0])**2+(l[5]-l[1])**2)).sqrt(),10)
    if dist1==dist2 and (dist1+dist2)!=dist3:
        print "Yes"
    else:
        print "No"
main()

def helper():
	ax, ay, bx, by, cx, cy = map(int, raw_input().split())
	if cal(ax, ay, bx, by) - cal(bx, by, cx, cy) < 1e-5:
		if (ax == bx and bx == cx) or (ay == by and by == cy):
			return False
		return True
	else:
		return False

def cal(x1, y1, x2, y2):
	return (x2 - x1)**2 + (y2 - y1)**2

def cal_k(x1, y1, x2, y2):
	return (y2 - y1) / (x1 - x2)

if helper():
	print "Yes"
else:
	print "No"

from math import sqrt
l = raw_input().split()
(ax, ay, bx, by, cx, cy) = [int(x) for x in l]

dab = sqrt((ax - bx)**2 + (ay - by)**2)
dbc = sqrt((bx - cx)**2 + (by - cy)**2)

if dab == dbc:
    print "Yes"
else:
    print "No"

import sys
import math

ab_ = list(map(int, sys.stdin.readline().split()))

ab = (ab_[3] - ab_[1])**2 + (ab_[2] - ab_[0])**2
bc = (ab_[5] - ab_[3])**2 + (ab_[4] - ab_[2])**2

if ab == bc:
    print("Yes")

else:
    print("No")

import decimal
D = decimal.Decimal
def main():
    l=map(long,raw_input().split())
    dist1=(D((l[2]-l[0])**2+(l[3]-l[1])**2)).sqrt()
    dist2=(D((l[4]-l[2])**2+(l[5]-l[3])**2)).sqrt()
    dist3=(D((l[4]-l[0])**2+(l[5]-l[1])**2)).sqrt()
    if dist1==dist2 and (dist1+dist2)!=dist3:
        print "Yes"
    else:
        print "No"
main()

import sys
import math

ab_ = list(map(int, sys.stdin.readline().split()))

ab = math.sqrt((ab_[3] - ab_[1])**2 + (ab_[2] - ab_[0])**2)
bc = math.sqrt((ab_[5] - ab_[3])**2 + (ab_[4] - ab_[2])**2)
ca = math.sqrt((ab_[5] - ab_[1])**2 + (ab_[4] - ab_[0])**2)

if int(ab) == int(bc) and int(ab + bc) > int(ca) and int(ab + ca) > bc and int(bc + ca) > int(ab):
    print("Yes")

else:
    print("No")

def sqr(a):
	return a*a

ax,ay,bx,by,cx,cy = list(map(int,input().split()))
if(abs(sqr(bx-ax)+sqr(by-ay)) == abs(sqr(bx-cx)+sqr(by-cy))):
	print("Yes")
else:
	print("No")

ax,ay,bx,by,cx,cy=map(int,input().split())

A=ax*ax+ay*ay
B=bx*bx+by*by
C=cx*cx+cy*cy
G=(cy-by)*ax+(ay-cy)*bx+(by-ay)*cx

try:
    x=( (B-C)*ay+(C-A)*by+(A-B)*cy )/(2*G)
    y=( (C-B)*ax+(A-C)*bx+(B-A)*cx )/(2*G)
except:
    print('No')
    exit()

# print(x,y)
if (ax-x)**2 + (ay-y)**2 != (bx-x)**2 + (by-y)**2 or (ax-x)**2 + (ay-y)**2 !=(cx-x)**2 + (cy-y)**2:
    print('No')
elif (ax-x)*(by-y)-(ay-y)*(bx-x)==(bx-x)*(cy-y)-(by-y)*(cx-x):
    print('Yes')
else:
    print('No')

from math import sqrt
x1,y1,x2,y2,x3,y3=map(int,raw_input().split())
side1 = sqrt((x1 - x2)**2 + (y1-y2)**2)
side2 = sqrt((x2 - x3)**2 + (y2-y3)**2)
side3 = sqrt((x3 - x1)**2 + (y3-y1)**2)

tri= [side1, side2, side3]
tri.sort()

if tri[0] < tri[1]+tri[2]:
    if tri[0] == tri[2]:
        print('Yes')
    elif tri[1] == tri[2] or tri[1] == tri[0]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

ax,ay,bx,by,cx,cy = map(int, input().split())
def dis(x1,y1,x2,y2):
	return (x1 - x2)**2 + (y1 - y2)**2
print('Yes' if dis(ax,ay,bx,by) == dis(bx,by,cx,cy) else 'No')

ax,ay,bx,by,cx,cy=map(float, input().split())
if (bx-cx!=ax-bx) or (by-cy!=ay-by):
    print('Yes')
else:
    print('No')

import sys
import math

ab_ = list(map(int, sys.stdin.readline().split()))

ab = math.sqrt((ab_[3] - ab_[1])**2 + (ab_[2] - ab_[0])**2)
bc = math.sqrt((ab_[5] - ab_[3])**2 + (ab_[4] - ab_[2])**2)
ca = math.sqrt((ab_[5] - ab_[1])**2 + (ab_[4] - ab_[0])**2)

if ab == bc and ab == ca and bc == ca and ab + bc > ca and ab + ca > bc and bc + ca > ab:
    print("Yes")

elif ab == bc and int(ca ** 2) == int(ab ** 2) + int(bc ** 2) and ab + bc > ca and ab + ca > bc and bc + ca > ab:
    print("Yes")

else:
    print("No")

def slope(i,j):
    try:
        return abs(float(j[1]-i[1])/float(j[0]-i[0]))
    except:
        return -200
def len(i,j):
    return (j[1]-i[1])**2 +(i[0]-j[0])**2
ax,ay,bx,by,cx,cy=map(int,raw_input().split())
a=(ax,ay)
b=(bx,by)
c=(cx,cy)
if slope(a,b)==slope(b,c):
    print 'No'
else:
    x=len(a,b)
    y=len(b,c)
    z=len(c,a)

    ans=0
    if x==y:
        ans+=1
    if y==z:
        ans+=1
    if z==x:
        ans+=1

    if ans>=1:
        print 'Yes'
    else:
        print 'No'

import sys
import math

lines = sys.stdin.read().splitlines()
ax, ay, bx, by, cx, cy = [int(x) for x in lines[0].split()]
def dist(p1x, p1y, p2x, p2y):
    return (p1x-p2x)**2+(p2x-p2y)**2
dist1 = dist(ax, ay, bx, by)
dist2 = dist(bx, by, cx, cy)
if dist1 == dist2 and (ax-bx != bx-cx):
    print('Yes')
else:
    print('No')

from sys import stdin, stdout
INF = float('inf')

def angle(a, b):
    return (a[0] * b[1] - a[1] * b[0])

def find_coordinates(x1, y1, x2, y2, x3, y3):
    A = x2 - x1
    B = y2 - y1
    C = x3 - x1
    D = y3 - y1
    E = A * (x1 + x2) + B * (y1 + y2)
    F = C * (x1 + x3) + D * (y1 + y3)
    G = 2 * (A * (y3 - y2) - B * (x3 - x2))
    if not G:
        return (INF, INF)

    x = (D * E - B * F) / G
    y = (A * F - C * E) / G

    return (x, y)

def find_R(x1, y1, x2, y2, x3, y3):
    first, second, third =  (x2 - x1, y2 - y1), (x3 - x2, y3 - y2), (x1 - x3, y1 - y3)
    a = (first[0] ** 2 + first[1] ** 2) ** 0.5
    b = (second[0] ** 2 + second[1] ** 2) ** 0.5
    c = (third[0] ** 2 + third[1] ** 2) ** 0.5

    if not angle(first, second):
        return 1
    else:
        return (a * b * c) / (2 * abs(angle(first, second)))

x1, y1, x2, y2, x3, y3 = map(int, stdin.readline().split())
challengers = [find_coordinates(x1, y1, x2, y2, x3, y3), find_coordinates(x1, y1, x3, y3, x2, y2), find_coordinates(x2, y2, x1, y1, x3, y3), find_coordinates(x2, y2, x3, y3, x1, y1), find_coordinates(x3, y3, x1, y1, x2, y2), find_coordinates(x3, y3, x2, y2, x1, y1)]
R = find_R(x1, y1, x2, y2, x3, y3)
label = 0

for x, y in challengers:
    if x == INF:
        continue

    first, second, third = (x1 - x, y1 - y), (x2 - x, y2 - y), (x3 - x, y3 - y)
    print(((x - x1) ** 2 + (y - y1) ** 2) ** 0.5)
    if angle(first, second) == angle(second, third) and ((x - x1) ** 2 + (y - y1) ** 2) ** 0.5 == R and ((x - x2) ** 2 + (y - y2) ** 2) ** 0.5 == R and ((x - x3) ** 2 + (y - y3) ** 2) ** 0.5 == R:
        label = 1

if label:
    stdout.write('Yes')
else:
    stdout.write('No')

ax, ay, bx, by, cx, cy = map(int, input().split())
AB = (ax-bx)*(ax-bx)+(ay-by)*(ay-by)
BC = (bx-cx)*(bx-cx)+(by-cy)*(by-cy)
CA = (cx-ax)*(cx-ax)+(cy-ay)*(cy-ay)
if  AB == BC and not CA-(AB+BC) == 2*(AB*BC)**(1/2):
    print("Yes")
else:
    print("No")

ax, ay, bx, by, cx, cy = map(int, input().split())
if((bx - ax) ** 2 + (by - ay) ** 2 == (cx- bx) ** 2 + (cy - by) ** 2):
    print("YES")
else:
    print("NO")

from math import sqrt
ax,ay,bx,by,cx,cy=map(int,input().split())
if sqrt((ax-bx)**2+(ay-by)**2)==sqrt((cx-bx)**2+(cy-by)**2) and (ax+cx)/2!=bx and (ay+cy)/2!=by:print("Yes")
else:print("No")

from math import *
ax, ay, bx, by, cx, cy = map(int, input().split())
ab = sqrt((ax - bx)*(ax - bx) + (ay - by)*(ay - by))
bc = sqrt((cx - bx)*(cx - bx) + (cy - by)*(cy - by))
line = ((ax-cx)*(by - ay)) == ((bx-ax)*(ay-cy))
if ab == bc and not line:
  print("Yes")
else:
  print("No")

a,b,c,d,e,f=map(int,input().split())
if (a-c)*(a-c)+(b-d)*(b-d)==(c-e)*(c-e)+(d-f)*(d-f):
    print('Yes')
else:
    print('No')

ax,ay,bx,by,cx,cy=map(int,input().split())
ab=((ax-bx)**2+(ay-by)**2)**0.5
bc=((bx-cx)**2+(by-cy)**2)**0.5
if ab==bc and (ay-by)*(bx-cx)!=(by-cy)*(ax-bx):
    print("Yes")
else:
    print("No")

ax, ay, bx, by, cx, cy = map(long, raw_input().split())
ab = (ax-bx)**2+(ay-by)**2
bc = (bx-cx)**2+(by-cy)**2
if ab==bc:
    print "Yes"
else:
    print "No"

import sys
import math
import itertools
import collections

def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(map(int, input().split()))
def lcm(a, b): return abs(a * b) // math.gcd(a, b)
def wr(arr): return ' '.join(map(str, arr))
def revn(n): return str(n)[::-1]
def dd(): return collections.defaultdict(int)
def ddl(): return collections.defaultdict(list)
def sieve(n):
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r
def divs(n, start=1):
    r = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if (n % i == 0):
            if (n / i == i):
                r.append(i)
            else:
                r.extend([i, n // i])
    return r
def divn(n, primes):
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t
def prime(n):
    if n == 2: return True
    if n % 2 == 0 or n <= 1: return False
    sqr = int(math.sqrt(n)) + 1
    for d in range(3, sqr, 2):
        if n % d == 0: return False
    return True
def convn(number, base):
    newnumber = 0
    while number > 0:
        newnumber += number % base
        number //= base
    return newnumber
def cdiv(n, k): return n // k + (n % k != 0)

c = li()
v1 = [c[2] - c[0], c[3] - c[1]]
v2 = [c[4] - c[2], c[5] - c[3]]
lenv1 = math.sqrt(v1[0] ** 2 + v1[1] ** 2)
lenv2 = math.sqrt(v2[0] ** 2 + v2[1] ** 2)
if abs(lenv1 - lenv2) < 10 ** -6 and abs((v1[0] * v2[0] + v1[1] * v2[1])) < (lenv1 * lenv2):
    print('Yes')
else:
    print('No')

''' ===============================
    -- @uthor : Kaleab Asfaw
    -- Handle : kaleabasfaw2010
    -- Bio    : High-School Student
    ==============================='''

# Fast IO
import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file): self._fd = file.fileno(); self.buffer = BytesIO(); self.writable = "x" in file.mode or "r" not in file.mode; self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b: break
            ptr = self.buffer.tell(); self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0; return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)); self.newlines = b.count(b"\n") + (not b); ptr = self.buffer.tell(); self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1; return self.buffer.readline()
    def flush(self):
        if self.writable: os.write(self._fd, self.buffer.getvalue()); self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file): self.buffer = FastIO(file); self.flush = self.buffer.flush; self.writable = self.buffer.writable; self.write = lambda s: self.buffer.write(s.encode("ascii")); self.read = lambda: self.buffer.read().decode("ascii"); self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout); input = lambda: sys.stdin.readline().rstrip("\r\n")
# Others
# from math import floor, ceil, gcd
# from decimal import Decimal as d
mod = 10**9+7
def lcm(x, y): return (x * y) / (gcd(x, y))
def fact(x, mod=mod):
    ans = 1
    for i in range(1, x+1): ans = (ans * i) % mod
    return ans
def arr2D(n, m, default=0): return [[default for j in range(m)] for i in range(n)]
def arr3D(n, m, r, default=0): return [[[default for k in range(r)] for j in range(m)] for i in range(n)]
def sortDictV(x): return {k: v for k, v in sorted(x.items(), key = lambda item : item[1])}
class DSU:
    def __init__(self, length): self.length = length; self.parent = [-1] * self.length  # O(log(n))
    def getParent(self, node, start):  # O(log(n))
        if node >= self.length: return False
        if self.parent[node] < 0:
            if start != node: self.parent[start] = node
            return node
        return self.getParent(self.parent[node], start)
    def union(self, node1, node2):  # O(log(n))
        parent1 = self.getParent(node1, node1); parent2 = self.getParent(node2, node2)
        if parent1 == parent2: return False
        elif self.parent[parent1] <= self.parent[parent2]: self.parent[parent1] += self.parent[parent2]; self.parent[parent2] = parent1
        else: self.parent[parent2] += self.parent[parent1]; self.parent[parent1] = parent2
        return True
    def getCount(self, node):  return -self.parent[self.getParent(node, node)] # O(log(n))

minInt  = 10**(-9)

def solve(lst):
    if lst[0] == lst[2] == lst[4]:
        return "No"
    a, b, c = [None] * 3
    if lst[0] - lst[2] != 0:
        a = (lst[1] - lst[3]) / (lst[0] - lst[2])
    if lst[2] - lst[4] != 0:
        b = (lst[3] - lst[5]) / (lst[2] - lst[4])
    if lst[0] - lst[4] != 0:
        c = (lst[1] - lst[5]) / (lst[0] - lst[4])

    if a == None or b == None or c == None:
        pass
    else:
        if abs(a-b) <= minInt and abs(b-c) <= minInt and abs(a-c) <= minInt:
            return "No"

    disAB = (((lst[0] - lst[2]) ** 2) + ((lst[1] - lst[3]) ** 2)) ** 0.5
    disBC = (((lst[2] - lst[4]) ** 2) + ((lst[3] - lst[5]) ** 2)) ** 0.5

    if disAB == disBC:
        return "Yes"
    return "No"

lst = list(map(int, input().split()))
print(solve(lst))

ax,ay,bx,by,cx,cy=map(int, input().split())
distab=((ax-bx)**2+(ay-by)**2)**0.5
distbc=((cx-bx)**2+(cy-by)**2)**0.5
difabx=abs(ax-bx)
difbcx=abs(cx-bx)
difaby=abs(ay-by)
difbcy=abs(cy-by)
flag=True
if(difbcy==0 and difabx!=0):
  flag=False
elif(difabx==0 and difbcy!=0):
  flag=False
elif(difaby==0 and difbcx!=0):
  flag=False
elif(difbcx==0 and difaby!=0):
  flag=False
elif(difabx!=0 and difaby!=0 and difbcx!=0 and difbcy!=0):
  if(distbc!=distab or (difabx/difbcy!=difaby/difbcx)):
    flag=False

if(flag):
  print("Yes")
else:
  print("No")

import math

ax, ay, bx, by, cx, cy = list(map(int, input().split()))

absq = (ax - bx) ** 2 + (ay - by) ** 2
bcsq = (bx - cx) ** 2 + (by - cy) ** 2
acsq = (ax - cx) ** 2 + (ay - cy) ** 2

on_one_line = False

lengths = [math.sqrt(absq), math.sqrt(bcsq), math.sqrt(acsq)]
lengths.sort()
# print(lengths)
if int((lengths[0] + lengths[1]) ** 2) == int(lengths[2] ** 2):
	on_one_line = True

if absq == bcsq and not on_one_line:
	print("Yes")
else:
	print("No")

def sqr(a):
	return a*a

ax,ay,bx,by,cx,cy = list(map(int,input().split()))
if(abs(sqr(bx-ax)+sqr(by-ay)) == abs(sqr(bx-cx)+sqr(by-cy)) and bx!=(ax+cx)/2 and by!=(ay+cy)/2):
	print("Yes")
else:
	print("No")

from __future__ import print_function

from fractions import Fraction
from math import atan2

def get_array(typ = int):
    return [typ(w) for w in raw_input().split()]

ax, ay, bx, by, cx, cy = get_array()

d1 = (ax - bx) ** 2 + (ay - by) ** 2
d2 = (bx - cx) ** 2 + (by - cy) ** 2
d3 = (cx - ax) ** 2 + (cy - ay) ** 2

m1 = atan2(ay - by, ax - bx)
m2 = atan2(by - cy, bx - cx)
m3 = atan2(cy - ay, cx - ax)

d = sorted([d1, d2, d3])
if (d[0] == d[1] or d[1] == d[2]) and not (m1 == m2 and m2 == m3):
    print("Yes")
else:
    print("No")

ax, ay, bx, by, cx, cy = map(long, raw_input().split())

# if the point exists, it must be the intersection of three (chuizhipingfenxian)
# meanwhile, if a->b, b->c and a,b,c on a same circle, then |ab| = |bc|

len_ab = (bx - ax) * (bx - ax) + (by - ay) * (by - ay)
len_bc = (cx - bx) * (cx - bx) + (cy - by) * (cy - by)

if len_ab == len_bc:
    print "Yes"
else:
    print "No"

ax,ay,bx,by,cx,cy=map(int,input().split())
if (ax-bx)**2+(ay-by)**2==(bx-cx)**2+(by-cy)**2:
    print("Yes")
else:
    print("No")

def slope(i,j):
    try:
        return abs(float(j[1]-i[1])/float(j[0]-i[0]))
    except:
        return -200
ax,ay,bx,by,cx,cy=map(int,raw_input().split())
a=(ax,ay)
b=(bx,by)
c=(cx,cy)
if slope(a,b)==slope(b,c):
    print 'No'
else:
    print 'Yes'

class point:
    x=0
    y=0

    def __init__(self,x,y):
        self.x=x
        self.y=y

    def __cmp__(self, b):
        if(self.cmp(b)):
            return -1
        elif b.cmp(self):
            return 1
        else:
            return 0

    def cmp(self, b):
        if (self.x == b.x):
            return self.y < b.y
        return self.x < b.x

    def printf(self):
        return self.x,self.y

def judge(a,b):
    return a.x*b.y==a.y*b.x

def dis(a,b):
    x=a.x*a.x+a.y*a.y
    y=b.x*b.x+b.y*b.y
    return x==y

ax,ay,bx,by,cx,cy=map(int,raw_input().split())
A=[]
A.append(point(ax,ay))
A.append(point(bx,by))
A.append(point(cx,cy))
A=sorted(A)
B=point(A[1].x-A[0].x,A[1].y-A[0].y)
C=point(A[2].x-A[1].x,A[2].y-A[1].y)
if not judge(B,C):
    print 'Yes'
elif dis(B,C):
    print 'Yes'
else:
    print 'No'

##n = int(input())
##a = list(map(int, input().split()))
##print(' '.join(map(str, res)))

[ax, ay, bx, by, cx, cy] = list(map(int, input().split()))
dx1 = ax-bx
dy1 = ay-by
dx2 = cx-bx
dy2 = cy-by
if dx1*dy2 == dx2*dy1 or dx1*dx1+dy1*dy1 != dx2*dx2+dy2&dy2:
    print('no')
else:
    print('yes')

import sys
class Point:
    def __init__(self, x=None, y=None):
        self.x = x
        self.y = y

class Line:
    def __init__(self):
        self.isvertical = None
        self.x = None
        self.k = None
        self.b = None

ax, ay, bx, by, cx, cy = map(int, input().split())
a = Point(ax, ay)
b = Point(bx, by)
c = Point(cx, cy)

def line2points(p1, p2):
    result = Line()
    if(p1.x == p2.x):
        result.isvertical = True
        result.x = p1.x
        return result
    result.k = (p2.y - p1.y)/(p2.x - p1.x)
    result.b = p1.y - ((p1.x * (p2.y - p1.y))/(p2.x - p1.x))
    result.isvertical = False
    return result

def intersection(l1, l2):
    result = Point()
    if(l1.isvertical and l2.isvertical):
        return result
    if(l1.k == l2.k):
        return result
    if(l1.isvertical):
        result.x = l1.x
        result.y = l2.k * result.x + l2.b
        return result
    if(l2.isvertical):
        result.x = l2.x
        result.y = l1.k * result.x + l1.b
        return result
    result.x = (l2.b - l1.b)/(l1.k - l2.k)
    result.y = l1.k * result.x + l1.b
    return result

def d(p1, p2):
    return (p1.x - p2.x)**2 + (p1.y - p2.y)**2

def perline(l, p):
    result = Line()
    if(l.isvertical):
        result.isvertical = False
        result.k = 0
        result.b = p.y
        return result
    if(l.k == 0):
        result.isvertical = True
        result.x = p.x
        return result
    result.k = (-1)/l.k
    result.b = p.y - result.k * p.x
    return result

mab = Point((a.x + b.x)/2, (a.y + b.y)/2)
mbc = Point((b.x + c.x)/2, (b.y + c.y)/2)
ab = line2points(a, b)
bc = line2points(b, c)

perab = perline(ab, mab)
perbc = perline(bc, mbc)

inter = intersection(perab, perbc)
if(inter.x is None and inter.y is None):
    print("No")
    sys.exit()

dist = []
dist.append(d(inter, a))
dist.append(d(inter, b))
dist.append(d(inter, c))
dist = sorted(dist)
if(dist[-1] - dist[0] == 0 and d(c,b) == d(a, b)):
    print("Yes")
else:
    print("No")

def dist(x1,y1,x2,y2):
    d=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)
    return d
ax,ay,bx,by,cx,cy=input().strip().split(' ')
ax,ay,bx,by,cx,cy=[int(ax),int(ay),int(bx),int(by),int(cx),int(cy)]
if(dist(ax,ay,bx,by)==dist(bx,by,cx,cy)):
    print('Yes')
else:
    print('No')

ax, ay, bx, by, cx, cy = map(int, input().split())
ab2 = (ax - bx) * (ax - bx) + (ay - by) * (ay - by)
bc2 = (bx - cx) * (bx - cx) + (by - cy) * (by - cy)

print("YES" if ab2 == bc2 else "NO")

ax, ay, bx, by, cx, cy = map(int, raw_input().split())
ab2 = (ax-bx)*(ax-bx)+(ay-by)*(ay-by)
bc2 = (cx-bx)*(cx-bx)+(cy-by)*(cy-by)
if ab2 == bc2:
	print "Yes"
else:
	print "No"

ax,ay,bx,by,cx,cy=map(int,input().split())

A=ax*ax+ay*ay
B=bx*bx+by*by
C=cx*cx+cy*cy
G=(cy-by)*ax+(ay-cy)*bx+(by-ay)*cx

try:
    x=( (B-C)*ay+(C-A)*by+(A-B)*cy )/(2*G)
    y=( (C-B)*ax+(A-C)*bx+(B-A)*cx )/(2*G)
except:
    print('No')
    exit()

if (ax-x)*(bx-x)+(ay-y)*(by-y) == (bx-x)*(cx-x)+(by-y)*(cy-y):
    print('Yes')
else:
    print('No')

ax, ay, bx, by, cx, cy = map(int, input().split())
if (bx - ax) ** 2 + (by - ay) ** 2 == (bx - cx) ** 2 + (by - cy) ** 2 and (bx - ax)*(cy - by) + (by - ay)*(cx - bx) != 0:
    print('Yes')
else:
    print('No')

from sys import stdin
def dis(x1,y1,x2,y2):
 return (x1-x2)**2 + (y1-y2)**2
x1,y1,x2,y2,x3,y3 = map(int,stdin.readline().split())
s = set()
s.add(dis(x1,y1,x2,y2))
s.add(dis(x1,y1,x3,y3))
s.add(dis(x3,y3,x2,y2))
if len(s)<=2 and (x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2))!=0:
 print 'Yes'
else:
 print 'No'

ax,ay,bx,by,cx,cy = [ int(x) for x in input().split() ]

if (ax - bx) * (ax - bx) + (ay - by) * (ay - by) == (cx - bx) * (cx - bx) + (cy - by) * (cy - by):
    print("Yes")
else:
    print("No")

from math import sqrt

def is_approximately_right_angled(a, b, c):
    a, b, c = sorted([a, b, c])
    return abs(a * a + b * b - c * c) < 0.1

x1,y1,x2,y2,x3,y3=map(int,raw_input().split())
side1 = sqrt((x1 - x2)**2 + (y1-y2)**2)
side2 = sqrt((x2 - x3)**2 + (y2-y3)**2)
side3 = sqrt((x3 - x1)**2 + (y3-y1)**2)

tri= [side1, side2, side3]
#check=is_approximately_right_angled(side1,side2,side3)
tri.sort()
#print check
if tri[0] < tri[1]+tri[2] and tri[0]+tri[1]>tri[2] and tri[2]+tri[0]>tri[1]:
    if (tri[1] == tri[2] or tri[1] == tri[0]):
        print('Yes')
    else:
        print('No')
else:
    print('No')

ax, ay, bx, by, cx, cy = input().split()
ax, ay, bx, by, cx, cy = int(ax), int(ay), int(bx), int(by), int(cx), int(cy)
distant_1 = ((bx - ax) ** 0.5 + (by - ay) ** 0.5) ** 0.5
distant_2 = ((bx - cx) ** 0.5 + (by - cy) ** 0.5) ** 0.5

if distant_1 == distant_2:
    print('Yes')
else:
    print('No')

ax,ay,bx,by,cx,cy=map(int,input().split())
l1=(ax-bx)**2+(ay-by)**2
l2=(cx-bx)**2+(cy-by)**2
if (l2 == l1 ):
    print("yes")
else:
    print("No")

from decimal import *

def is_midpoint(p1,p2,p3):
    if (p1[0]+p2[0])/2==p3[0] and (p1[1]+p2[1])/2==p3[1]:
        return True
    else:
        return False

def distance(p1,p2):
    return (((p2[0]-p1[0])**2)+((p2[1]-p1[1])**2))**0.5

def same_slope(p1,p2,p3):
    #print(distance(p1,p2),p1,p2,(p2[0]-p1[0])**2,(p2[1]-p1[1])**2,distance(p2,p3))
    if is_midpoint(p1,p2,p3) or is_midpoint(p2,p1,p3) or is_midpoint(p1,p3,p2):
        return False
    elif distance(p1,p2)==distance(p2,p3):
        return True
    else:
        return False

a_x,a_y,b_x,b_y,c_x,c_y=map(int,input().split())
p1=[a_x,a_y]
p2=[b_x,b_y]
p3=[c_x,c_y]
if same_slope(p1,p2,p3):
    print("YES")
else:
    print("NO")

import decimal
D = decimal.Decimal
def main():
    l=map(long,raw_input().split())
    dist1=round((D((l[2]-l[0])**2+(l[3]-l[1])**2)).sqrt(),8)
    dist2=round((D((l[4]-l[2])**2+(l[5]-l[3])**2)).sqrt(),8)
    dist3=round((D((l[4]-l[0])**2+(l[5]-l[1])**2)).sqrt(),8)
    if dist1==dist2 and (dist1+dist2)!=dist3:
        print "Yes"
    else:
        print "No"
main()

def get_len_sq(a, b):
    return (a[0] - b[0])**2 + (a[1] - b[1])**2

ax, ay, bx, by, cx, cy = map(int, input().split())
a = (ax, ay)
b = (bx, by)
c = (cx, cy)
f = get_len_sq
if f(a,b) == f(b,c):
    print('Yes')
else:
    print('No')

from math import sqrt
l = raw_input().split()
(ax, ay, bx, by, cx, cy) = [int(x) for x in l]

dab = sqrt((ax - bx)**2 + (ay - by)**2)
dbc = sqrt((bx - cx)**2 + (by - cy)**2)

if dab == dbc:
    print "Yes"
else:
    print "No"

def is_midpoint(p1,p2,p3):
    if (p1[0]+p2[0])/2==p3[0] or (p1[1]+p2[1])/2==p3[1]:
        return True
    else:
        return False

def distance(p1,p2):
    return (((p2[0]-p1[0])**2)+((p2[1]-p1[1])**2))**0.5

def same_slope(p1,p2,p3):
    if is_midpoint(p1,p2,p3) or is_midpoint(p2,p1,p3) or is_midpoint(p1,p3,p2):
        return False
    elif distance(p1,p2)==distance(p2,p3):
        return True
    else:
        return False

a_x,a_y,b_x,b_y,c_x,c_y=map(int,input().split())
p1=[a_x,a_y]
p2=[b_x,b_y]
p3=[c_x,c_y]
if same_slope(p1,p2,p3):
    print("YES")
else:
    print("NO")

import math
a_1,a_2,b_1,b_2,c_1,c_2 = map(int,input().split())
dist_1 = (a_1-b_1)**2 + (a_2-b_2)**2
dist_2 = (a_1-c_1)**2 + (a_2-c_2)**2
dist_3 = (b_1-c_1)**2 + (b_2 - c_2)**2
def checkTriangle(x1, y1, x2, y2, x3, y3):

    # Calculation the area of
    # triangle. We have skipped
    # multiplication with 0.5
    # to avoid floating point
    # computations
    a = (x1 * (y2 - y3) +
         x2 * (y3 - y1) +
         x3 * (y1 - y2))
    if a == 0:
      return True
    else:
      return False
def type(sqa,sqb,sqc):

    if (sqa == sqa + sqb or
        sqb == sqa + sqc or
        sqc == sqa + sqb):
        return True

    elif(sqa > sqc + sqb or
            sqb > sqa + sqc or
            sqc > sqa + sqb):
      return True

    else:
        return False

if checkTriangle(a_1,a_2,b_1,b_2,c_1,c_2)== True:
  print("No")
elif dist_1 == dist_2 and type(dist_1,dist_2,dist_3) == True:
  print("Yes")
elif dist_2 == dist_3 and type(dist_1,dist_2,dist_3) == True:
  print("Yes")
elif dist_3 == dist_1 and type(dist_1,dist_2,dist_3) == True:
  print("Yes")
else:
  print("No")

ax, ay, bx, by, cx, cy = map(long, raw_input().split())
ab = ((ax-bx)**2+(ay-by)**2)**0.5
bc = ((bx-cx)**2+(by-cy)**2)**0.5
if ab==bc and (ay-by)*(cx-ax)+(bx-ax)*(cy-ay)!=0:
    print "Yes"
else:
    print "No"

import math

ax, ay, bx, by, cx, cy = list(map(int, input().split()))

absq = (ax - bx) ** 2 + (ay - by) ** 2
bcsq = (bx - cx) ** 2 + (by - cy) ** 2
acsq = (ax - cx) ** 2 + (ay - cy) ** 2

on_one_line = False

lengths = [math.sqrt(absq), math.sqrt(bcsq), math.sqrt(acsq)]
lengths.sort()
# print(lengths)
if lengths[0] + lengths[1] - lengths[2] < 0.001:
	on_one_line = True

if absq == bcsq and not on_one_line:
	print("Yes")
else:
	print("No")