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.


-----Input-----

The only line contains six integers a_{x}, a_{y}, b_{x}, b_{y}, c_{x}, c_{y} (|a_{x}|, |a_{y}|, |b_{x}|, |b_{y}|, |c_{x}|, |c_{y}| ≤ 10^9). It's guaranteed that the points are distinct.


-----Output-----

Print "Yes" if the problem has a solution, "No" otherwise.

You can print each letter in any case (upper or lower).


-----Examples-----
Input
0 1 1 1 1 0

Output
Yes

Input
1 1 0 0 1000 1000

Output
No



-----Note-----

In the first sample test, rotate the page around (0.5, 0.5) by $90^{\circ}$.

In the second sample test, you can't find any solution.

Difficulty: MEDIUM
Tags: Geometry

Mathematics

Starter code:

Solutions:
from math import *
(ax, ay, bx, by, cx, cy) = map(int, input().split())
ab = (ax - bx) * (ax - bx) + (ay - by) * (ay - by)
bc = (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')


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')


(ax, ay, bx, by, cx, cy) = map(int, input().split())
abx = ax - bx
aby = ay - by
cbx = cx - bx
cby = cy - by
cross = abx * cby - aby * cbx
if (ax - bx) ** 2 + (ay - by) ** 2 == (bx - cx) ** 2 + (by - cy) ** 2 and cross != 0:
	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')


(ax, ay, bx, by, cx, cy) = list(map(int, input().split()))
dab = (ax - bx) ** 2 + (ay - by) ** 2
dbc = (bx - cx) ** 2 + (by - cy) ** 2
if dab != dbc:
	print('No')
elif ax == bx or bx == cx:
	if ax == bx and bx == cx:
		print('No')
	else:
		print('Yes')
else:
	mab = (ay - by) / (ax - bx)
	mbc = (by - cy) / (bx - cx)
	if mab == mbc:
		print('No')
	else:
		print('Yes')


(ax, ay, bx, by, cx, cy) = map(float, 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 (ax - bx) * (cy - by) - (ay - by) * (cx - bx) != 0:
	print('Yes')
else:
	print('No')


import math

def slope(x1, y1, x2, y2):
	if x2 - x1 == 0:
		return 'undefined'
	return (y2 - y1) / (x2 - x1)

def distance(x1, y1, x2, y2):
	xdiff = x2 - x1
	ydiff = y2 - y1
	return xdiff ** 2 + ydiff ** 2
(x1, x2, y1, y2, z1, z2) = map(int, input().split())
if slope(x1, x2, y1, y2) == slope(y1, y2, z1, z2) == slope(x1, x2, z1, z2):
	print('NO')
elif not distance(x1, x2, y1, y2) == distance(y1, y2, z1, z2):
	print('NO')
else:
	print('YES')


def readln():
	return map(int, input().rstrip().split())
(ax, ay, bx, by, cx, cy) = readln()
dab = (bx - ax) ** 2 + (by - ay) ** 2
dbc = (cx - bx) ** 2 + (cy - by) ** 2
if dab != dbc:
	print('No')
	exit()
if (by - ay) * (cx - bx) == (cy - by) * (bx - ax):
	print('No')
	exit()
print('Yes')


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

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

def same_line(ax, ay, bx, by, cx, cy):
	if (by - ay) * (cx - bx) == (cy - by) * (bx - ax):
		return True
if same_line(ax, ay, bx, by, cx, cy):
	print('No')
elif distance(ax, ay, bx, by) == distance(cx, cy, bx, by):
	print('Yes')
else:
	print('No')


from math import sqrt
(ax, ay, bx, by, cx, cy) = tuple(map(int, input().split()))

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

def pend(x1, x2, y1, y2):
	if x1 - x2 == 0:
		return 10 ** 20
	return (y1 - y2) / (x1 - x2)
if hypot(ax, ay, bx, by) == hypot(cx, cy, bx, by):
	if pend(ax, bx, ay, by) == pend(cx, bx, cy, by):
		print('No')
	else:
		print('Yes')
else:
	print('No')


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


a = list(map(int, input().split()))
if (a[0] - a[2]) ** 2 + (a[1] - a[3]) ** 2 == (a[4] - a[2]) ** 2 + (a[5] - a[3]) ** 2 and ((a[0] + a[4]) / 2 != a[2] or (a[1] + a[5]) / 2 != a[3]):
	print('Yes')
else:
	print('No')


def solve():
	(x1, y1, x2, y2, x3, y3) = map(int, input().split())
	a = [x1, y1]
	b = [x2, y2]
	c = [x3, y3]
	if x1 - x2 >= 0:
		angular1 = (y1 - y2) / (x1 - x2 + 1e-06)
	elif x1 - x2 < 0:
		angular1 = (y1 - y2) / (x1 - x2 - 1e-06)
	if x2 - x3 >= 0:
		angular2 = (y2 - y3) / (x2 - x3 + 1e-06)
	elif x2 - x3 < 0:
		angular2 = (y2 - y3) / (x2 - x3 - 1e-06)
	res = False
	alinhado = False
	if angular1 == angular2:
		alinhado = True
	dAB = (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2
	dAC = (a[0] - c[0]) ** 2 + (a[1] - c[1]) ** 2
	dBC = (c[0] - b[0]) ** 2 + (c[1] - b[1]) ** 2
	if dAB == dBC:
		res = True
	if res and (not alinhado):
		print('Yes')
	else:
		print('No')
solve()


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
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')


def main():
	(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)
	if AB == BC and (not (bx - ax == cx - bx and by - ay == cy - by)):
		print('Yes')
	else:
		print('No')
main()


def dist(x1, y1, x2, y2):
	return (x1 - x2) ** 2 + (y1 - y2) ** 2
(x1, y1, x2, y2, x3, y3) = list(map(int, input().split()))
if dist(x1, y1, x2, y2) == dist(x2, y2, x3, y3):
	if not y3 * (x2 - x1) == (y2 - y1) * x3 + y1 * (x2 - x1) - x1 * (y2 - y1):
		print('YES')
	else:
		print('NO')
else:
	print('NO')


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
from collections import defaultdict
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')

def gx(a, b, c, d, e, f):
	if (a - c) * (b - f) == (a - e) * (b - d):
		return 1
	else:
		return 0
(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) and (not gx(a, b, c, d, e, f)):
	print('Yes')
else:
	print('No')


import math
(a0, a1, b0, b1, c0, c1) = map(int, input().split())
try:
	slope1 = (c1 - a1) / (c0 - a0)
except:
	slope1 = math.inf
try:
	slope2 = (b1 - a1) / (b0 - a0)
except:
	slope2 = math.inf
if (b0 - c0) ** 2 + (b1 - c1) ** 2 == (a0 - b0) ** 2 + (a1 - b1) ** 2 and slope1 != slope2:
	print('Yes')
else:
	print('No')


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


class pp:
	x = 0
	y = 0

def ort(a, b):
	c = pp()
	c.x = a.y - b.y
	c.y = b.x - a.x
	return c

def len(a, b):
	return (a.x - b.x) ** 2 + (a.y - b.y) ** 2
a = pp()
b = pp()
c = pp()
(a.x, a.y, b.x, b.y, c.x, c.y) = map(int, input().split())
d = ort(a, b)
r = ort(b, c)
if d.x * r.y == d.y * r.x or len(a, b) != len(b, c):
	print('No')
else:
	print('Yes')


(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')


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')
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

	def getParent(self, node, start):
		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):
		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)]
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
	elif 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))


