Ivan decided to prepare for the test on solving integer equations. He noticed that all tasks in the test have the following form:

You are given two positive integers $u$ and $v$, find any pair of integers (not necessarily positive) $x$, $y$, such that: $$\frac{x}{u} + \frac{y}{v} = \frac{x + y}{u + v}.$$

The solution $x = 0$, $y = 0$ is forbidden, so you should find any solution with $(x, y) \neq (0, 0)$.

Please help Ivan to solve some equations of this form.


-----Input-----

The first line contains a single integer $t$ ($1 \leq t \leq 10^3$) — the number of test cases. The next lines contain descriptions of test cases.

The only line of each test case contains two integers $u$ and $v$ ($1 \leq u, v \leq 10^9$) — the parameters of the equation.


-----Output-----

For each test case print two integers $x$, $y$ — a possible solution to the equation. It should be satisfied that $-10^{18} \leq x, y \leq 10^{18}$ and $(x, y) \neq (0, 0)$.

We can show that an answer always exists. If there are multiple possible solutions you can print any.


-----Examples-----

Input
4
1 1
2 3
3 5
6 9
Output
-1 1
-4 9
-18 50
-4 9


-----Note-----

In the first test case: $\frac{-1}{1} + \frac{1}{1} = 0 = \frac{-1 + 1}{1 + 1}$.

In the second test case: $\frac{-4}{2} + \frac{9}{3} = 1 = \frac{-4 + 9}{2 + 3}$.

In the third test case: $\frac{-18}{3} + \frac{50}{5} = 4 = \frac{-18 + 50}{3 + 5}$.

In the fourth test case: $\frac{-4}{6} + \frac{9}{9} = \frac{1}{3} = \frac{-4 + 9}{6 + 9}$.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
answers = []
for _ in range(int(input())):
	(u, v) = map(int, input().split())
	answers.append((-u ** 2, v ** 2))
for answer in answers:
	print(answer[0], answer[1])


t = int(input())
arr = [list(map(int, input().split())) for i in range(t)]
for i in range(t):
	print(arr[i][0] ** 2 * -1, arr[i][1] ** 2)


t = int(input())
nth = []
mth = []
for i in range(t):
	inp = input().split(' ')
	nth.append(int(inp[0]))
	mth.append(int(inp[1]))
for i in range(t):
	print(-1 * nth[i] * nth[i], mth[i] * mth[i])


for _ in range(int(input())):
	(u, v) = map(int, input().split())
	u *= u
	v *= v
	print(u * -1, end=' ')
	print(v)


import sys
fast_input = sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	print(-1 * x * x, y * y)


import sys
input = sys.stdin.readline
t = int(input())
while t > 0:
	n = [int(x) for x in input().split(' ')]
	print(-1 * n[0] * n[0], n[1] * n[1])
	t -= 1


import sys
input = sys.stdin.readline
t = int(input().strip())
for _ in range(t):
	(u, v) = map(int, input().split())
	print(-u ** 2, v ** 2)


import sys

def solve():
	inp = sys.stdin.readline
	(u, v) = map(int, inp().split())
	print(-u * u, v * v)

def main():
	inp = sys.stdin.readline
	for i in range(int(inp())):
		solve()
main()


N = int(input())
for i in range(N):
	A = input().split()
	u = int(A[0])
	v = int(A[1])
	print(-u ** 2, v ** 2)


ans = []
for _ in range(int(input())):
	(q, w) = map(int, input().split(' '))
	ans.append((-q ** 2, w ** 2))
for _ in ans:
	print(*_)


n = int(input())
for i in range(n):
	(u, v) = map(int, input().split())
	print(-u ** 2, v ** 2)


for _ in range(int(input())):
	(u, v) = map(int, input().split())
	y = v ** 2
	x = -1 * u ** 2
	print(x, y)


def solve():
	(u, v) = map(int, input().split())
	print(-u * u, v * v)
t = int(input())
for i in range(t):
	solve()


def solve(u, v):
	return [-u ** 2, v ** 2]
ans = []
for _ in range(int(input())):
	(u, v) = map(int, input().split())
	ans.append(solve(u, v))
