Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian plane, that defined the set of vertices of some non-degenerate (positive area) parallelogram. Points not necessary were given in the order of clockwise or counterclockwise traversal.

Alex had very nice test for this problem, but is somehow happened that the last line of the input was lost and now he has only three out of four points of the original parallelogram. He remembers that test was so good that he asks you to restore it given only these three points.


-----Input-----

The input consists of three lines, each containing a pair of integer coordinates x_{i} and y_{i} ( - 1000 ≤ x_{i}, y_{i} ≤ 1000). It's guaranteed that these three points do not lie on the same line and no two of them coincide.


-----Output-----

First print integer k — the number of ways to add one new integer point such that the obtained set defines some parallelogram of positive area. There is no requirement for the points to be arranged in any special order (like traversal), they just define the set of vertices.

Then print k lines, each containing a pair of integer — possible coordinates of the fourth point.


-----Example-----
Input
0 0
1 0
0 1

Output
3
1 -1
-1 1
1 1



-----Note-----

If you need clarification of what parallelogram is, please check Wikipedia page:

https://en.wikipedia.org/wiki/Parallelogram

Difficulty: interview

Starter code:

Solutions:
x1, y1 = list(map(int, input().split()))
x2, y2 = list(map(int, input().split()))
x3, y3 = list(map(int, input().split()))
a = set()
a.add(((x1 + x2) - x3, y1 + y2 - y3))
a.add(((x1 + x3) - x2, y1 + y3 - y2))
a.add(((x2 + x3) - x1, y2 + y3 - y1))
print(len(a))
for i in a:
    print(*i)

points = []

for i in range(3):
    points.append(list(map(int, input().split())))

def get4(a, b, c):
    return [
        b[0] + c[0] - a[0],
        b[1] + c[1] - a[1],
    ]

print(3)

for i in range(3):
    points = points[1:] + [points[0]]
    print(' '.join(map(str, get4(*points))))


x1, y1 = list(map(int, input().split()))
x2, y2 = list(map(int, input().split()))
x3, y3 = list(map(int, input().split()))
print(3)
print(x1 + x2 - x3, y1 + y2 - y3)
print(x2 + x3 - x1, y2 + y3 - y1)
print(x1 + x3 - x2, y1 + y3 - y2)



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

print(3)
print(x1+x2-x3, y1+y2-y3)
print(x1+x3-x2, y1+y3-y2)
print(x2+x3-x1, y2+y3-y1)



a, b = map(int, input().split())
c, d = map(int, input().split())
e, f = map(int, input().split())
res = set()
res.add((e + c - a, f + d - b))
res.add((e - c + a, f - d + b))
res.add((c + e - a, d + f - b))
res.add((c - e + a, d - f + b))
res.add((a - c + e, b - d + f))
res.add((a + c - e, b + d - f))
print(len(res))
for elem in res:
    print(elem[0], elem[1])

x1,y1 = (int(i) for i in input().split())
x2,y2 = (int(i) for i in input().split())
x3,y3 = (int(i) for i in input().split())
print(3)
print(x1+(x2-x3),y1+(y2-y3))
print(x1+(x3-x2),y1+(y3-y2))
print(x2+(x3-x1),y2+(y3-y1))

a1,b1 = list(map(int,input().split()))
a2,b2 = list(map(int,input().split()))
a3,b3 = list(map(int,input().split()))
print(3)
a4 = a1+a2-a3
b4 = b1+b2-b3
print(a4,b4)
a4 = a1+a3-a2
b4 = b1+b3-b2
print(a4,b4)
a4 = a3+a2-a1
b4 = b3+b2-b1
print(a4,b4)


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

if abs(ax*(by-cy)+bx*(cy-ay)+cx*(ay-by)) < .0000001:
	print(0)
	return

pos = set()

def t(p1, p2, px):
	return (p2[0]-p1[0]+px[0], p2[1]-p1[1]+px[1])