(a1, a2, b1, b2, c1, c2) = list(map(int, input().split()))
p = (b1 - c1) * (b1 - c1) + (b2 - c2) * (b2 - c2)
q = (a1 - b1) * (a1 - b1) + (a2 - b2) * (a2 - b2)
r = (a2 - b2) * (a1 - c1) - (a2 - c2) * (a1 - b1)
if p == q and r != 0:
	print('Yes')
else:
	print('No')


(ax, ay, bx, by, cx, cy) = list(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')


(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')


def modulo(x1, y1, x2, y2):
	x = pow(x1 - x2, 2)
	y = pow(y1 - y2, 2)
	return x + y
row = input().split()
ax = int(row[0])
ay = int(row[1])
bx = int(row[2])
by = int(row[3])
cx = int(row[4])
cy = int(row[5])
AB = modulo(ax, ay, bx, by)
AC = modulo(ax, ay, cx, cy)
BC = modulo(bx, by, cx, cy)
if ax * (by - cy) + bx * (cy - ay) + cx * (ay - by) != 0 and (AB == AC or AB == BC):
	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) = list(map(int, input().split()))
if not isTria(ax, ay, bx, by, cx, cy):
	print('No')
elif length(ax, ay, bx, by) == length(bx, by, cx, cy):
	print('Yes')
else:
	print('No')


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')


(a_1, a_2, b_1, b_2, c_1, c_2) = map(int, input().split())
temp_1 = (a_1 - b_1) ** 2 + (a_2 - b_2) ** 2
temp_2 = (b_1 - c_1) ** 2 + (b_2 - c_2) ** 2
if temp_1 != temp_2:
	print('No')
elif b_1 - a_1 == 0 and c_1 - a_1 == 0:
	print('No')
elif b_1 - a_1 == 0 or c_1 - a_1 == 0:
	print('Yes')
else:
	slope_1 = (b_2 - a_2) / (b_1 - a_1)
	slope_2 = (c_2 - a_2) / (c_1 - a_1)
	if slope_1 == slope_2:
		print('No')
	else:
		print('Yes')


(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')


l = list([int(x) for x in input().split()])
(ax, ay, bx, by, cx, cy) = l
d1 = (ax - bx) ** 2 + (ay - by) ** 2
d2 = (cx - bx) ** 2 + (cy - by) ** 2
same_line = cx * (by - ay) - cy * (bx - ax) == ax * by - bx * ay
print('Yes' if d1 == d2 and (not same_line) else 'No')


(x1, y1, x2, y2, x3, y3) = map(float, input().split())
if int(x1 - x2) ** 2 + int(y1 - y2) ** 2 == int(x2 - x3) ** 2 + int(y2 - y3) ** 2 and (y2 - y1) * (x3 - x1) != (y3 - y1) * (x2 - x1):
	print('Yes')
else:
	print('No')


b = [i for i in map(int, input().split())]
a = [b[:2], b[2:4], b[4:]]

def slope(a, b):
	try:
		return (a[1] - b[1]) / (a[0] - b[0])
	except:
		return None

def l(a, b):
	return (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2
if l(a[0], a[1]) == l(a[1], a[2]) and slope(a[0], a[1]) != slope(a[1], a[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')


from sys import stdin, stdout

def readline():
	return stdin.readline().rstrip()

def writeline(s):
	stdout.write(str(s) + '\n')
from math import atan2, isclose, inf, sqrt
from decimal import Decimal
(ax, ay, bx, by, cx, cy) = [int(x) for x in readline().split()]

def dist(p, q):
	return sum((Decimal(px - qx) ** Decimal(2.0) for (px, qx) in zip(p, q)))

def slope(x1, y1, x2, y2):
	dy = y2 - y1
	dx = x2 - x1
	return dy / dx if dx != 0 else inf
line = isclose(slope(ax, ay, bx, by), slope(bx, by, cx, cy))
distance = dist((ax, ay), (bx, by)) == dist((bx, by), (cx, cy))
result = not line and distance
writeline('Yes' if result else 'No')


(a1, a2, b1, b2, c1, c2) = [int(i) for i in input().split()]
if (b2 - a2) ** 2 + (b1 - a1) ** 2 == (c2 - b2) ** 2 + (c1 - b1) ** 2:
	if not b1 - a1:
		if b1 - c1:
			print('Yes')
		else:
			print('No')
	elif not b1 - c1:
		print('Yes')
	elif (b2 - a2) / (b1 - a1) != (b2 - c2) / (b1 - c1):
		print('Yes')
	else:
		print('No')
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:
		print('Yes')
	else:
		print('No')


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


import sys
import os
import math
import re
(ax, ay, bx, by, cx, cy) = map(int, input().split())
a = (ax, ay)
b = (bx, by)
c = (cx, cy)
Dab = (ax - bx) ** 2 + (ay - by) ** 2
Dbc = (cx - bx) ** 2 + (cy - by) ** 2
if Dab == Dbc and (ay - by) * (cx - bx) != (ax - bx) * (cy - by):
	print('Yes')
else:
	print('No')


(x1, y1, x2, y2, x3, y3) = list(map(int, input().split()))
if x1 * y2 + y1 * x3 + x2 * y3 == y1 * x2 + x1 * y3 + y2 * x3:
	print('No')
elif (y1 - y2) ** 2 + (x1 - x2) ** 2 != (y3 - y2) ** 2 + (x3 - x2) ** 2:
	print('No')
else:
	print('Yes')


import math
import sys
import decimal
decimal.getcontext().prec = 100
(ax, ay, bx, by, cx, cy) = list(map(decimal.Decimal, input().split()))
absq = (ax - bx) ** decimal.Decimal(2) + (ay - by) ** decimal.Decimal(2)
bcsq = (bx - cx) ** decimal.Decimal(2) + (by - cy) ** decimal.Decimal(2)
acsq = (ax - cx) ** decimal.Decimal(2) + (ay - cy) ** decimal.Decimal(2)
on_one_line = False
lengths = sorted([absq ** decimal.Decimal(0.5), bcsq ** decimal.Decimal(0.5), acsq ** decimal.Decimal(0.5)])
if lengths[0] + lengths[1] - lengths[2] < sys.float_info.epsilon:
	on_one_line = True
if absq == bcsq and (not on_one_line):
	print('Yes')
else:
	print('No')


a = [int(i) for i in input().split()]
t1 = (a[0] - a[2]) ** 2 + (a[1] - a[3]) ** 2
t2 = (a[4] - a[2]) ** 2 + (a[5] - a[3]) ** 2
t3 = (a[4] - a[0]) ** 2 + (a[5] - a[1]) ** 2
if t1 == t2 and t1 * 4 != t3:
	print('YES')
else:
	print('NO')


import math

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

def right_triangle(ax, ay, bx, by, cx, cy):
	return distance_square(ax, ay, cx, cy) == distance_square(ax, ay, bx, by) + distance_square(bx, by, cx, cy)

def triangle_area(ax, ay, bx, by, cx, cy):
	return ax * (by - cy) + bx * (cy - ay) + cx * (ay - by) != 0
coord = [int(i) for i in input().split(' ')]
(ax, ay, bx, by, cx, cy) = coord
if distance_square(ax, ay, bx, by) == distance_square(bx, by, cx, cy) and triangle_area(ax, ay, bx, by, cx, cy) != 0:
	print('Yes')
elif distance_square(ax, ay, bx, by) == distance_square(bx, by, cx, cy) and right_triangle(ax, ay, bx, by, cx, cy):
	print('Yes')
elif distance_square(ax, ay, bx, by) == distance_square(bx, by, cx, cy) and distance_square(bx, by, cx, cy) == distance_square(cx, cy, ax, ay) and (triangle_area(ax, ay, bx, by, cx, cy) != 0):
	print('Yes')
else:
	print('No')


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')


(ax, ay, bx, by, cx, cy) = map(int, input().split())
if (ax - bx) * (ax - bx) + (ay - by) * (ay - by) == (bx - cx) * (bx - cx) + (by - cy) * (by - cy):
	if ax == bx and bx == cx:
		print('NO')
	elif ax == bx or bx == cx:
		print('YES')
	elif (by - ay) / (bx - ax) * (cy - by) / (cx - bx) >= 0 and abs((by - ay) / (bx - ax) - (cy - by) / (cx - bx)) < pow(10, -13):
		print('NO')
	else:
		print('YES')
else:
	print('NO')


def dis(x1, y1, x2, y2):
	return (x1 - x2) ** 2 + (y1 - y2) ** 2
(xa, ya, xb, yb, xc, yc) = list(map(int, input().split()))
fac1 = xa * yb + xc * ya + xb * yc
fac2 = yb * xc + ya * xb + xa * yc
if fac1 - fac2 == 0:
	print('No')
elif dis(xa, ya, xb, yb) == dis(xb, yb, xc, yc):
	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)) ** 0.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')
elif x == y:
	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):
	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')


(x1, y1, x2, y2, x3, y3) = [int(x) for x in input().split()]
if (x1 - x2) * (y1 - y3) - (x1 - x3) * (y1 - y2) == 0:
	print('No')
	exit()
a = (x2 - x1) ** 2 + (y2 - y1) ** 2
b = (x2 - x3) ** 2 + (y2 - y3) ** 2
if a == b:
	print('Yes')
else:
	print('No')


(ax, ay, bx, by, cx, cy) = [int(i) for i in input().split()]
if (ax - bx) * (ax - bx) + (ay - by) * (ay - by) == (cx - bx) * (cx - bx) + (cy - by) * (cy - by) and (ax - cx) * (by - cy) - (ay - cy) * (bx - cx):
	print('YES')
else:
	print('NO')


import math

def eucli(x1, x2, y1, y2):
	valor = (y1 - x1) ** 2 + (y2 - x2) ** 2
	return valor
entrada1 = input()
vet = entrada1.split(' ')
a1 = int(vet[0])
a2 = int(vet[1])
b1 = int(vet[2])
b2 = int(vet[3])
c1 = int(vet[4])
c2 = int(vet[5])
poss = 'No'
if eucli(a1, a2, b1, b2) == eucli(b1, b2, c1, c2):
	if (a1 + c1) / 2 != b1 or (a2 + c2) / 2 != b2:
		poss = 'Yes'
print(poss)


(x1, y1, x2, y2, x3, y3) = map(int, input().split())
d1 = (x1 - x2) ** 2 + (y1 - y2) ** 2
d2 = (x3 - x2) ** 2 + (y3 - y2) ** 2
if d1 != d2:
	print('NO')
elif x2 == (x1 + x3) // 2 and y2 == (y1 + y3) // 2:
	print('NO')
else:
	print('YES')


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
import sys
input = sys.stdin.readline
scanner = lambda : int(input())
string = lambda : input().rstrip()
get_list = lambda : list(read())
read = lambda : map(int, input().split())
get_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

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

def lcm(a, b):
	return a * b // math.gcd(a, b)

def is_integer(n):
	return math.ceil(n) == math.floor(n)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(beauty, s, n, count):
	pass
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
alphs = 'abcdefghijklmnopqrstuvwxyz'
from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect

def solve():
	(ax, ay, bx, by, cx, cy) = read()
	side1 = (bx - ax) ** 2 + (by - ay) ** 2
	side2 = (cy - by) ** 2 + (cx - bx) ** 2
	if side1 != side2 or (bx - ax == cx - bx and by - ay == cy - by):
		print('NO')
	else:
		print('YES')
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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for i in range(1):
	solve()


import math
import collections
import bisect
import heapq
import time
import random
import itertools
(ax, ay, bx, by, cx, cy) = map(int, input().split())
if (bx - ax) * (cy - by) == (cx - bx) * (by - ay) or (by - ay) ** 2 + (bx - ax) ** 2 != (cy - by) ** 2 + (cx - bx) ** 2:
	print('No')
else:
	print('Yes')


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):
	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_3:
	print('Yes')
else:
	print('No')


def mult_vect(ab, bc):
	return ab[0] * bc[1] - ab[1] * bc[0]
(ax, ay, bx, by, cx, cy) = [int(x) for x in input().strip().split()]
ab = [bx - ax, by - ay]
bc = [cx - bx, cy - by]
if mult_vect(ab, bc) == 0:
	print('No')
elif ab[0] ** 2 + ab[1] ** 2 == bc[0] ** 2 + bc[1] ** 2:
	print('Yes')
else:
	print('No')


(x1, y1, x2, y2, x3, y3) = [int(x) for x in input().split()]

def dist(x1, y1, x2, y2):
	return pow(x1 - x2, 2) + pow(y1 - y2, 2)
if x1 * y2 + y1 * x3 + x2 * y3 == x3 * y2 + y3 * x1 + x2 * y1:
	print('No')
elif dist(x1, y1, x2, y2) == dist(x2, y2, x3, y3):
	print('Yes')
else:
	print('No')


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:
	if (by - ay) * (cx - bx) == (cy - by) * (bx - ax):
		print('No')
	else:
		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')


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')


(x1, y1, x2, y2, x3, y3) = map(int, input().split())
if (y2 - y1) * (x3 - x1) == (y3 - y1) * (x2 - x1):
	print('No')
	exit(0)
m = (x1 - x2) ** 2 + (y1 - y2) ** 2
p = (x2 - x3) ** 2 + (y2 - y3) ** 2
if m == p:
	print('Yes')
	exit(0)
print('No')


a = [int(i) for i in input().split()]
if (a[0] - a[2]) ** 2 + (a[1] - a[3]) ** 2 != (a[4] - a[2]) ** 2 + (a[5] - a[3]) ** 2:
	print('No')
elif (a[2] - a[0]) * (a[5] - a[1]) - (a[4] - a[0]) * (a[3] - a[1]) == 0:
	print('No')
else:
	print('Yes')


(a_x, a_y, b_x, b_y, c_x, c_y) = map(int, input().split())
if (a_x - b_x) ** 2 + (a_y - b_y) ** 2 == (c_x - b_x) ** 2 + (c_y - b_y) ** 2 and (c_x - a_x) * (b_y - a_y) != (c_y - a_y) * (b_x - a_x):
	print('Yes')
else:
	print('No')


(a_x, a_y, b_x, b_y, c_x, c_y) = map(int, input().split())
d_1 = (a_x - b_x) ** 2 + (a_y - b_y) ** 2
d_2 = (b_x - c_x) ** 2 + (b_y - c_y) ** 2
d = (b_y - a_y) * (b_x - c_x) - (b_y - c_y) * (b_x - a_x)
if d_1 == d_2 and d:
	print('yes')
else:
	print('no')


from math import *
(ax, ay, bx, by, cx, cy) = list(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 d(x, y, xx, yy):
	return (x - xx) ** 2 + (y - yy) ** 2
(x1, y1, x2, y2, x3, y3) = map(int, input().split())
print(['NO', 'YES'][d(x1, y1, x2, y2) == d(x2, y2, x3, y3) and (y2 - y1) * (x3 - x2) != (y3 - y2) * (x2 - x1)])


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')


def findCircle(x1, y1, x2, y2, x3, y3):
	try:
		x12 = x1 - x2
		x13 = x1 - x3
		y12 = y1 - y2
		y13 = y1 - y3
		y31 = y3 - y1
		y21 = y2 - y1
		x31 = x3 - x1
		x21 = x2 - x1
		sx13 = x1 ** 2 - x3 ** 2
		sy13 = y1 ** 2 - y3 ** 2
		sx21 = x2 ** 2 - x1 ** 2
		sy21 = y2 ** 2 - y1 ** 2
		f = (sx13 * x12 + sy13 * x12 + sx21 * x13 + sy21 * x13) // (2 * y31 * x12 - y21 * x13)
		g = (sx13 * y12 + sy13 * y12 + sx21 * y13 + sy21 * y13) // (2 * (x31 * y12 - x21 * y13))
		c = -x1 ** 2 - y1 ** 2 - 2 * g * x1 - 2 * f * y1
		h = -g
		k = -f
		sqr_of_r = h * h + k * k - c
		r = sqr_of_r ** 0.5
	except Exception:
		return False
	return True
(x1, y1, x2, y2, x3, y3) = map(int, input().split())
m = 1000000007
if findCircle(x1, y1, x2, y2, x3, y3):
	if ((x1 - x2) ** 2 % m + (y1 - y2) ** 2 % m) % m == ((x2 - x3) ** 2 % m + (y2 - y3) ** 2 % m) % m:
		print('Yes')
	else:
		print('No')
else:
	print('No')


import math

class p(object):

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

def dist(a, b):
	return (a.x - b.x) ** 2 + (a.y - b.y) ** 2

def sq(a, b, c):
	return a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y)
t = list(map(int, input().split()))
a = p(t[0], t[1])
b = p(t[2], t[3])
c = p(t[4], t[5])
if dist(a, b) != dist(b, c) or sq(a, b, c) == 0:
	print('NO')
else:
	print('YES')


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


(a1, a2, b1, b2, c1, c2) = map(int, input().split())
ab = (b1 - a1) ** 2 + (b2 - a2) ** 2
bc = (c1 - b1) ** 2 + (c2 - b2) ** 2
try:
	k1 = (c2 - b2) / (c1 - b1)
except ZeroDivisionError:
	k1 = 100000000000.0
try:
	k2 = (b2 - a2) / (b1 - a1)
except ZeroDivisionError:
	k2 = 100000000000.0
if k1 == k2:
	print('No')
elif ab == bc:
	print('Yes')
else:
	print('No')


vals = input().split()
abx = int(vals[0]) - int(vals[2])
aby = int(vals[1]) - int(vals[3])
bcx = int(vals[2]) - int(vals[4])
bcy = int(vals[3]) - int(vals[5])
if int(vals[0]) + int(vals[4]) == 2 * int(vals[2]) and int(vals[1]) + int(vals[5]) == 2 * int(vals[3]):
	print('NO')
elif abx * abx + aby * aby == bcx * bcx + bcy * bcy:
	print('YES')
else:
	print('NO')


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


import sys
import math
(ax, ay, bx, by, cx, cy) = [int(x) for x in sys.stdin.readline().strip().split(' ')]

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

def slope(ax, ay, bx, by):
	if bx - ax == 0:
		return float('inf')
	return (by - ay + 0.0) / (bx - ax)

def collinear(ax, ay, bx, by, cx, cy):
	if slope(ax, ay, bx, by) == slope(bx, by, cx, cy):
		return True
	else:
		return False
if dist(ax, ay, bx, by) == dist(bx, by, cx, cy) and (not collinear(ax, ay, bx, by, cx, cy)):
	print('yes')
else:
	print('no')


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
(ax, ay, bx, by, cx, cy) = [int(x) for x in input().split()]

def distance(x1, y1, x2, y2):
	return pow(x1 - x2, 2) + pow(y1 - y2, 2)
distAB = distance(ax, ay, bx, by)
distBC = distance(bx, by, cx, cy)
delta1 = (by - ay) * (cx - ax)
delta2 = (cy - ay) * (bx - ax)
isColinear = False
if delta1 == delta2:
	isColinear = True
if distAB == distBC and (not isColinear):
	print('Yes')
else:
	print('No')


import math
(ax, ay, bx, by, cx, cy) = list(map(int, input().split()))
ba = [ax - bx, ay - by]
bc = [cx - bx, cy - by]
ba_mul_bc = (ba[0] * bc[0] + ba[1] * bc[1]) ** 2
ba_dist = ba[0] ** 2 + ba[1] ** 2
bc_dist = bc[0] ** 2 + bc[1] ** 2
dist_ab = (ax - bx) ** 2 + (ay - by) ** 2
dist_bc = (bx - cx) ** 2 + (by - cy) ** 2
if dist_ab == dist_bc and ba_mul_bc != ba_dist * bc_dist and (ba_mul_bc + ba_dist * bc_dist != 0):
	print('Yes')
else:
	print('No')


(x1, y1, x2, y2, x3, y3) = list(map(int, input().split(' ')))

def main():
	b1 = (x2 - x1) ** 2 + (y2 - y1) ** 2 == (x3 - x2) ** 2 + (y3 - y2) ** 2
	b2 = (y3 - y1) * (x2 - x1) != (y2 - y1) * (x3 - x1)
	return b1 and b2
print('Yes' if main() else 'No')


(a1, a2, b1, b2, c1, c2) = map(int, input().split())
if (b1 - a1) * (c2 - a2) - (c1 - a1) * (b2 - a2) == 0:
	print('No')
elif (a1 - b1) ** 2 + (a2 - b2) ** 2 == (b1 - c1) ** 2 + (b2 - c2) ** 2:
	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]]
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')