for a in ans:
	print(*a)


n = int(input())
for x in range(n):
	(u, v) = [int(y) for y in input().split()]
	print(-1 * u ** 2, v ** 2)


n = int(input())
a = []
for i in range(n):
	(u, v) = map(int, input().split())
	a.append(-1 * u ** 2)
	a.append(v ** 2)
for i in range(0, len(a) // 2):
	print(a[2 * i], a[2 * i + 1])


t = int(input())
k = []
for i in range(t):
	k.append(list(map(int, input().split())))
for d in k:
	print(d[0] * d[0] * -1, d[1] ** 2)


t = int(input())
for i in range(t):
	(u, v) = map(int, input().split())
	y = v ** 2
	print(-u ** 2, y)


def main():
	for _ in range(int(input())):
		(u, v) = map(int, input().split())
		print(f'{-(u * u)} {v * v}')
main()


t = int(input())
ans = []
for i in range(t):
	(u, v) = map(int, input().split())
	for y in range(v ** 2, 10 ** 18 + 1, v ** 2):
		x = -1 * (y // v ** 2) * u ** 2
		if x * v ** 2 == -1 * y * u ** 2:
			break
	ans.append((x, y))
for (x, y) in ans:
	print(x, y)


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	print(-a * a, b * b)


t = int(input())
for _ in range(t):
	(u, v) = map(int, input().split())
	print(-u * u, v * v)


k = int(input())
u = [0] * k
v = [0] * k
for i in range(k):
	(u[i], v[i]) = map(int, input().split())
for i in range(k):
	print(-u[i] ** 2, v[i] ** 2)


n = int(input())
for i in range(n):
	temp = input().split(' ')[:2]
	u = int(temp[0])
	v = int(temp[1])
	x = -1 * (u * u)
	y = v * v
	print(x, y, end=' ')
	print()


def solve(u, v):
	ans = []
	ans.append(-u * u)
	ans.append(v * v)
	return ans
t = int(input())
for i in range(t):
	(u, v) = map(int, input().split())
	ans = solve(u, v)
	print(*ans)


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	print(-(a * a), b * b)


t = int(input())
x = []
for i in range(t):
	m = str(input()).split()
	x.append([-1 * int(m[0]) * int(m[0]), int(m[1]) * int(m[1])])
for i in range(t):
	print(x[i][0], x[i][1])


for i in range(int(input())):
	a = list(map(int, input().split()))
	print(-1 * a[0] * a[0], a[1] * a[1])


def solve(uv):
	u = uv[0]
	v = uv[1]
	x = -u ** 2
	y = v ** 2
	return (x, y)
t = int(input())
for i in range(t):
	s = list(map(int, input().split()))
	(x, y) = solve(s)
	print(x, y)


for _ in range(int(input())):
	(u, v) = map(int, input().split())
	print(-u ** 2, v ** 2)


def main():
	n = int(input())
	l = []
	for i in range(n):
		(a, b) = map(int, input().split())
		l.append([a, b])
	for i in range(n):
		print(f'{-l[i][0] * l[i][0]} {l[i][1] * l[i][1]}')
main()


n = int(input())
for i in range(n):
	(u, v) = tuple(map(int, input().split()))
	x = -u ** 2
	y = v ** 2
	print(x, y)


t = int(input())
answers = []
for _ in range(t):
	arr = list(map(int, input().split()))
	u = arr[0]
	v = arr[1]
	x = int(-1 * (u * u))
	y = int(v * v)
	answers.append(str(x) + ' ' + str(y))
for ans in answers:
	print(ans)


def main():
	count_pairs = int(input())
	res = []
	for i in range(0, count_pairs):
		u_and_v = input().split(' ')
		x = -1 * (int(u_and_v[0]) * int(u_and_v[0]))
		y = int(u_and_v[1]) * int(u_and_v[1])
		res.append(f'{x} {y}')
	for i in range(0, len(res)):
		print(res[i])
main()


t = int(input())
while t > 0:
	t -= 1
	(u, v) = map(int, input().split(' '))
	x = -(u * u)
	y = -(x * v * v) // (u * u)
	t1 = (x * v + y * u) * (u + v)
	t2 = (x + y) * (u * v)
	if t1 == t2:
		print(x, y)


N = int(input())
X = []
Y = []
for i in range(0, N):
	(U, V) = map(int, input().split())
	x = -U ** 2
	y = V ** 2
	X.append(x)
	Y.append(y)
for i in range(N):
	print(X[i], Y[i])


n = int(input())
for i in range(n):
	x = input().split()
	k = int(x[0])
	m = int(x[1])
	a = k * k
	l = m * m
	print(str(-a) + ' ' + str(l))


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	i = -a
	j = b
	g = (-a ** 2 + b ** 2) / (a + b)
	if i + j == g and i != 0 and (j != 0):
		print(-a ** 2, b ** 2)
	else:
		print(-a ** 2 * 2, b ** 2 * 2)


t = int(input())
for i in range(t):
	(u, v) = list(map(int, input().split()))
	if u == v:
		print('-1 1')
	else:
		x = -1 * pow(u, 2)
		y = pow(v, 2)
		if x / u + y / v == (x + y) / (u + v):
			print(x, y)
		else:
			for j in range(2, max(u, v) + 1):
				if x * j / u + y * j / v == (x * j + y * j) / (u + v):
					x *= j
					y *= j
			print(x, y)


t = input()
col = int(t.strip())
arr = []
for i in range(col):
	chi2 = input()
	arr.append(chi2.strip())
for chi in arr:
	(u1, v1) = chi.split(' ')
	u = int(u1)
	v = int(v1)
	x = -(u * u)
	y = v * v
	print(x, y)


n = int(input())
list1 = []
for i in range(n):
	(a1, a2) = map(int, input().split())
	list1.append([-a1 ** 2, a2 ** 2])
for i in list1:
	print(*i)


import math
n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	print(-1 * a ** 2, b ** 2)


t = int(input())
ans = []
for i in range(t):
	(v, b) = map(int, input().split())
	ans.append([-v ** 2, b ** 2])
	print(-v ** 2, b ** 2)


a = int(input())
b = []
for i in range(a):
	b.append(input().split(' '))
for i in range(a):
	print(str(int(b[i][0]) * int(b[i][0]) * -1) + ' ' + str(int(b[i][1]) * int(b[i][1])))


inp1 = int(input())
for i in range(inp1):
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	print('-' + str(a * a) + ' ' + str(b * b))


ans = []
t1 = int(input())
for t in range(t1):
	(u, v) = map(int, input().split())
	zn = u + v
	if u == v:
		(x, y) = (-1 * u, u)
	else:
		(x, y) = (-1 * u ** 2, v ** 2)
	ans.append([x, y])
for i in range(t1):
	print(*ans[i])


for q in range(int(input())):
	(u, v) = map(int, input().split())
	print(-u ** 2, v ** 2)


tst = int(input())
for i in range(tst):
	(x, y) = map(int, input().split())
	print(-(x * x), y * y)


def mathematical():
	t = int(input())
	for i in range(t):
		(U, V) = input().split()
		u = int(U)
		v = int(V)
		a = u * u
		b = v * v
		print('-' + str(a) + ' ' + str(b))
mathematical()


t = int(input())
for i in range(t):
	(u, v) = list(map(int, input().split()))
	print(-u * u, v * v)


for _ in range(int(input().strip())):
	(u, v) = map(int, input().strip().split())
	x = -u * u
	y = v * v
	print(x, y)


num = int(input())
for i in range(num):
	(x, y) = map(int, input().split())
	print('-' + str(x ** 2) + ' ' + str(y ** 2))


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def solve(a, b):
	res = []
	x = -((a + b) * a - a * b)
	y = (a + b) * b - a * b
	res.append(x)
	res.append(y)
	return res
res = []
iter = inp()
i = 0
while i < iter:
	pair = inlt()
	sol = solve(pair[0], pair[1])
	res.append(sol)
	i += 1
for r in res:
	print(str(r[0]) + ' ' + str(r[1]))