pos.add(t((ax,ay), (bx,by), (cx, cy)))
pos.add(t((bx,by), (ax,ay), (cx, cy)))
pos.add(t((ax,ay), (cx,cy), (bx, by)))
pos.add(t((cx,cy), (ax,ay), (bx, by)))
pos.add(t((bx,by), (cx,cy), (ax, ay)))
pos.add(t((cx,cy), (bx,by), (ax, ay)))
print(len(pos))
for i in pos:
	print(i[0], i[1])


# 211693RAVMK

def f(p1, p2, p3):
    o = ((p2[0] + p3[0]) // 2, (p2[1] + p3[1]) // 2)
    dx = o[0] - p1[0]
    dy = o[1] - p1[1]
    res = (p1[0] // 2 + dx, p1[1] // 2 + dy)
    return res


def main():
     p1 = tuple([int(x)*2 for x in input().split()])
     p2 = tuple([int(x)*2 for x in input().split()])
     p3 = tuple([int(x)*2 for x in input().split()])
     d2 = (p2[0] - p1[0], p2[1] - p1[1])
     d3 = (p3[0] - p1[0], p3[1] - p1[1])
     if d2[0] * d3[1] - d2[1] * d3[0] == 0:
         print(0)
         return
     res = set()
     res.add(f(p1, p2, p3))
     res.add(f(p2, p1, p3))
     res.add(f(p3, p2, p1))
     print(len(res))
     for p in res:
         print(' '.join(map(str, p)))

 
def __starting_point():
    main()

__starting_point()

x1, y1 = list(map(int, input().split()))
x2, y2 = list(map(int, input().split()))
x3, y3 = list(map(int, input().split()))
line = []
x41 = x3 - (x2 - x1)
y41 = y3 - (y2 - y1)
line += [[x41, y41]]
x41 = x3 - (x1 - x2)
y41 = y3 - (y1 - y2)
line += [[x41, y41]]
x41 = x1 - (x2 - x3)
y41 = y1 - (y2 - y3)
line += [[x41, y41]]
x41 = x1 - (x3 - x2)
y41 = y1 - (y3 - y2)
line += [[x41, y41]]
x41 = x2 - (x1 - x3)
y41 = y2 - (y1 - y3)
line += [[x41, y41]]
x41 = x2 - (x3 - x1)
y41 = y2 - (y3 - y1)
line += [[x41, y41]]
line1 = [line[0]]
for i in range(1, 5):
    good = False
    for j in range(len(line1)):
        if line[i] == line1[j]:
            good = True
    if not good:
        line1 += [line[i]]
print(len(line1))
for i in range(len(line1)):
    print(" ".join(map(str, line1[i])))

c=[[int(i) for i in input().split()] for i in range(3)]
s=set()
s.add((c[0][0]+c[1][0]-c[2][0],c[0][1]+c[1][1]-c[2][1]))
s.add((c[0][0]-c[1][0]+c[2][0],c[0][1]-c[1][1]+c[2][1]))
s.add((c[1][0]+c[0][0]-c[2][0],c[1][1]+c[0][1]-c[2][1]))
s.add((c[1][0]-c[0][0]+c[2][0],c[1][1]-c[0][1]+c[2][1]))
s.add((c[2][0]+c[1][0]-c[0][0],c[2][1]+c[1][1]-c[0][1]))
s.add((c[2][0]-c[1][0]+c[0][0],c[2][1]-c[1][1]+c[0][1]))
print(len(s))
for a,b in s:
    print(a,b)


x1, y1 = map(int, input().split())
x2, y2 = map(int, input().split())
x3, y3 = map(int, input().split())
print(3)
print(x1 + x2 - x3, y1 + y2 - y3)
print(x2 + x3 - x1, y2 + y3 - y1)
print(x1 + x3 - x2, y1 + y3 - y2)

x1, y1 = map(int, input().split())
x2, y2 = map(int, input().split())
x3, y3 = map(int, input().split())
ans = set(())

ans.add((x3 + x1 - x2, y3 + y1 - y2))
ans.add((x3 + x2 - x1, y3 + y2 - y1))

ans.add((x2 + x3 - x1, y2 + y3 - y1))
ans.add((x2 + x1 - x3, y2 + y1 - y3))

ans.add((x1 + x3 - x2, y1 + y3 - y2))
ans.add((x1 + x2 - x3, y1 + y2 - y3))
#print(ans)
print(len(ans))
for i in ans:
    print(' '.join(str(j) for j in i), end='\n')


x1, y1 = map(int, input().split())
x2, y2 = map(int, input().split())
x3, y3 = map(int, input().split())
print(3)
print(x1 + x2 - x3, y1 + y2 - y3)
print(x2 + x3 - x1, y2 + y3 - y1)
print(x3 + x1 - x2, y3 + y1 - y2)

x1,y1=map(int,input().split())
x2,y2=map(int,input().split())
x3,y3=map(int,input().split())
print(3)
print(x1+x2-x3,y1+y2-y3)
print(-x1+x2+x3,-y1+y2+y3)
print(x1-x2+x3,y1-y2+y3)

points = []
for i in range(3):
    points.append(tuple(map(int, input().split())))

ans = set()
for i in range(3):
    for j in range(3):
        if i == j: continue
        vector = (points[j][0] - points[i][0], points[j][1] - points[i][1])
        third = 0 + 1 + 2 - i - j
        ans.add((points[third][0] + vector[0], points[third][1] + vector[1]))

print(len(ans))
for a, b in ans:
    print(a, b)


x1, y1 = map(int, input().split())
x2, y2 = map(int, input().split())
x3, y3 = map(int, input().split())
ans = set()
x4 = x3 + (x1 - x2)
y4 = y3 - (y2 - y1)
x5 = x3 - (x1 - x2)
y5 = y3 + (y2 - y1)
x6 = x1 - (x3 - x2)
y6 = y1 - (y3 - y2)
ans.add((x4, y4))
ans.add((x5, y5))
ans.add((x6, y6))
print(len(ans))
for i in ans:
    print(*i)

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


def mirror(x1, y1, x2, y2, x3, y3):
    x_mid = (x1 + x2) / 2
    if x3 < x_mid:
        x3 += 2 * (x_mid - x3)
    else:
        x3 -= 2 * (x3 - x_mid)
    y_mid = (y1 + y2) / 2
    if y3 < y_mid:
        y3 += 2 * (y_mid - y3)
    else:
        y3 -= 2 * (y3 - y_mid)
    return x3, y3

answer = []
x, y = mirror(x1, y1, x2, y2, x3, y3)
if int(x) == x and int(y) == y:
    answer.append([x, y])
x, y = mirror(x1, y1, x3, y3, x2, y2)
if int(x) == x and int(y) == y:
    answer.append([x, y])
x, y = mirror(x3, y3, x2, y2, x1, y1)
if int(x) == x and int(y) == y:
    answer.append([x, y])
print(len(answer))
for i in answer:
    print(int(i[0]), int(i[1]))

import math

EPSILON = 10 ** -3


class Vector:
    def __init__(self, d=2, coords=[0, 0]):
        self.d = d
        self.coords = coords[:]

    @staticmethod
    def fromEnds(p1, p2):
        n = len(p1)
        assert n == len(p2)
        v = []
        for i in range(n):
            v.append(p2[i] - p1[i])
        return Vector(n, v)

    def apply(self, point):
        return tuple([self.coords[i] + point[i] for i in range(self.d)])

    def inverse(self):
        return Vector(self.d, list(map((lambda x: -x), self.coords)))

    def __repr__(self):
        return "Vector[{}] ({})".format(self.d, self.coords)

    def len(self):
        return math.sqrt(sum(x * x for x in self.coords))

    def __add__(self, other):
        assert self.d == other.d
        return Vector(self.d, [self.coords[i] + other.coords[i] for i in range(self.d)])

    def __eq__(self, other):
        return self.d == other.d and self.coords == other.coords

    def extend(self, k):
        return Vector(self.d, [x * k for x in self.coords])

    def scalmul(self, other):
        assert self.d == other.d
        return sum(self.coords[i] * other.coords[i] for i in range(self.d))

    def cos(self, other):
        return self.scalmul(other) / (self.len() * other.len())

    def is_ort(self, other):
        return self.scalmul(other) <= EPSILON

    def proj_to(self, other):
        return self.scalmul(other) / other.len()

    def proj_from(self, other):
        return other.proj_to(self)


t = lambda: tuple(map(int, input().split()))
p1, p2, p3 = t(), t(), t()
p = [p1, p2, p3]
ans = set()
for i in range(3):
    others = []
    for _p in p:
        if _p != p[i]:
            others.append(_p)

    assert len(others) == 2
    v1 = Vector.fromEnds(others[0], others[1])
    v2 = Vector.fromEnds(others[1], others[0])
    ans.add(v1.apply(p[i]))
    ans.add(v2.apply(p[i]))

print(len(ans))
for item in ans:
    print(" ".join(map(str,item)))

data = [list(map(int, input().split())) for i in range(3)]
print(3)
for i in range(3):
  print(data[i][0]+data[(i+1)%3][0]-data[(i+2)%3][0], data[i][1]+data[(i+1)%3][1]-data[(i+2)%3][1])


import sys

arr = [list( map( int, next(sys.stdin).split() )) for i in range(3)]

def add(a, b):
    return [a[i]+b[i] for i in range(2)]
def sub(a, b):
    return [a[i]-b[i] for i in range(2)]

def div(a, b):
    return [a[i]/b for i in range(2)]

a = add(arr[0], sub(arr[1], arr[2]))
b = add(arr[2], sub(arr[1], arr[0]))
c = add(arr[0], sub(arr[2], arr[1]))

print(3)
print("%d %d"%tuple(a))
print("%d %d"%tuple(b))
print("%d %d"%tuple(c))


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

def f(a, b, p):
    dx = a.x - p.x
    dy = a.y - p.y
    return Point(b.x + dx, b.y + dy)

l = []
for _ in range(3):
    l.append(Point(*list(map(int, input().split()))))

answ = []
answ.append(f(l[0], l[1], l[2]))
answ.append(f(l[0], l[2], l[1]))
answ.append(f(l[1], l[2], l[0]))

print(len(answ))
for i in answ:
    print(i.x, i.y)


l=[]
for i in range(3):
    x,y = list(map(int,input().split()))
    l.append([x,y])

S = set()

def calc(a):
    ans = 0
    n = len(a)
    for i in range(n):
        ans += a[i][0]*a[(i+1)%n][1] - a[i][1]*a[(i+1)%n][0]
    return ans
    
for i in range(3):
    for j in range(3):
        if i== j:
            continue
        for k in range(3):
            if i==k or i == j:
                continue
            x = l[i][0] + l[j][0] - l[k][0]
            y = l[i][1] + l[j][1] - l[k][1]
            new = []
            new.append(l[i])
            new.append(l[k])
            new.append(l[j])
            new.append([x,y])
            if calc(new) > 0: 
                S.add(tuple([x,y]))
            

print(len(S))
for i in S:
    print(i[0],i[1])


import math,sys,re,itertools,pprint,collections,copy
rs,ri,rai,raf=input,lambda:int(input()),lambda:list(map(int, input().split())),lambda:list(map(float, input().split()))

a = rai()
b = rai()
c = rai()

bc = [c[0] - b[0], c[1] - b[1]]
ba = [a[0] - b[0], a[1] - b[1]]
ac = [c[0] - a[0], c[1] - a[1]]

sum2 = lambda a, b: tuple([a[0] + b[0], a[1] + b[1]])
inv = lambda a: [-a[0], -a[1]]

res = set()
res.add(sum2(a, bc))
res.add(sum2(a, inv(bc)))
res.add(sum2(b, ac))
res.add(sum2(b, inv(ac)))
res.add(sum2(c, ba))
res.add(sum2(c, inv(ba)))

print(len(res))
for x, y in res:
    print(x, y)


# Author: Maharshi Gor

def read(t=int):
    return t(input())


def read_arr(t=int):
    return [t(i) for i in str(input()).split()]


t = 1
for i in range(t):
    x1, y1 = read_arr()
    x2, y2 = read_arr()
    x3, y3 = read_arr()

    print(3)
    print(x1 + x2 - x3, y1 + y2 - y3)
    print(x2 + x3 - x1, y2 + y3 - y1)
    print(x3 + x1 - x2, y3 + y1 - y2)