x = [int(a) for a in input().split()]
p = (x[2] - x[0]) * (x[5] - x[3]) != (x[3] - x[1]) * (x[4] - x[2])
q = (x[2] - x[0]) ** 2 + (x[3] - x[1]) ** 2 == (x[4] - x[2]) ** 2 + (x[5] - x[3]) ** 2
if p and q:
	print('Yes')
else:
	print('No')


from math import sqrt

def distance(x1, y1, x2, y2):
	return (x1 - x2) ** 2 + (y1 - y2) ** 2
(a, b, x, y, c, d) = [int(element) for element in input().split(' ')]
if distance(x, y, a, b) == distance(x, y, c, d) and (b - y) * (x - c) - (y - d) * (a - x) != 0:
	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 and (not (ax - cx) * (by - cy) == (bx - cx) * (ay - cy)):
	print('YES')
else:
	print('NO')


def gx(a, b, c, d, e, f):
	if (a - c) * (b - f) == (a - e) * (b - d):
		return 1
	else:
		return 0
(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) and (not gx(a, b, c, d, e, f)):
	print('Yes')
else:
	print('No')


data = tuple(map(int, input().split()))
a = (data[0], data[1])
b = (data[2], data[3])
c = (data[4], data[5])

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

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

def m(a, b):
	return a[0] * b[1] - a[1] * b[0]
