Consider two points, $p=(p_x,p_y)$ and $q=(q_x,q_y)$. We consider the inversion or point reflection, $r=(r_x,r_y)$, of point ${p}$ across point ${q}$ to be a ${180^{\circ}}$ rotation of point ${p}$ around ${q}$.

Given $n$ sets of points ${p}$ and ${q}$, find ${r}$ for each pair of points and print two space-separated integers denoting the respective values of $r_{x}$ and $r_{y}$ on a new line.  

Function Description  

Complete the findPoint function in the editor below.  

findPoint has the following parameters:  

int px, py, qx, qy: x and y coordinates for points ${p}$ and $q}$  

Returns  

int[2]: x and y coordinates of the reflected point ${r}$  

Input Format

The first line contains an integer, $n$, denoting the number of sets of points. 

Each of the $n$ subsequent lines contains four space-separated integers that describe the respective values of $\boldsymbol{p_{x}}$, $p_y$, $q_{x}$, and $q_y$ defining points $p=(p_x,p_y)$ and $q=(q_x,q_y)$. 

Constraints

$1\leq n\leq15$  
$-100\leq p_x,p_y,q_x,q_y\leq100$  

Sample Input
2
0 0 1 1
1 1 2 2

Sample Output
2 2
3 3

Explanation

The graphs below depict points ${p}$, $q}$, and ${r}$ for the $n=2$ points given as Sample Input:

Difficulty: EASY

Solutions:
def symp(Px, Py, Qx, Qy):
	return '{} {}'.format(2 * Qx - Px, 2 * Qy - Py)
for i in range(int(input())):
	print(symp(*[int(i) for i in input().split()]))


T = int(input())
for i in range(T):
	vals = [int(i) for i in input().split()]
	px = vals[0]
	py = vals[1]
	qx = vals[2]
	qy = vals[3]
	rx = 2 * qx - px
	ry = 2 * qy - py
	print(rx, ry)


n = int(input())
output = [0 for i in range(n)]
for i in range(n):
	s = input()
	m = [int(i) for i in s.split()]
	output[i] = [2 * m[2] - m[0], 2 * m[3] - m[1]]
for i in range(n):
	print(output[i][0], output[i][1])


def solve():
	(x, y, x1, y1) = input().split(' ')
	x = int(x)
	y = int(y)
	x1 = int(x1)
	y1 = int(y1)
	x2 = 2 * x1 - x
	y2 = 2 * y1 - y
	print(x2, y2)
t = int(input())
for i in range(0, t):
	solve()


import sys
T = int(sys.stdin.readline())
while T > 0:
	(x1, y1, xp, yp) = [int(x) for x in sys.stdin.readline().split()]
	T -= 1
	print('{} {}'.format(2 * xp - x1, 2 * yp - y1))


import sys
t = sys.stdin.readline()
for i in range(0, int(t)):
	l = sys.stdin.readline().split(' ')
	print(str(2 * int(l[2]) - int(l[0])) + ' ' + str(2 * int(l[3]) - int(l[1])))


def symmetric(points):
	P = points[0]
	Q = points[1]
	R = (Q[0] + Q[0] - P[0], Q[1] + Q[1] - P[1])
	return R
N = int(input())
OUT = []
for i in range(0, N):
	strng = input()
	IN = strng.split(' ')
	IN1 = []
	IN1.append((int(IN[0]), int(IN[1])))
	IN1.append((int(IN[2]), int(IN[3])))
	r = symmetric(IN1)
	OUT.append(r)
for o in OUT:
	s = '%d %d' % (o[0], o[1])
	print(s)


n = int(input())
for i in range(0, n):
	(xa, ya, xb, yb) = map(int, input().split())
	print(2 * xb - xa, 2 * yb - ya)


n = int(input())
for i in range(n):
	points = input().strip().split()
	points = [int(entry) for entry in points]
	x = 2 * points[2] - points[0]
	y = 2 * points[3] - points[1]
	print(x, y)