print('NO' if d(a, b) != d(b, c) or m(v(a, b), v(b, c)) == 0 else 'YES')


def sqr(a):
	return a * a
(ax, ay, bx, by, cx, cy) = list(map(int, input().split()))
if sqr(bx - ax) + sqr(by - ay) == sqr(bx - cx) + sqr(by - cy) and (not (bx == (ax + cx) / 2 and by == (ay + cy) / 2)):
	print('Yes')
else:
	print('No')


s = [int(x) for x in input().split()]
(a, b, c) = (s[:2], s[2:4], s[4:])

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

def same_line(a, b, c):
	return (b[1] - a[1]) * (c[0] - a[0]) == (c[1] - a[1]) * (b[0] - a[0])
print('Yes' if sqdist(a, b) == sqdist(b, c) and (not same_line(a, b, c)) else 'No')


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


(ax, ay, bx, by, cx, cy) = map(int, input().split())
a = (bx - ax, by - ay)
da = a[0] ** 2 + a[1] ** 2
b = (cx - ax, cy - ay)
db = b[0] ** 2 + b[1] ** 2
c = (cx - bx, cy - by)
dc = c[0] ** 2 + c[1] ** 2
if (cx - ax) * (by - ay) == (cy - ay) * (bx - ax) or da != dc:
	print('No')