import re
import sys

def find_it():
	num = sys.stdin.readline()
	for z in range(0, int(num)):
		s = sys.stdin.readline()
		ints = str.split(s, ' ')
		px = int(ints[0])
		py = int(ints[1])
		qx = int(ints[2])
		qy = int(ints[3])
		print(str(qx + (qx - px)) + ' ' + str(qy + (qy - py)))

def main():
	find_it()
main()


import sys
tests = int(sys.stdin.readline().strip())
for t in range(tests):
	(px, py, qx, qy) = [int(s) for s in sys.stdin.readline().strip().split(' ')]
	print(px + 2 * (qx - px), py + 2 * (qy - py))


t = int(input())
for i in range(0, t):
	u = [int(g) for g in input().split()]
	print(2 * u[2] - u[0], 2 * u[3] - u[1])


def main():
	n = int(input())
	for i in range(n):
		line = input().rstrip().split()
		x = 2 * int(line[2]) - int(line[0])
		y = 2 * int(line[3]) - int(line[1])
		print(str(x) + ' ' + str(y))
main()


t = int(input())
for g in range(t):
	line = input().split()
	px = int(line[0])
	py = int(line[1])
	qx = int(line[2])
	qy = int(line[3])
	px = px + 2 * (qx - px)
	py = py + 2 * (qy - py)
	print(str(px) + ' ' + str(py))


for i in range(int(input())):
	c = [int(n) for n in input().split()]
	print(str(2 * c[2] - c[0]) + ' ' + str(2 * c[3] - c[1]))


t = int(input())
for i in range(t):
	(px, py, qx, qy) = [int(j) for j in input().split()]
	print(str(2 * qx - px) + ' ' + str(2 * qy - py))


t = int(input())
for i in range(t):
	(px, py, qx, qy) = map(int, input().split())
	qx -= px
	qy -= py
	sx = 2 * qx + px
	sy = 2 * qy + py
	print(sx, sy)


import sys
T = input()

def endpoint():
	P = input()
	(Px, Py, Qx, Qy) = P.split(' ')
	Ex = 0
	Ey = 0
	Ex = int(Qx) * 2 - int(Px)
	Ey = int(Qy) * 2 - int(Py)
	print(str(Ex) + ' ' + str(Ey))
for i in range(int(T)):
	endpoint()


n = int(input())
cases = []
for i in range(0, n):
	cases.append(list(map(int, input().split())))
for c in cases:
	xOff = c[2] - c[0]
	yOff = c[3] - c[1]
	coord = [c[2] + xOff, c[3] + yOff]
	print(' '.join(list(map(str, coord))))


class Point:

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

	def __str__(self):
		return str(self.x) + ' ' + str(self.y)

	def find_symmetric_point(self, a):
		new_x = a.x + (a.x - self.x)
		new_y = a.y + (a.y - self.y)
		return Point(new_x, new_y)
num_cases = int(input())
for _ in range(num_cases):
	line = [int(x) for x in input().split()]
	p = Point(line[0], line[1])
	q = Point(line[2], line[3])
	print(str(p.find_symmetric_point(q)))


def find_point(p, q):
	print(2 * q[0] - p[0], 2 * q[1] - p[1])
T = int(input())
for _ in range(T):
	(x1, y1, x2, y2) = [int(c) for c in input().split()]
	find_point((x1, y1), (x2, y2))


numCases = int(input())
for i in range(numCases):
	l = input().split(' ')
	px = int(l[0])
	py = int(l[1])
	qx = int(l[2])
	qy = int(l[3])
	sx = 2 * qx - px
	sy = 2 * qy - py
	print(str(sx), str(sy))


for testcases in range(int(input())):
	s = list(map(int, input().split(' ')))
	print(str(2 * s[2] - s[0]) + ' ' + str(2 * s[3] - s[1]))