else:
	print('Yes')


(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')


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())
ux = cx - bx
uy = cy - by
vx = bx - ax
vy = by - ay
if uy * vx == vy * ux or ux ** 2 + uy ** 2 != vx ** 2 + vy ** 2:
	print('No')
else:
	print('Yes')


(x1, y1, x2, y2, x3, y3) = map(int, input().split())
ab = (x1 - x2) ** 2 + (y1 - y2) ** 2
bc = (x3 - x2) ** 2 + (y3 - y2) ** 2
if (x1 - x2) * (y3 - y2) - (x3 - x2) * (y1 - y2) == 0 or ab != bc:
	print('No')
else:
	print('Yes')


def read_ints():
	return [int(i) for i in input().split()]
coords = read_ints()
(a, b, c) = [(coords[i], coords[i + 1]) for i in range(0, len(coords), 2)]

def length_sqr(a, b):
	return (a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2
if length_sqr(a, b) != length_sqr(b, c):
	print('No')
elif (c[0] - b[0]) * (b[1] - a[1]) == (c[1] - b[1]) * (b[0] - a[0]):
	print('No')
else:
	print('Yes')


import math
a = list(map(int, input().split()))
d1 = (a[0] - a[2]) ** 2 + (a[1] - a[3]) ** 2
d2 = (a[4] - a[2]) ** 2 + (a[5] - a[3]) ** 2
d3 = (a[4] - a[0]) ** 2 + (a[5] - a[1]) ** 2
if d1 != d2:
	print('NO')
elif max(d1, d2, d3) == d1 + d2 + d3 // 2:
	print('NO')
else:
	print('YES')


import math
(ax, ay, bx, by, cx, cy) = map(int, input().strip().split(' '))
d1 = (bx - ax) ** 2 + (by - ay) ** 2
d2 = (cx - bx) ** 2 + (cy - by) ** 2
if bx != ax:
	m1 = (by - ay) / (bx - ax)
else:
	m1 = 12345
if cx != bx:
	m2 = (cy - by) / (cx - bx)
else:
	m2 = 12345
if d1 == d2 and m1 != m2:
	print('yes')
else:
	print('no')


import math
(ax, ay, bx, by, cx, cy) = input().split(' ')
ax = int(ax)
ay = int(ay)
bx = int(bx)
by = int(by)
cx = int(cx)
cy = int(cy)
if (ax - bx) * (by - cy) == (ay - by) * (bx - cx):
	print('No')
	exit()
dist_ab = (ax - bx) ** 2 + (ay - by) ** 2
dist_bc = (bx - cx) ** 2 + (by - cy) ** 2
if dist_ab == dist_bc:
	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:
	if ax - bx == bx - cx and ay - by == by - cy:
		print('No')
	else:
		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) = [int(x) for x in input().split()]