t = int(input())
for p in range(0, t):
	(Px, Py, Qx, Qy) = input().strip().split()
	Sx = int(Qx) + (int(Qx) - int(Px))
	Sy = int(Qy) + (int(Qy) - int(Py))
	print(Sx, Sy)


import sys
next(sys.stdin)
for line in sys.stdin:
	(Px, Py, Qx, Qy) = map(int, line.strip().split())
	print(2 * Qx - Px, 2 * Qy - Py)


TC = int(input(''))
b = []
for t in range(TC):
	a = input('')
	a = [int(n) for n in a.split(' ')]
	b1 = 2 * a[2] - a[0]
	b2 = 2 * a[3] - a[1]
	print(b1, end=' ')
	print(b2)


from sys import stdin
T = int(stdin.readline())
assert T <= 15
for i in range(T):
	(Px, Py, Qx, Qy) = map(int, stdin.readline().split())
	Sx = 2 * Qx - Px
	Sy = 2 * Qy - Py
	print(Sx, Sy)


t = int(input())
for i in range(t):
	(px, py, qx, qy) = map(int, input().split())
	print(2 * qx - px, 2 * qy - py)


import sys
numtests = int(sys.stdin.readline())
tests = []
for i in range(numtests):
	tests.append(sys.stdin.readline().split(' '))
for i in range(numtests):
	x1 = int(tests[i][0])
	y1 = int(tests[i][1])
	x2 = int(tests[i][2])
	y2 = int(tests[i][3])
	print(2 * x2 - x1, 2 * y2 - y1)


import sys
sys.path
T = int(input())
Ans = []
for t in range(0, T):
	R = input()
	W = R.split(' ', len(R))
	x = 2 * int(W[2]) - int(W[0])
	y = 2 * int(W[3]) - int(W[1])
	U = (x, y)
	Ans.append(U)
for (k, v) in Ans:
	print(k, v)


import sys

def main():
	t = int(sys.stdin.readline())
	for _ in range(t):
		(px, py, qx, qy) = (int(i) for i in sys.stdin.readline().split())
		print(2 * qx - px, 2 * qy - py)
main()


n = int(input())
for k in range(n):
	(px, py, qx, qy) = [int(i) for i in input().split()]
	x = qx + (qx - px)
	y = qy + (qy - py)
	print(x, y)


import sys
import fileinput
lines = [i.strip() for i in fileinput.input()]
n = int(lines.pop(0))
for i in range(n):
	(px, py, qx, qy) = [int(i) for i in lines[i].split()]
	spx = qx + (qx - px)
	spy = qy + (qy - py)
	result = (spx, spy)
	print(*result, sep=' ')


t = int(input())
c = 0
while t > c:
	w = input().split(' ')
	px = int(w[0])
	py = int(w[1])
	qx = int(w[2])
	qy = int(w[3])
	print(qx - px + qx, qy - py + qy)
	c += 1


T = int(input())
for _ in range(T):
	(px, py, qx, qy) = map(int, input().split())
	print(qx * 2 - px, qy * 2 - py)


for _ in range(int(input())):
	(x1, y1, x2, y2) = map(int, input().split())
	x = 2 * x2 - x1
	y = 2 * y2 - y1
	print('{x} {y}'.format(x=x, y=y))


T = int(input())
for t in range(T):
	(Px, Py, Qx, Qy) = [int(x) for x in input().split(' ')]
	print(str(2 * Qx - Px) + ' ' + str(2 * Qy - Py))


import sys
T = int(sys.stdin.readline())
for _ in range(T):
	(Px, Py, Qx, Qy) = list(map(int, sys.stdin.readline().split()))
	(dx, dy) = (Qx - Px, Qy - Py)
	print(Qx + dx, Qy + dy)


T = int(input())
for t in range(T):
	(px, py, qx, qy) = [int(v) for v in input().split()]
	(rx, ry) = (qx + (qx - px), qy + (qy - py))
	print(rx, ry)