if (ax - bx) * (ax - bx) + (ay - by) * (ay - by) == (cx - bx) * (cx - bx) + (cy - by) * (cy - by):
	if ax == bx or bx == cx:
		if ax == cx:
			print('No')
		else:
			print('Yes')
	elif (ay - by) / (ax - bx) != (by - cy) / (bx - cx):
		print('Yes')
	else:
		print('No')
else:
	print('No')


def dist(x1, y1, x2, y2):
	return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)
inputedRow = input().split(' ')
ax = int(inputedRow[0])
bx = int(inputedRow[2])
cx = int(inputedRow[4])
ay = int(inputedRow[1])
by = int(inputedRow[3])
cy = int(inputedRow[5])
ab = dist(ax, ay, bx, by)
ac = dist(ax, ay, cx, cy)
bc = dist(bx, by, cx, cy)
if ax * (by - cy) + bx * (cy - ay) + cx * (ay - by) != 0 and (ab == ac or ab == bc):
	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')


def isequaldist(xa, ya, xb, yb, xc, yc):
	return (xb - xa) ** 2 + (yb - ya) ** 2 == (xc - xb) ** 2 + (yc - yb) ** 2

def on_the_same_line(xa, ya, xb, yb, xc, yc):
	return (xb - xa) * (yc - ya) - (xc - xa) * (yb - ya) == 0
coords = tuple(map(int, input().split()))
print(('No', 'Yes')[isequaldist(*coords) and (not on_the_same_line(*coords))])


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


(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())
if (ax - cx) * (ay - by) - (ax - bx) * (ay - cy) == 0:
	print('no')
elif (ax - bx) ** 2 + (ay - by) ** 2 == (bx - cx) ** 2 + (by - cy) ** 2:
	print('yes')
else:
	print('no')