for i in range(int(input())):
	(Px, Py, Qx, Qy) = [int(s) for s in input().split()]
	Rx = 2 * Qx - Px
	Ry = 2 * Qy - Py
	print(Rx, Ry)


T = int(input())
for x in range(0, T):
	a = input().split(' ')
	a = [int(x) for x in a]
	px = a[0]
	py = a[1]
	qx = a[2]
	qy = a[3]
	diffx = qx - px
	diffy = qy - py
	zx = qx + diffx
	zy = qy + diffy
	print(str(zx) + ' ' + str(zy))


T = int(input().strip())
for (px, py, qx, qy) in (map(int, input().strip().split()) for i in range(T)):
	(dx, dy) = (qx - px, qy - py)
	print(qx + dx, qy + dy)


T = int(input())
for t in range(T):
	(x1, y1, x2, y2) = str(input()).split()
	x3 = 2 * int(x2) - int(x1)
	y3 = 2 * int(y2) - int(y1)
	print(x3, y3)


numberOfInputs = int(input())
i = 0
while numberOfInputs > i:
	(px, py, qx, qy) = input().split(' ')
	intpx = int(px)
	intpy = int(py)
	intqx = int(qx)
	intqy = int(qy)
	x = 2 * intqx - intpx
	y = 2 * intqy - intpy
	print(x, y)
	i += 1


T = int(input())
for i in range(0, T):
	(Px, Py, Qx, Qy) = [int(x) for x in input().split(' ')]
	Rx = int(Qx + (Qx - Px))
	Ry = int(Qy + (Qy - Py))
	print(Rx, end=' ')
	print(Ry)


def findPoint(points):
	return str(2 * points[2] - points[0]) + ' ' + str(2 * points[3] - points[1])
lines = int(input())
for i in range(lines):
	print(findPoint([int(x) for x in input().split()]))


T = int(input())
for t in range(T):
	(Px, Py, Qx, Qy) = [int(e) for e in input().split()]
	print(str(2 * Qx - Px) + ' ' + str(2 * Qy - Py))


import sys
import math
T = int(sys.stdin.readline())
for _ in range(T):
	points = [int(x) for x in sys.stdin.readline().split(' ')]
	x = points[2] - points[0] + points[2]
	y = points[3] - points[1] + points[3]
	print('%d %d' % (x, y))


import sys
T = int(sys.stdin.readline())
for case in range(T):
	[Px, Py, Qx, Qy] = [int(X) for X in sys.stdin.readline().split()]
	print(Qx - (Px - Qx), Qy - (Py - Qy))


T = int(input())
for t in range(T):
	[x_p, y_p, x_q, y_q] = [int(e) for e in input().split()]
	print(2 * x_q - x_p, 2 * y_q - y_p)


T = int(input())
for t in range(T):
	test = input().split()
	ax = int(test[0])
	ay = int(test[1])
	bx = int(test[2])
	by = int(test[3])
	cx = bx + (bx - ax)
	cy = by + (by - ay)
	print('{} {}'.format(cx, cy))


def prog():
	for i in range(int(input())):
		(px, py, qx, qy) = [int(x) for x in str(input()).split()]
		sx = 2 * qx - px
		sy = 2 * qy - py
		print('%i %i' % (sx, sy))
prog()


t = int(input())
for cases in range(0, t):
	(x1, y1, mx, my) = [int(i) for i in input().strip().split()]
	print(2 * mx - x1, 2 * my - y1)


import sys
input()
for line in sys.stdin:
	(ax, ay, bx, by) = map(int, line.strip().split(' '))
	vx = bx - ax
	vy = by - ay
	print(ax + 2 * vx, ay + 2 * vy)


def otherSide(cent, out):
	delta = abs(cent - out)
	return cent - delta if out > cent else cent + delta
t = int(input())
for testNum in range(t):
	(x1, y1, x2, y2) = [int(val) for val in input().split()]
	print(str(otherSide(x2, x1)) + ' ' + str(otherSide(y2, y1)))


def f(l):
	x = 2 * l[2] - l[0]
	y = 2 * l[3] - l[1]
	return str(x) + ' ' + str(y)
t = int(input())
l = []
for i in range(t):
	s = str(input())
	s1 = s.split()
	for i in range(len(s1)):
		s1[i] = int(s1[i])
	l.append(f(s1))
for i in l:
	print(i)


for i in range(int(input())):
	(Px, Py, Qx, Qy) = map(int, input().split())
	print(Qx + (Qx - Px), Qy + (Qy - Py))


T = int(input())
for i in range(T):
	(px, py, qx, qy) = [int(x) for x in input().split()]
	print(str(2 * qx - px) + ' ' + str(2 * qy - py))


for i in range(int(input())):
	(x1, y1, x2, y2) = [int(x) for x in input().split()]
	print(2 * x2 - x1, 2 * y2 - y1)


T = int(input())
for _ in range(T):
	[px, py, qx, qy] = [int(x) for x in input().split()]
	print(px + 2 * (qx - px), py + 2 * (qy - py))


T = int(input())
for _ in range(T):
	line = input().split()
	(p1x, p1y, qx, qy) = list(map(int, line))
	(p2x, p2y) = (2 * qx - p1x, 2 * qy - p1y)
	print(p2x, p2y)


T = int(input())
for _ in range(T):
	lst_in = input().split()
	Px = int(lst_in[0])
	Py = int(lst_in[1])
	Qx = int(lst_in[2])
	Qy = int(lst_in[3])
	Rx = 2 * Qx - Px
	Ry = 2 * Qy - Py
	print(' '.join([str(Rx), str(Ry)]))


T = int(input())
for _ in range(T):
	points = [int(coord) for coord in input().split(' ')]
	P = (points[0], points[1])
	Q = (points[2], points[3])
	xDiff = Q[0] - P[0]
	yDiff = Q[1] - P[1]
	R = (Q[0] + xDiff, Q[1] + yDiff)
	print(R[0], R[1])


n = int(input())
while n > 0:
	p = []
	p = input().split(' ')
	p = [int(x) for x in p]
	xdiff = p[2] - p[0]
	ydiff = p[3] - p[1]
	finx = p[2] + xdiff
	finy = p[3] + ydiff
	print(finx, finy)
	n -= 1


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


from collections import defaultdict
import re
tests = input()
coords = []
point1 = defaultdict()
point2 = defaultdict()
slope = defaultdict()
for i in range(0, int(tests)):
	coords.append(input())
for x in range(0, len(coords)):
	case = coords[x].split(' ')
	point1 = {'x': int(case[0]), 'y': int(case[1])}
	point2 = {'x': int(case[2]), 'y': int(case[3])}
	slope = {'rise': point2['y'] - point1['y'], 'run': point2['x'] - point1['x']}
	print(str(point2['x'] + slope['run']) + ' ' + str(point2['y'] + slope['rise']))


t = int(input())
assert 1 <= t <= 15
for i in range(t):
	line = input().strip()
	coords = line.split(' ')
	y = str(int(coords[3]) * 2 - int(coords[1]))
	x = str(int(coords[2]) * 2 - int(coords[0]))
	print(x + ' ' + y)


test_cases = int(input())
for i in range(test_cases):
	p = [int(x) for x in input().split(' ')]
	x = p[2] - p[0] + p[2]
	y = p[3] - p[1] + p[3]
	print(str(x) + ' ' + str(y))


testCases = int(input())
for i in range(testCases):
	(px, py, qx, qy) = map(int, input().split())
	dx = qx - px
	dy = qy - py
	print('{} {}'.format(qx + dx, qy + dy))