def main():
	(a1, a2, b1, b2, c1, c2) = map(int, input().split())
	ans = True
	if (a1 - b1) * (a2 - c2) - (a1 - c1) * (a2 - b2) == 0:
		ans = False
	ab = [b1 - a1, b2 - a2]
	bc = [b1 - c1, b2 - c2]
	mod1 = ab[0] ** 2 + ab[1] ** 2
	mod2 = bc[0] ** 2 + bc[1] ** 2
	if mod1 != mod2:
		ans = False
	if ans:
		print('Yes')
	else:
		print('No')
main()


from math import gcd
(ax, ay, bx, by, cx, cy) = map(int, input().split())

def slope(x1, y1, x2, y2):
	dx = x2 - x1
	dy = y2 - y1
	g = gcd(dx, dy)
	dx /= g
	dy /= g
	return (dx, dy)

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

def collinear(x1, y1, x2, y2, x3, y3):
	return slope(x1, y1, x2, y2) == slope(x2, y2, x3, y3)
print('Yes' if dis(ax, ay, bx, by) == dis(bx, by, cx, cy) and (not collinear(ax, ay, bx, by, cx, cy)) else 'No')


from math import fabs
EPS = 10 ** (-6)

def equal(a, b):
	return fabs(a - b) < EPS

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

def triangle_area(ax, ay, bx, by, cx, cy):
	return ax * (by - cy) + bx * (cy - ay) + cx * (ay - by)

def main():
	(ax, ay, bx, by, cx, cy) = (int(x) for x in input().split())
	if equal(dist_sq(ax, ay, bx, by), dist_sq(bx, by, cx, cy)) and (not equal(triangle_area(ax, ay, bx, by, cx, cy), 0.0)):
		print('Yes')
	else:
		print('No')
main()


(ax, ay, bx, by, cx, cy) = [int(x) for x in input().split()]
if ax * by + ay * cx + bx * cy == cx * by + cy * ax + bx * ay:
	det = True
else:
	det = False
if det == True:
	print('No')
	quit()
if (ax - bx) * (ax - bx) + (ay - by) * (ay - by) == (cx - bx) * (cx - bx) + (cy - by) * (cy - by):
	print('Yes')
else:
	print('No')


(ax, ay, bx, by, cx, cy) = map(int, input().split())
try:
	v1 = (by - ay) / (bx - ax)
except:
	v1 = '?'
try:
	v2 = (cy - by) / (cx - bx)
except:
	v2 = '?'
if abs(ax - bx) ** 2 + abs(ay - by) ** 2 == abs(bx - cx) ** 2 + abs(by - cy) ** 2 and v1 != v2:
	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)])


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')


(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) = input().split()
(ax, ay, bx, by, cx, cy) = (int(ax), int(ay), int(bx), int(by), int(cx), int(cy))
distant_1 = (ax - bx) ** 2 + (ay - by) ** 2
distant_2 = (bx - cx) ** 2 + (by - cy) ** 2
abx = bx - ax
aby = by - ay
bcx = cx - bx
bcy = cy - by
if distant_1 != distant_2:
	print('No')
if distant_1 == distant_2:
	if abx * bcy == aby * bcx:
		print('No')
	else:
		print('Yes')


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')


def dist(x1, y1, x2, y2):
	return (x1 - x2) ** 2 + (y1 - y2) ** 2
(ax, ay, bx, by, cx, cy) = [int(x) for x in input().split()]
ab = dist(ax, ay, bx, by)
ac = dist(ax, ay, cx, cy)
bc = dist(bx, by, cx, cy)
if ax * (by - cy) + bx * (cy - ay) + cx * (ay - by) != 0 and (ab == ac or ab == bc):
	print('Yes')
else:
	print('No')


t = list(map(int, input().split()))
(a, b, x, y) = [t[i + 2] - t[i] for i in range(4)]
print(['Yes', 'No'][a ** 2 + b ** 2 != x ** 2 + y ** 2 or (a == x and b == y)])


(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()


import os
import sys
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')
from math import gcd, ceil

def prod(a, mod=10 ** 9 + 7):
	ans = 1
	for each in a:
		ans = ans * each % mod
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if not True else 1):
	(x1, y1, x2, y2, x3, y3) = map(int, input().split())
	notcol = x1 * (y2 - y3) - y1 * (x2 - x3) + x2 * y3 - x3 * y2
	if (y3 - y2) ** 2 + (x3 - x2) ** 2 == (x2 - x1) ** 2 + (y2 - y1) ** 2 and notcol:
		print('Yes')
	else:
		print('No')


L = list(map(int, input().split()))
x = (L[0] - L[2]) * (L[1] - L[5]) - (L[0] - L[4]) * (L[1] - L[3])
if x == 0:
	print('No')
else:
	y = (L[0] - L[2]) ** 2 + (L[1] - L[3]) ** 2
	z = (L[4] - L[2]) ** 2 + (L[5] - L[3]) ** 2
	if y == z:
		print('Yes')
	else:
		print('No')


x = input()
a = [int(k) for k in x.split()]
flag = 1
dist = (a[2] - a[0]) * (a[2] - a[0]) + (a[3] - a[1]) * (a[3] - a[1])
dist1 = (a[5] - a[3]) * (a[5] - a[3]) + (a[4] - a[2]) * (a[4] - a[2])
s1 = (a[3] - a[1]) * (a[4] - a[2])
s2 = (a[5] - a[3]) * (a[2] - a[0])
if s1 == s2:
	flag = 0
if flag == 1 and dist == dist1:
	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')


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] = 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')


(ax, ay, bx, by, cx, cy) = list(map(int, input().split()))
ax -= bx
ay -= by
cx -= bx
cy -= by
num = 0
qwe = 0
if ax ** 2 + ay ** 2 == cx ** 2 + cy ** 2:
	num = 1
if ax * cy - ay * cx == 0:
	qwe = 1
if num and (not qwe):
	print('YES')
else:
	print('NO')


(x1, y1, x2, y2, x3, y3) = map(int, input().split())
if abs(x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) > 0:
	if (x2 - x1) ** 2 + (y2 - y1) ** 2 == (x3 - x2) ** 2 + (y3 - y2) ** 2:
		print('Yes')
	else:
		print('No')
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')


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

def check(a, b, c, d, e, f):
	if (d - b) * (e - c) == (f - d) * (c - a):
		return 0
	return 1
S = input()
(a, b, c, d, e, f) = map(int, S.split())
if l(a, b, c, d) == l(c, d, e, f) and check(a, b, c, d, e, f):
	print('Yes')
else:
	print('No')


from typing import List
INF = float('inf')
NINF = float('-inf')

def read_string():
	return input()

def read_string_line():
	return [x for x in input().split(' ')]

def read_int_line():
	return [int(x) for x in input().split(' ')]

def read_int():
	return int(input())

def get_int_arr(s):
	return [int(x) for x in s.split()]

def get_sum(acc, l, r):
	return acc[r] - acc[l]
P = int(1000000000.0 + 7)

def exgcd(x, y):
	if y == 0:
		return (x, 1, 0)
	(g, a, b) = exgcd(y, x % y)
	t = x // y
	return (g, b, a - t * b)

def inv(x):
	(g, a, b) = exgcd(x, P)
	return a

def calc_acc(arr):
	ans = [0]
	for a in arr:
		ans.append(a + ans[-1])
	return ans

class Point:

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

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

	def __add__(self, other):
		return Point(self.x + other.x, self.y + other.y)

	def __mul__(self, other):
		return Point(self.x * other, self.y * other)

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

	def cross(self, other):
		return self.x * other.y - self.y * other.x

	def abs(self):
		return self.abs2() ** 0.5

	def abs2(self):
		return self.dot(self)

	def dist(self, other):
		return (self - other).abs()

	def dist2(self, other):
		return (self - other).abs2()

	def __str__(self):
		return 'Point(%s, %s)' % (self.x, self.y)

def get_point(line):
	(x, y) = get_int_arr(line)
	return Point(x, y)
lines: List[str] = [*open(0)]
(ax, ay, bx, by, cx, cy) = get_int_arr(lines[0])
a = Point(ax, ay)
b = Point(bx, by)
c = Point(cx, cy)
ok = (a - b).abs2() == (b - c).abs2() and (a + c - b * 2).abs() != 0
print('%s' % ('Yes' if ok else 'No'))


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')
main()


entrada = list(map(int, input().split(' ')))
x = [entrada[0], entrada[2], entrada[4]]
y = [entrada[1], entrada[3], entrada[5]]

def colinear():
	ux = x[1] - x[0]
	uy = y[1] - y[0]
	vx = x[2] - x[1]
	vy = y[2] - y[1]
	return ux * vy - uy * vx == 0

def sq2(i, j):
	dx = x[i] - x[j]
	dy = y[i] - y[j]
	return dx ** 2 + dy ** 2
if colinear():
	print('No')
elif sq2(0, 1) == sq2(1, 2):
	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))
lAB = (bx - ax) ** 2 + (by - ay) ** 2
lBC = (cx - bx) ** 2 + (cy - by) ** 2
if lAB == lBC and (by - ay) * (cx - bx) != (cy - by) * (bx - ax):
	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 (ax - bx) ** 2 + (ay - by) ** 2 == (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())
ab2 = (ax - bx) * (ax - bx) + (ay - by) * (ay - by)
bc2 = (bx - cx) * (bx - cx) + (by - cy) * (by - cy)
one_line = (ax - bx) * (by - cy) == (ay - by) * (bx - cx)
print('YES' if ab2 == bc2 and (not one_line) else 'NO')


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


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


from fractions import Fraction
(xa, ya, xb, yb, xc, yc) = map(int, input().split())
if xa * (yb - yc) + xb * (yc - ya) + xc * (ya - yb) == 0:
	print('NO')
elif (xa - xb) ** 2 + (ya - yb) ** 2 == (xb - xc) ** 2 + (yb - yc) ** 2:
	print('YES')
else:
	print('NO')


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')


(a1, a2, b1, b2, c1, c2) = map(int, input().split())
a = (a1 - b1) ** 2 + (a2 - b2) ** 2
b = (c1 - b1) ** 2 + (c2 - b2) ** 2
c = (c1 - a1) ** 2 + (c2 - a2) ** 2
if a != b or (b1 == (a1 + c1) // 2 and b2 == (a2 + c2) // 2) or (a1 == (b1 + c1) // 2 and a2 == (b2 + c2) // 2) or (c1 == (a1 + b1) // 2 and c2 == (a2 + b2) // 2):
	print('NO')
else:
	print('YES')


(ax, ay, bx, by, cx, cy) = [int(i) for i in input().split()]
l1 = (ax - bx) * (ax - bx) + (ay - by) * (ay - by)
l2 = (ax - cx) * (ax - cx) + (ay - cy) * (ay - cy)
l3 = (bx - cx) * (bx - cx) + (by - cy) * (by - cy)
if ax * (by - cy) + bx * (cy - ay) + cx * (ay - by) != 0 and (l1 == l2 or l1 == l3):
	print('yes')
else:
	print('no')


(ax, ay, bx, by, cx, cy) = map(int, input().split())
if (bx - ax) * (cy - ay) - (cx - ax) * (by - ay) == 0:
	print('No')
	exit()

def chk(x1, y1, x2, y2):
	return x1 * x1 + y1 * y1 == x2 * x2 + y2 * y2
if chk(ax - bx, ay - by, cx - bx, cy - by):
	print('Yes')
else:
	print('No')


import os
import sys
from io import BytesIO, IOBase

def main():
	a = [int(x) for x in input().split()]
	a[5] -= a[1]
	a[4] -= a[0]
	a[3] -= a[1]
	a[2] -= a[0]
	(a[0], a[1]) = (0, 0)
	if (a[2] - a[0]) ** 2 + (a[3] - a[1]) ** 2 != (a[2] - a[4]) ** 2 + (a[5] - a[3]) ** 2:
		print('NO')
		exit(0)
	if not a[5] * a[2] == a[4] * a[3]:
		print('YES')
		exit(0)
	print('NO')
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')
main()