import sys
x = int(input())
points = []
for i in range(x):
	points.append(input())
	x = list(map(int, points[i].split()))
	xdiff = x[0] - x[2]
	ydiff = x[1] - x[3]
	ref = [x[2] - xdiff, x[3] - ydiff]
	for i in ref:
		sys.stdout.write(str(i) + ' ')
	print()


def f(x, y, x1, y1):
	return [2 * m - n for (n, m) in [[x, x1], [y, y1]]]
for case in range(int(input())):
	for coordinate in f(*[int(x) for x in input().split(' ')]):
		print(coordinate, end=' ')
	print()


def getSymmetricPoint(P, Q):
	(Px, Py) = P
	(Qx, Qy) = Q
	return (2 * Px - Qx, 2 * Py - Qy)
numTestCases = int(input())
for i in range(0, numTestCases):
	[Px, Py, Qx, Qy] = [int(x) for x in input().split()]
	(Sx, Sy) = getSymmetricPoint((Qx, Qy), (Px, Py))
	print(Sx, Sy)


for i in range(int(input())):
	(x1, y1, x2, y2) = map(int, input().split())
	print(2 * x2 - x1, 2 * y2 - y1)


T = int(input())
for case in range(T):
	[px, py, qx, qy] = [int(i) for i in input().split(' ')]
	dx = qx - px
	dy = qy - py
	print(dx + qx, dy + qy)


t = int(input())
coordinates = (input() for i in range(t))
for c in coordinates:
	(px, py, qx, qy) = [int(i) for i in c.split()]
	prime_x = 2 * qx - px
	prime_y = 2 * qy - py
	print(prime_x, prime_y)


T = int(input())
for i in range(T):
	li = str.split(str(input()), ' ', 3)
	px = int(li[0])
	py = int(li[1])
	qx = int(li[2])
	qy = int(li[3])
	sx = 2 * qx - px
	sy = 2 * qy - py
	print(str(sx) + ' ' + str(sy))


def symetric(px, py, qx, qy):
	delta_x = qx - px
	x = qx + delta_x
	y = 2 * qy - py
	return (x, y)
T = int(input())
for i in range(0, T):
	(px, py, qx, qy) = [int(x) for x in input().split()]
	(resultx, resulty) = symetric(px, py, qx, qy)
	print(resultx, resulty)


def symmetric(p, q):
	dx = q[0] - p[0]
	dy = q[1] - p[1]
	return (q[0] + dx, q[1] + dy)
t = int(input())
for _ in range(t):
	(px, py, qx, qy) = [int(x) for x in str(input()).split()]
	p = (px, py)
	q = (qx, qy)
	print(' '.join([str(x) for x in symmetric(p, q)]))


for _ in range(int(input())):
	[Px, Py, Qx, Qy] = map(int, input().split())
	Ax = 2 * Qx - Px
	Ay = 2 * Qy - Py
	print(Ax, Ay)


n = int(input())
for _ in range(n):
	(px, py, qx, qy) = [int(x) for x in input().split()]
	rx = px + 2 * (qx - px)
	ry = py + 2 * (qy - py)
	print(rx, ry)


cases = int(input())
for i in range(cases):
	points = [int(i) for i in input().split()]
	print(2 * points[2] - points[0], 2 * points[3] - points[1])


t = int(input())
for _ in range(t):
	(px, py, qx, qy) = [int(i) for i in input().split()]
	print(qx + (qx - px), qy + (qy - py))


t = int(input())
for idx in range(t):
	i = [int(x) for x in input().split()]
	x = i[2] + i[2] - i[0]
	y = i[3] + i[3] - i[1]
	print(str(x) + ' ' + str(y))


t = int(input())
for i in range(t):
	l = [int(x) for x in input().split()]
	print(2 * l[2] - l[0], 2 * l[3] - l[1])


T = int(input())
for i in range(0, T):
	pq = [int(x) for x in input().split()]
	print(str(pq[2] - pq[0] + pq[2]) + ' ' + str(pq[3] - pq[1] + pq[3]))


T = int(input())
for i in range(T):
	(Px, Py, Qx, Qy) = map(int, input().split())
	print(2 * Qx - Px, 2 * Qy - Py)


def find(lst):
	out = str(lst[2] * 2 - lst[0]) + ' ' + str(lst[3] * 2 - lst[1]) + '\n'
	return out
out = ''
for i in range(int(input())):
	lst = [int(x) for x in input().split()]
	out += str(find(lst))
print(out[:-1])


n = int(input())
for i in range(n):
	inp = input().split()
	print(str(2 * int(inp[2]) - int(inp[0])) + ' ' + str(2 * int(inp[3]) - int(inp[1])))


def calc(x1, y1, x2, y2):
	x3 = x2 + (x2 - x1)
	y3 = y2 + (y2 - y1)
	return (x3, y3)

def main():
	N = int(input())
	for i in range(N):
		(x1, y1, x2, y2) = map(int, input().split())
		(x3, y3) = calc(x1, y1, x2, y2)
		print(x3, y3)
main()


lines = int(input())
invert = lambda x, y: 2 * y - x
for i in range(lines):
	arr = [int(x) for x in input().split(' ')]
	p = arr[:2]
	q = arr[2:]
	print(invert(p[0], q[0]), invert(p[1], q[1]))


def symmetricPoint(pointsList):
	x1 = int(pointsList[0])
	y1 = int(pointsList[1])
	x2 = int(pointsList[2])
	y2 = int(pointsList[3])
	symX = x2 - x1 + x2
	symY = y2 - y1 + y2
	print(symX, symY)
testCases = int(input())
if 1 <= testCases <= 15:
	casesList = []
	for t in range(0, testCases):
		points = input()
		pointsList = points.split()
		casesList.append(pointsList)
	for c in range(len(casesList)):
		symmetricPoint(casesList[c])


import sys
sys.stdin.readline()
for (px, py, qx, qy) in [[int(x) for x in line.strip().split(' ')] for line in sys.stdin.readlines()]:
	rx = qx + (qx - px)
	ry = qy + (qy - py)
	print('%i %i' % (rx, ry))


T = int(input())
for t in range(T):
	(Px, Py, Qx, Qy) = map(int, str(input()).split())
	print(2 * Qx - Px, 2 * Qy - Py)


T = int(input())
for i in range(T):
	test_case = [int(n) for n in input().strip().split()]
	P = [test_case[0], test_case[1]]
	Q = [test_case[2], test_case[3]]
	(x, y) = (0, 1)
	Xo = 2 * Q[x] - P[x]
	Yo = 2 * Q[y] - P[y]
	print(Xo, Yo)


T = int(input())
for test in range(T):
	(P1, P2, Q1, Q2) = [int(x) for x in input().split()]
	R1 = 2 * Q1 - P1
	R2 = 2 * Q2 - P2
	print(R1, R2)


def Projection(Px, Py, Qx, Qy):
	dx = Qx - Px
	dy = Qy - Py
	return [Qx + dx, Qy + dy]
T = int(input())
while T:
	T = T - 1
	(Px, Py, Qx, Qy) = [int(i) for i in input().split()]
	(x, y) = Projection(Px, Py, Qx, Qy)
	print(str(x) + ' ' + str(y))


for x in range(int(input())):
	(px, py, qx, qy) = map(int, input().split())
	ax = qx - px
	ay = qy - py
	ax += qx
	ay += qy
	print(ax, end=' ')
	print(ay)


cases = int(input())
for _ in range(cases):
	(px, py, qx, qy) = (int(n) for n in input().split())
	print(' '.join([str(2 * qx - px), str(2 * qy - py)]))


import sys
T = int(sys.stdin.readline())
for _ in range(T):
	(px, py, qx, qy) = list((int(x) for x in sys.stdin.readline().split(' ')))
	x = qx * 2 - px
	y = qy * 2 - py
	print(x, y)