Theofanis has a riddle for you and if you manage to solve it, he will give you a Cypriot snack halloumi for free (Cypriot cheese).

You are given an integer $n$. You need to find two integers $l$ and $r$ such that $-10^{18} \le l < r \le 10^{18}$ and $l + (l + 1) + \ldots + (r - 1) + r = n$.


-----Input-----

The first line contains a single integer $t$ ($1 \le t \le 10^4$) — the number of test cases.

The first and only line of each test case contains a single integer $n$ ($1 \le n \le 10^{18}$).


-----Output-----

For each test case, print the two integers $l$ and $r$ such that $-10^{18} \le l < r \le 10^{18}$ and $l + (l + 1) + \ldots + (r - 1) + r = n$.

It can be proven that an answer always exists. If there are multiple answers, print any.


-----Examples-----

Input
7
1
2
3
6
100
25
3000000000000
Output
0 1
-1 2 
1 2 
1 3 
18 22
-2 7
999999999999 1000000000001


-----Note-----

In the first test case, $0 + 1 = 1$.

In the second test case, $(-1) + 0 + 1 + 2 = 2$.

In the fourth test case, $1 + 2 + 3 = 6$.

In the fifth test case, $18 + 19 + 20 + 21 + 22 = 100$.

In the sixth test case, $(-2) + (-1) + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 = 25$.

Source: codeforces | Difficulty: EASY
Tags: Mathematics


Solutions:
import io, os
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def main(t):
	n = int(input())
	print(-n + 1, n)
T = int(input())
t = 1
while t <= T:
	main(t)
	t += 1


test = int(input())
for _ in range(0, test):
	k = int(input())
	if k == 1:
		print(0, 1)
	else:
		print(-(k - 1), k)


import os
from io import BytesIO, IOBase
import sys
import math

def split(word):
	return [char for char in word]

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def main():
	for i in range(int(input())):
		n = int(input())
		print(-1 * n + 1, n)
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()


test_count = int(input())
results = []
for test_round in range(test_count):
	n = int(input())
	results.append((-1 * (n - 1), n))
for (result1, result2) in results:
	print(result1, result2)


n = int(input())
for x in range(n):
	x = int(input())
	print(1 - x, x)


def getlistint():
	return list(map(int, stdin.readline().split()))

def getmapint():
	return map(int, stdin.readline().split())

def getliststr():
	return list(stdin.readline().split())

def getint():
	return int(stdin.readline().strip())

def getstr():
	return stdin.readline().strip()

def pr(s):
	stdout.write(str(s) + '\n')

def prlist(l):
	stdout.write(' '.join(list(map(str, l))) + '\n')
from sys import stdin, stdout
from math import sqrt
for _ in range(getint()):
	n = getint()
	pr(str(-n + 1) + ' ' + str(n))


import os
import sys
from io import BytesIO, IOBase

def solve():
	n = int(input())
	print(-1 * (n - 1), n)

def main():
	t = 1
	t = int(input())
	for _ in range(t):
		solve()
BUFFER_SIZE = 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, BUFFER_SIZE))
			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, BUFFER_SIZE))
			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()


import math
for _ in range(int(input())):
	a = int(input())
	print(-(a - 1), a)


t = int(input())
while t:
	n = int(input())
	print(-n + 1, n)
	t -= 1


T = int(input())
while T:
	N = int(input())
	if N > 0:
		print(-(N - 1), N)
	elif N < 0:
		print(N, -(N + 1))
	else:
		print(0)
	T -= 1


t = int(input())
while t:
	n = int(input())
	if n < 0:
		print(n, -n - 1)
	elif n == 0:
		print(-1, 1)
	else:
		print(-n + 1, n)
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	print(-n + 1, n)


Input = '\n7\n1\n2\n3\n6\n100\n25\n3000000000000\n'[1:-1].split('\n')
t = int(input())
for i in range(t):
	n = int(input())
	print(-(n - 1), n)


from os import path
from sys import stdin, stdout
if path.exists('tc.txt'):
	stdin = open('tc.txt', 'r')

def gmi():
	return map(int, stdin.readline().strip().split())

def gms():
	return map(str, stdin.readline().strip().split())

def gari():
	return list(map(int, stdin.readline().strip().split()))

def gart():
	return tuple(map(int, stdin.readline().strip().split()))

def gars():
	return list(map(str, stdin.readline().strip().split()))

def gs():
	return stdin.readline().strip()

def gls():
	return list(stdin.readline().strip())

def gi():
	return int(stdin.readline())

def solve():
	n = gi()
	return (-n + 1, n)
tc = gi()
while tc:
	tc -= 1
	print(*solve())


for i in range(int(input())):
	a = int(input())
	if a == 2:
		print(-1, 2)
		continue
	if a % 2 == 1:
		print(a // 2, a // 2 + 1)
		continue
	x = a
	while a % 2 == 0:
		a = a // 2
	if a == 1:
		print(-1 * x + 1, x)
	else:
		print(x // a - a // 2, x // a + a // 2)


a = int(input())
l = []
for i in range(a):
	b = int(input())
	l += [b]
for i in range(a):
	print(1 - l[i], l[i])


for i in range(int(input())):
	a = int(input())
	print(1 - a, a)


from collections import Counter, defaultdict, deque
from sys import stdin, stdout
from heapq import heapify, heappop, heappush
import io, os, sys
input = stdin.readline
from collections import OrderedDict
from bisect import bisect_left, bisect_right
mod = 10 ** 9 + 7

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

def listinput():
	return [int(i) for i in input().split()]

def intinput():
	return int(input())

def strinput():
	return input().strip()

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

def writ(ss):
	stdout.write(str(ss) + '\n')

def mult(a, b, mod):
	return a % mod * (b % mod) % mod
for test in range(intinput()):

	def solve():
		n = intinput()
		return (-n + 1, n)
	print(*solve())


for i in range(int(input())):
	n = int(input())
	if n % 2 != 0:
		a = n // 2
		print(a, ' ', a + 1)
	elif n % 3 == 0:
		b = n // 3
		print(b - 1, ' ', b + 1)
	elif n % 5 == 0:
		c = n // 5
		print(c - 2, ' ', c + 2)
	else:
		print(-n + 1, ' ', n)


for _ in range(int(input())):
	n = int(input())
	print(-n + 1, ' ', n)


n = int(input())
for i in range(n):
	x = int(input())
	print(-1 * (x - 1), x, sep=' ')


x = int(input())
cases = []
for i in range(0, x):
	cases.append(int(input()))
for i in range(0, x):
	print(str(-cases[i] + 1) + ' ' + str(cases[i]))


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
inp_vars_int = lambda : map(int, input().split())
inp_list_int = lambda : list(map(int, input().split()))
t = int(input())
for _ in range(t):
	n = int(input())
	print(1 - n, n)


for i in range(int(input())):
	n = int(input())
	if n == 0:
		print(-1, 1)
	else:
		print(-(n - 1), n)


import sys
import math
from bisect import bisect_left
import heapq
from collections import deque
from itertools import product, permutations
import random

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()

def C(n, k, mod):
	return FACT(n, mod) * pow(FACT(k, mod) * FACT(n - k, mod) % mod, mod - 2, mod) % mod

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)
mod = 998244353
for _ in range(II()):
	n = II()
	print(-n + 1, n)


import os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
for _ in range(int(input())):
	n = int(input())
	x = 2
	while n % 2 == 0:
		x *= 2
		n //= 2
	a = (x + n - 1) // 2
	b = (x - n + 1) // 2
	if b == a:
		b = -b + 1
	print(b, a)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
from collections import defaultdict as dd
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
stdmap = lambda : map(int, stdstr().split())
stdarr = lambda : list(map(int, stdstr().split()))
mod = 1000000007
for _ in range(stdint()):
	n = stdint()
	r = n
	l = -(n - 1)
	print(l, r)


for u in range(int(input())):
	n = int(input())
	print(-(n - 1), n)


x = int(input())
i = 0
while i < x:
	l = int(input())
	t = (l - 1) * -1
	print(f'{t} {l}')
	i += 1


import queue
from math import inf, gcd, floor, sqrt, ceil, log, log2, log10, factorial
import sys
from collections import *
from random import *
from itertools import *
sys.setrecursionlimit(99999)
eps = sys.float_info.epsilon
P = 2
INF = 1000000000.0 + 1
MOD = 10 ** 9 + 7

def is_prime(n):
	if n == 0 or n == 1:
		return False
	d = 2
	while d * d <= n:
		if n % d == 0:
			return False
		d += 1
	return True

def div_up(n, k):
	if n % k == 0:
		return n // k
	else:
		return n // k + 1

def num_len(n, base=10):
	if n == 0:
		return 1
	return int(floor(log(n, base) + 1))

def dfs_sample(graph, cl, p, v):
	cl[v] = 1
	for to in graph[v]:
		if cl[to] == 1 and p[v] != to:
			pass
		elif cl[to] == 0:
			p[to] = v
			dfs_sample(graph, cl, p, to)
	cl[v] = 2

def down(a):
	for i in range(1, len(a)):
		if a[i] > a[i - 1]:
			return False
	return True

def up(a):
	for i in range(1, len(a)):
		if a[i] < a[i - 1]:
			return False
	return True

def code(c):
	return ord(c) - 32

def _hash_(s):
	(res, p) = (0, 1)
	for i in range(len(s)):
		res += code(s[i]) * p
		res %= MOD
		p *= P
		p %= MOD
	return res % MOD

def remove_edge(v, u, graph):
	graph[v].remove(u)
	graph[u].remove(v)
b = True

def dfs_stack(start, graph, visited, flags):
	global b
	stack = []
	visited[start] = True
	stack.append(start)
	while len(stack) != 0:
		v = stack.pop()
		if not flags[v]:
			b = False
		for to in graph[v]:
			if not visited[to]:
				visited[to] = True
				stack.append(to)

def all_eq(a):
	for i in range(len(a) - 1):
		if a[i] != a[i + 1]:
			return False
	return True

def kmp(s, pr):
	n = len(s)
	pr[0] = 0
	for i in range(1, n):
		j = pr[i - 1]
		while j > 0 and s[i] != s[j]:
			j = pr[j - 1]
		if s[i] == s[j]:
			j += 1
		pr[i] = j

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

def gcd_advanced(a, b):
	if a == 0:
		return (0, 1, b)
	(x1, y1, g) = gcd_advanced(b % a, a)
	return (y1 - x1 * (b // a), x1, g)

def solve():
	n = int(input())
	print(-(n - 1), n)
for _ in range(int(input())):
	solve()

def debug():
	pass


import sys
import math
from bisect import bisect_right as br
from itertools import combinations as cb

def int_arr():
	return list(map(int, sys.stdin.readline().strip().split()))

def str_arr():
	return list(map(str, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	print(-(n - 1), n)


n = int(input())
for i in range(n):
	m = int(input())
	print(*[1 - m, m])


def solution():
	for t in range(int(input())):
		n = int(input())
		(l, r) = (0, 0)
		l = -(n - 1)
		r = n
		print('{0:} {1:}'.format(l, r))
	return
solution()


t = int(input())
d = {}
for i in range(t):
	n = int(input())
	d[i] = str(-(n - 1)) + ' ' + str(n)
for i in range(t):
	print(d[i])


a = int(input())
i = int(1)
while i <= a:
	b = int(input())
	print(str(1 - b) + ' ' + str(b))
	i += 1


t = int(input())
for tt in range(t):
	n = int(input())
	print(-n + 1, n)


t = int(input())
while t > 0:
	n = int(input())
	x = n - 1
	x = -x
	print(x, n)
	t -= 1


n = int(input())
for i in range(n):
	b = int(input())
	if b % 2 != 0:
		print(b // 2, b // 2 + 1)
	else:
		j = 2
		while b % j == 0:
			j *= 2
		j = j // 2
		if j == b:
			print(-b + 1, b)
		elif j % 2 == 0 and b // j % 2 != 0:
			l = b // j // 2
			print(j - l, j + l)
		elif j % 2 != 0 and b // j % 2 == 0:
			l = j // 2
			print(b // j - l, b // j + l)


t = int(input())
for tc in range(t):
	n = int(input())
	print(-(n - 1), n)


def myfunction():
	t = int(input())
	for i in range(t):
		num = int(input())
		if num == 0:
			print(-1, 1)
		else:
			print(-(num - 1), num)
myfunction()


def solve():
	n = int(input())
	if n > 0:
		return (-n + 1, n)
	if n < 0:
		return (n, -n - 1)
	return (-1, 1)
import sys
input = lambda : sys.stdin.readline().rstrip()
t = int(input())
for i in range(t):
	print(*solve())


t = int(input())
while t > 0:
	n = int(input())
	l = -1 * n + 1
	r = n
	print(l)
	print(r)
	t = t - 1


t = int(input())
for test in range(t):
	n = int(input())
	print(-n + 1, n)


from sys import stdin
input = stdin.readline
for _ in range(int(input())):
	n = int(input())
	print(1 - n, n)


from sys import stdin, stdout, setrecursionlimit
from io import BytesIO, IOBase
setrecursionlimit(10000)

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		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
		self.BUFSIZE = 8192

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

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

	def flush(self):
		if self.writable:
			self.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')
(stdin, stdout) = (IOWrapper(stdin), IOWrapper(stdout))
input = lambda : stdin.readline().rstrip('\r\n')
inp = lambda : int(input())
st = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
int_arr = lambda : list(map(int, input().strip().split()))
str_arr = lambda : list(map(str, input().split()))
get_str = lambda : map(str, input().strip().split())
get_int = lambda : map(int, input().strip().split())
get_float = lambda : map(float, input().strip().split())
mod = 1000000007
for _ in range(inp()):
	n = inp()
	print(-(n - 1), n)


n = int(input())
for j in [int(input()) for i in range(n)]:
	print(f'{-(j - 1)} {j}')


import sys
import io
import math
import collections
import decimal
import itertools
import bisect
import heapq

def input():
	return sys.stdin.readline()[:-1]
INF = 10 ** 10

def get_divisors(n):
	lower_divisors = []
	upper_divisors = []
	i = 1
	while i * i <= n:
		if n % i == 0:
			lower_divisors.append(i)
			if i != n // i:
				upper_divisors.append(n // i)
		i += 1
	return lower_divisors + upper_divisors[::-1]

def solve(N):
	return [-(N - 1), N]
T0 = int(input())
for _ in range(T0):
	N = int(input())
	print(*solve(N))


import math
c = int(input())
b = 0
while b < c:
	d = int(input())
	print(-d + 1, d)
	b = b + 1


from sys import stdin

def read_input():
	n = int(stdin.readline())
	return (n,)

def solve(n):
	answer = f'{-n + 1} {n}'
	return answer

def main():
	t = int(stdin.readline())
	for _ in range(t):
		input = read_input()
		answer = solve(*input)
		print(answer)
main()


n = int(input())
l = list()
for i in range(n):
	l.append(int(input()))
for j in l:
	print(1 - j, j)


c = int(input())
while c:
	target = int(input())
	print(-(target - 1), target)
	c -= 1


n = int(input())
for i in range(n):
	t = int(input())
	assert not abs(t) > 1e+18
	if t == 0:
		print(-1, 1)
	elif t < 0:
		print(t, t * -1 - 1)
	else:
		print(t * -1 + 1, t)


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	n = int(input())
	print(-n + 1, n)


import math
t = int(input())
for i in range(t):
	n = int(input())
	if n == 1:
		print(0, 1)
	if n == -1:
		print(-1, 0)
	if n == 0:
		print(-1, 1)
	x = 2 * n
	for j in range(1, math.floor(math.sqrt(x))):
		if x % j == 0:
			k = x // j - j
			if k % 2 != 0:
				l = (k + 1) // 2
				r = x // j - l
				if l != r and (l + r) * (r - l + 1) == x:
					print(l, r)
					break
				l = (-k + 1) // 2
				r = j - l
				if l != r and (l + r) * (r - l + 1) == x:
					print(l, r)
					break


t = int(input())
n_vals = []
ans = {}
for a1 in range(t):
	nex = int(input())
	n_vals.append(nex)
for a2 in n_vals:
	print(int(-a2 + 1), ' ', int(a2))


t = int(input())
for _ in range(t):
	n = int(input())
	if n == 0:
		print(-1, 1)
	elif n > 0:
		print(1 - n, n)
	else:
		print(n, -1 - n)


from sys import stdin
input = stdin.readline
import math
test = int(input())
for _ in range(test):
	n = int(input())
	(l, r) = (1 - n, n)
	print(l, r)


def main():
	T = int(input())
	for k in range(T):
		n = int(input())
		print(f'{-n + 1} {n}')
main()


T = int(input())
for i in range(T):
	n = int(input())
	print(str(-n + 1) + ' ' + str(n))


from sys import stdin, stdout

def main():
	n = int(stdin.readline())
	p = []
	for i in range(n):
		p.append([int(x) for x in stdin.readline().split()])
	for i in p:
		r = -1 * (i[0] - 1)
		l = i[0]
		print(r, ' ', l)
main()


import sys
inp = sys.stdin.readline
for i in range(int(inp())):
	n = int(inp())
	if n == 1:
		print('0 1')
	else:
		print(-n + 1, n)


t = int(input())
if t < 1:
	print('Неверное значение t')
	raise SystemExit
res = []
for i in range(t):
	n = int(input())
	res.append([-(n - 1), n])
for r in res:
	print(r[0], r[1])


n = int(input())
a = []
for i in range(n):
	x = int(input())
	b = -x + 1
	a.append((b, x))
for i in range(0, n):
	print(a[i][0], a[i][1])


t = int(input())
nums = []
for i in range(t):
	num = int(input())
	nums.append(num)
for num in nums:
	print(-num + 1, num)


for _ in range(int(input())):
	N = int(input())
	r = N
	l = -(N - 1)
	print(l, r)


import sys
input = sys.stdin.readline

def solve():
	n = int(input())
	return (-(n - 1), n)
for _ in range(int(input())):
	print(*solve())


test = []
t = int(input())
for i in range(t):
	test.append(int(input()))
for i in range(t):
	print(-1 * (test[i] - 1), test[i])


t = int(input())
n = []
for i in range(t):
	m = int(input())
	n.append(m)
for j in n:
	l = -(j - 1)
	r = j
	print(l, j)


import sys
input = sys.stdin.readline

def inp():
	return int(input())
t = inp()
while t > 0:
	n = inp()
	print(-n + 1, n)
	t = t - 1


import sys
import os
from math import ceil, floor, sqrt, gcd, factorial, log, log2
from io import BytesIO, IOBase
from collections import Counter
from itertools import permutations, combinations
from bisect import bisect
from functools import reduce
inf = int(10000000000.0)
BUFSIZE = 8192
inp = lambda : int(input())
mp = lambda : map(int, input().split())
ls = lambda : list(map(int, input().split()))
sls = lambda : list(sorted(list(map(int, input().split()))))

def main():
	for _ in range(int(input())):
		n = int(input())
		ans = 0
		ans = -(n - 1)
		print(ans, n)

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


w = int(input())
l = []
for i in range(w):
	k = int(input())
	l.append(k)
for i in l:
	print(-(i - 1), i)


n = int(input())
for i in range(n):
	x = int(input())
	print(str(-(x - 1)) + ' ' + str(x))


m = int(input())
l = []
for i in range(m):
	a = int(input())
	if a - 1 == 0:
		l.append(f'{a - 1} {a}')
	else:
		l.append(f'-{a - 1} {a}')
for i in l:
	print(i)


t = int(input())
r = []
for i in range(t):
	n = int(input())
	p = []
	p.append(str(-(n - 1)))
	p.append(str(n))
	q = ' '.join(map(str, p))
	r.append(q)
for j in range(len(r)):
	print(r[j])


import sys, os.path, math
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def hcf(a, b):
	if a % b == 0:
		return b
	return hcf(b, a % b)
for t in range(int(input())):
	n = int(input())
	print(-n + 1, n)


import math
import os
import sys
from sys import *
from decimal import *
from io import BytesIO, IOBase
from itertools import *
from collections import *
from array import *
import random
M = 10 ** 9 + 7
import heapq
import bisect
from functools import lru_cache
from queue import PriorityQueue
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')

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def fsep():
	return map(float, inp().split())

def inpu():
	return int(inp())

def binarySearch(arr, n, key):
	left = 0
	right = n - 1
	while left <= right:
		mid = (right + left) // 2
		if arr[mid] == key:
			return mid
		if arr[mid] <= key:
			left = mid + 1
		else:
			right = mid - 1
	return -1

def sumofdigits(n):
	n = str(n)
	s1 = 0
	for i in n:
		s1 += int(i)
	return s1

def perfect_square(n):
	s = math.sqrt(n)
	if s == int(s):
		return True
	return False

def luckynumber(x, n, a):
	if x > 0:
		a.append(x)
	if x > 10 ** 9:
		return a
	elif x < 1000000000000.0:
		luckynumber(x * 10 + 4, n, a)
		luckynumber(x * 10 + 7, n, a)

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

def query1(l, r):
	if l >= r:
		return -1
	print('?', l + 1, r + 1)
	sys.stdout.flush()
	return int(input()) - 1

def answer(p):
	print('!', p + 1)
	sys.stdout.flush()
	exit()

def rse(arr, n):
	stack = []
	ans = []
	for i in range(n - 1, -1, -1):
		if len(stack) == 0:
			ans.append(n)
		else:
			while len(stack) != 0:
				if stack[-1][0] >= arr[i]:
					stack.pop()
				else:
					break
			if len(stack) == 0:
				ans.append(n)
			else:
				ans.append(stack[-1][1])
		stack.append([arr[i], i])
	ans.reverse()
	return ans

def lse(arr, n):
	stack = []
	ans = []
	for i in range(n):
		if len(stack) == 0:
			ans.append(-1)
		else:
			while len(stack) != 0:
				if stack[-1][0] >= arr[i]:
					stack.pop()
				else:
					break
			if len(stack) == 0:
				ans.append(-1)
			else:
				ans.append(stack[-1][1])
		stack.append([arr[i], i])
	return ans

def mah(arr):
	max1 = 0
	p = rse(arr, len(arr))
	q = lse(arr, len(arr))
	for i in range(len(arr)):
		a = (p[i] - q[i] - 1) * arr[i]
		max1 = max(a, max1)
	return max1

def maxSumIS(arr, n):
	msis = arr.copy()
	for i in range(1, n):
		for j in range(i):
			if arr[i] > arr[j] and msis[i] < msis[j] + arr[i]:
				msis[i] = msis[j] + arr[i]
	c = max(msis)
	p = 5
	return c

def binarysearch2(arr, target):
	lo = 0
	hi = len(arr) - 1
	while lo <= hi:
		mid = (lo + hi) // 2
		if arr[mid] == target:
			if mid != len(arr) - 1:
				if arr[mid + 1] != target:
					return mid
				else:
					lo += 1
			else:
				return mid
			continue
		if arr[mid] > target:
			hi = mid - 1
		else:
			lo = mid + 1

def nge(arr, n):
	stack = []
	ans = []
	for i in range(n - 1, -1, -1):
		if len(stack) == 0:
			ans.append(-1)
		else:
			while len(stack) > 0:
				if stack[-1][0] < arr[i]:
					stack.pop()
				else:
					break
			if len(stack) == 0:
				ans.append(-1)
			else:
				ans.append(stack[-1][1])
		stack.append([arr[i], i])
	ans.reverse()
	return ans

def alperm(nums, path, result):
	if not nums:
		result.add(tuple(path))
		return
	for i in range(0, len(nums)):
		alperm(nums[:i] + nums[i + 1:], path + [nums[i]], result)
	return result

def minsum(arr, n, m, res, l):
	if n == 1 and m == 1:
		res += arr[0][0]
		l.append(res)
	else:
		if n != 1:
			p = res + arr[n - 1][m - 1]
			minsum(arr, n - 1, m, p, l)
		if m != 1:
			p = res + arr[n - 1][m - 1]
			minsum(arr, n, m - 1, p, l)
	return min(l)

def find_shortest_path(graph, start, end, path):
	path = path + [start]
	if start == end:
		return path
	if start not in graph:
		return None
	shortest = None
	for node in graph[start]:
		if node not in path:
			newpath = find_shortest_path(graph, node, end, path)
			if newpath:
				if not shortest or len(newpath) < len(shortest):
					shortest = newpath
	return shortest

def test(n, d):
	a = random.randint(1, n - 2)
	p = pow(a, d, n)
	if p == 1 or p == n - 1:
		return True
	while d != n - 1:
		d *= 2
		p = pow(p, 2, n)
		if p == n - 1:
			return True
	return False

def isprime(n):
	if n == 1:
		return False
	if n == 2:
		return True
	if n == 3:
		return True
	d = n - 1
	while d % 2 == 0:
		d //= 2
	for i in range(5):
		if test(n, d) == False:
			return False
	return True

def muin(a, m):
	(x, y, mo) = (1, 0, m)
	if m == 1:
		return 0
	while m > 0:
		(x, y) = (y, x - a // m * y)
		(a, m) = (m, a % m)
	if x < 0:
		return mo + x
	else:
		return x

def good(l, c):
	ch = chr(c)
	if len(l) == 1:
		return 1 if ch != l[0] else 0
	k = len(l) // 2
	lm = k - l[:k].count(ch) + good(l[k:], c + 1)
	rm = k - l[k:].count(ch) + good(l[:k], c + 1)
	return min(lm, rm)

def facto(fact):
	(fact[0], fact[1]) = (1, 1)
	for i in range(2, 10 ** 6 + 1):
		fact[i] = fact[i - 1] * i % M

def comb(n, r, fact):
	return fact[n] * pow(fact[n - r] * fact[r], M - 2, M) % M

def numberToBase(n, b):
	if n == 0:
		return 0
	digits = []
	while n:
		digits.append(n % b)
		n //= b
	return sum(digits)

def main():
	t = 1
	t = inpu()
	for _ in range(t):
		n = inpu()
		if n == 1:
			print(0, 1)
			continue
		print(-(n - 1), n)
main()


import sys
input = iter(sys.stdin.read().splitlines()).__next__
TC = int(input())
for tc in range(TC):
	N = int(input())
	l = -(N - 1)
	r = N
	print(l, r)


noOfTestCase = int(input())
ansList = []
for testCase in range(noOfTestCase):
	n = int(input())
	ansList.append([1 - n, n])
for ans in ansList:
	print(*ans)


t = int(input())

def find(n):
	r = n - 1
	l = -r
	return (l, n)
for i in range(t):
	n = int(input())
	(l, r) = find(n)
	print(l, r)


t0 = int(input())
for t in range(t0):
	n = int(input())
	print('{} {}'.format(-n + 1, n))


def solve_case():
	n = int(input())
	m = n - 1
	print(f'{-m} {n}')
T = int(input())
for t in range(T):
	solve_case()


t = input()
t = int(t)
i = 0
tem = []
while t > 0:
	n = input()
	n = int(n)
	x = -(n - 1)
	tem.append(x)
	tem.append(n)
	t -= 1
lent = len(tem)
while lent > 0:
	print(f'{tem[i]} {tem[i + 1]}')
	i = i + 2
	lent = lent - 2


import sys
readline = sys.stdin.readline
T = int(readline())
for _ in range(T):
	N = int(readline())
	print(-N + 1, N)


for s in [*open(0)][1:]:
	print(-(int(s) - 1), int(s))


t = int(input())
numeri = []
while t != 0:
	n = int(input())
	a = 0 - n + 1
	A = str(a) + ' ' + str(n)
	numeri.append(A)
	t = t - 1
for i in numeri:
	print(i)


for n in [*open(0)][1:]:
	print(1 - int(n), n)


n = int(input())
for _ in range(n):
	m = int(input())
	print(f'{-(m - 1)} {m}')


for ic in range(int(input())):
	n = int(input())
	print(-(n - 1), n)


import itertools
from collections import defaultdict
import itertools
import math
import sys
import bisect
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.buffer.readline())

def MI():
	return map(int, sys.stdin.buffer.readline().split())

def LI():
	return list(map(int, sys.stdin.buffer.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def BI():
	return sys.stdin.buffer.readline().rstrip()

def SI():
	return sys.stdin.buffer.readline().rstrip().decode()

def li():
	return [int(i) for i in input().split()]

def lli(rows):
	return [li() for _ in range(rows)]

def si():
	return input()

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

def ins():
	return input().split()

def solve():
	n = II()
	return str(-(n - 1)) + ' ' + str(n)

def main():
	for _ in range(II()):
		sys.stdout.write(str(solve()) + '\n')
main()


for _ in range(int(input())):
	x = int(input())
	if x == 0:
		print('-1 1')
		continue
	step = 0
	while x % 2 == 0:
		x = x // 2
		step += 1
	step = 2 ** step
	l = x // 2
	print(int(l - step + 1), end=' ')
	print(int(l + step))


n = []
for i in range(int(input())):
	n.append(int(input()))
for k in n:
	print(str(-1 * (k - 1)) + ' ' + str(k))


from math import ceil, sqrt

def get_ans(n):
	return [-(n - 1), n]
anss = []
t = int(input())
for _ in range(t):
	anss.append(get_ans(int(input())))
for i in anss:
	print(i[0], i[1])


def solve():
	n = int(input())
	return [-n + 1, n]
for _ in range(int(input())):
	print(*solve())


import sys, os, io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
for _ in range(int(input())):
	n = int(input())
	print(-(n - 1), n)


num_of_test_cases = int(input())
arr = []
for i in range(num_of_test_cases):
	arr.append(input())
for num in arr:
	print(str(-(int(num) - 1)) + ' ' + str(int(num)))


for k in range(int(input())):
	n = int(input())
	print(-1 * (n - 1), n)


t = int(input())
for tc in range(0, t):
	n = int(input())
	print(str(-(n - 1)) + ' ' + str(n))


def main():
	for _ in range(int(input())):
		n = int(input())
		if n == 1:
			print(0, 1)
			continue
		print(-(n - 1), n)
main()


N = int(input())
for i in range(N):
	n = int(input())
	print(1 - n, end=' ')
	print(n)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, functools, copy
inf = float('inf')
mod = 10 ** 9 + 7

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def LS():
	return input().split()

def endl():
	return print('\n')

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

def grayCode(n):
	return n ^ n >> 1
sys.setrecursionlimit(200000)
graph = collections.defaultdict(list)
grid = []
visited = set()
ways = ['D', 'U', 'R', 'L']
dx = [1, -1, 0, 0]
dy = [0, 0, 1, -1]

def initGraph(m):
	for _ in range(m):
		(u, v) = LI()
		graph[u - 1].append(v - 1)
		graph[v - 1].append(u - 1)

def initGraphW(m):
	for _ in range(m):
		(a, b, c) = LI()
		graph[a - 1].append((b - 1, c))
		graph[b - 1].append((a - 1, c))

def initGrid(h, w):
	for i in range(h):
		grid.append(list(S()))
for _ in range(I()):
	n = I()
	if n == 1:
		print(0, 1)
	elif n == 2:
		print(-1, 2)
	else:
		print(-(n - 1), n)


def solve():
	n = int(input())
	return '{0} {1}'.format(1 - n, n)
t = input()
for tt in range(int(t)):
	print(solve())


t = int(input())
while t != 0:
	t = t - 1
	n = int(input())
	print(-n + 1, end=' ')
	print(n)


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


import math

def solve():
	n = int(input())
	print(-n + 1, n)
t = int(input())
while t:
	t -= 1
	solve()


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
import string
ORDA = 97

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 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=2):
	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):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
for _ in range(ii()):
	n = ii()
	print(-n + 1, n)


def solve():
	n = int(input())
	r = n
	l = -(n - 1)
	print(l, r)
t = int(input())
while t > 0:
	solve()
	t -= 1


from math import ceil, floor
for i in range(int(input())):
	x = int(input())
	print(-x + 1, x)


t = int(input())
for _ in range(t):
	x = int(input())
	print(-x + 1, x)


n = int(input())
nList = []
for _ in range(n):
	nList.append(int(input()))
for i in range(n):
	r = -(nList[i] - 1)
	l = nList[i]
	print(r, l)


import math
import sys
import itertools
import fractions
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
for t in wtf[1:]:
	n = int(t)
	print(-(n - 1), n)


from __future__ import print_function
from math import *
from collections import deque
import os
import sys
from io import BytesIO, IOBase

def main():
	pass
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 inp():
	return int(input())

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

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

def invr():
	return map(int, input().split())
for _ in range(inp()):
	n = inp()
	print(-(n - 1), n)


test = int(input())
while test:
	n = int(input())
	print(1 - n, n)
	test -= 1


n = int(input())
while n != 0:
	num = int(input())
	r = num
	l = -(num - 1)
	print(str(l) + ' ' + str(r))
	n -= 1


T = int(input())
while T > 0:
	n = int(input())
	a = (n - 1) * -1
	b = n
	print(a, b)
	T -= 1


t = int(input())

def q(n):
	return str(-(n - 1)) + ' ' + str(n)
for i in range(t):
	n = int(input())
	print(q(n))


cc = int(input())
for i in range(cc):
	v = int(input())
	l = -1 * (v - 1)
	print(f'{l} {v}')


def solve():
	n = int(input())
	print(-1 * (n - 1), n)
t = int(input())
for i in range(t):
	solve()


import os
import sys
import math
import collections
import functools
import itertools
import heapq
import bisect
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
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')
ALPHA = 'abcde'
MOD = 10 ** 9 + 7
EPS = 1e-06
INF = 10 ** 18

def Ceil(a, b):
	return a // b + int(a % b > 0)

def INT():
	return int(input())

def STR():
	return input()

def INTS():
	return tuple(map(int, input().split()))

def ARRINT():
	return [int(i) for i in input().split()]

def ARRSTR():
	return [i for i in input().split()]

def solve(n):
	(l, r) = (-n + 1, n)
	print(*[l, r])
for t in range(INT()):
	n = INT()
	solve(n)


def summ(a):
	return [-a + 1, a]

def pri(array):
	print(array[0], ' ', array[1])
testcases = int(input())
que = []
for i in range(testcases):
	p = input()
	que.append(p)
for i in range(testcases):
	pri(summ(int(que[i])))


def process(n):
	if n == 0:
		return [-1, 1]
	return [-1 * (n - 1), n]
t = int(input())
for i in range(t):
	n = int(input())
	(a, b) = process(n)
	print(f'{a} {b}')


t = int(input())
a = []
for i in range(t):
	i = int(input())
	a.append(i)
for i in a:
	print(-1 * i + 1, i)


test = int(input())
while test > 0:
	num = int(input())
	fi = 1 - num
	se = num
	print(fi, end=' ')
	print(se)
	test -= 1


import traceback
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 = IOWrapper(sys.stdin)
input = lambda : sys.stdin.readline().rstrip('\r\n')

class SortedList:

	def __init__(self, iterable=[], _load=200):
		values = sorted(iterable)
		self._len = _len = len(values)
		self._load = _load
		self._lists = _lists = [values[i:i + _load] for i in range(0, _len, _load)]
		self._list_lens = [len(_list) for _list in _lists]
		self._mins = [_list[0] for _list in _lists]
		self._fen_tree = []
		self._rebuild = True

	def _fen_build(self):
		self._fen_tree[:] = self._list_lens
		_fen_tree = self._fen_tree
		for i in range(len(_fen_tree)):
			if i | i + 1 < len(_fen_tree):
				_fen_tree[i | i + 1] += _fen_tree[i]
		self._rebuild = False

	def _fen_update(self, index, value):
		if not self._rebuild:
			_fen_tree = self._fen_tree
			while index < len(_fen_tree):
				_fen_tree[index] += value
				index |= index + 1

	def _fen_query(self, end):
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		x = 0
		while end:
			x += _fen_tree[end - 1]
			end &= end - 1
		return x

	def _fen_findkth(self, k):
		_list_lens = self._list_lens
		if k < _list_lens[0]:
			return (0, k)
		if k >= self._len - _list_lens[-1]:
			return (len(_list_lens) - 1, k + _list_lens[-1] - self._len)
		if self._rebuild:
			self._fen_build()
		_fen_tree = self._fen_tree
		idx = -1
		for d in reversed(range(len(_fen_tree).bit_length())):
			right_idx = idx + (1 << d)
			if right_idx < len(_fen_tree) and k >= _fen_tree[right_idx]:
				idx = right_idx
				k -= _fen_tree[idx]
		return (idx + 1, k)

	def _delete(self, pos, idx):
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len -= 1
		self._fen_update(pos, -1)
		del _lists[pos][idx]
		_list_lens[pos] -= 1
		if _list_lens[pos]:
			_mins[pos] = _lists[pos][0]
		else:
			del _lists[pos]
			del _list_lens[pos]
			del _mins[pos]
			self._rebuild = True

	def _loc_left(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(lo, pos) = (-1, len(_lists) - 1)
		while lo + 1 < pos:
			mi = lo + pos >> 1
			if value <= _mins[mi]:
				pos = mi
			else:
				lo = mi
		if pos and value <= _lists[pos - 1][-1]:
			pos -= 1
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value <= _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def _loc_right(self, value):
		if not self._len:
			return (0, 0)
		_lists = self._lists
		_mins = self._mins
		(pos, hi) = (0, len(_lists))
		while pos + 1 < hi:
			mi = pos + hi >> 1
			if value < _mins[mi]:
				hi = mi
			else:
				pos = mi
		_list = _lists[pos]
		(lo, idx) = (-1, len(_list))
		while lo + 1 < idx:
			mi = lo + idx >> 1
			if value < _list[mi]:
				idx = mi
			else:
				lo = mi
		return (pos, idx)

	def add(self, value):
		_load = self._load
		_lists = self._lists
		_mins = self._mins
		_list_lens = self._list_lens
		self._len += 1
		if _lists:
			(pos, idx) = self._loc_right(value)
			self._fen_update(pos, 1)
			_list = _lists[pos]
			_list.insert(idx, value)
			_list_lens[pos] += 1
			_mins[pos] = _list[0]
			if _load + _load < len(_list):
				_lists.insert(pos + 1, _list[_load:])
				_list_lens.insert(pos + 1, len(_list) - _load)
				_mins.insert(pos + 1, _list[_load])
				_list_lens[pos] = _load
				del _list[_load:]
				self._rebuild = True
		else:
			_lists.append([value])
			_mins.append(value)
			_list_lens.append(1)
			self._rebuild = True

	def discard(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_right(value)
			if idx and _lists[pos][idx - 1] == value:
				self._delete(pos, idx - 1)

	def remove(self, value):
		_len = self._len
		self.discard(value)
		if _len == self._len:
			raise ValueError('{0!r} not in list'.format(value))

	def pop(self, index=-1):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		value = self._lists[pos][idx]
		self._delete(pos, idx)
		return value

	def bisect_left(self, value):
		(pos, idx) = self._loc_left(value)
		return self._fen_query(pos) + idx

	def bisect_right(self, value):
		(pos, idx) = self._loc_right(value)
		return self._fen_query(pos) + idx

	def count(self, value):
		return self.bisect_right(value) - self.bisect_left(value)

	def __len__(self):
		return self._len

	def __getitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		return self._lists[pos][idx]

	def __delitem__(self, index):
		(pos, idx) = self._fen_findkth(self._len + index if index < 0 else index)
		self._delete(pos, idx)

	def __contains__(self, value):
		_lists = self._lists
		if _lists:
			(pos, idx) = self._loc_left(value)
			return idx < len(_lists[pos]) and _lists[pos][idx] == value
		return False

	def __iter__(self):
		return (value for _list in self._lists for value in _list)

	def __reversed__(self):
		return (value for _list in reversed(self._lists) for value in reversed(_list))

	def __repr__(self):
		return 'SortedList({0})'.format(list(self))
import math
from collections import defaultdict as dfd, defaultdict, Counter, deque
from functools import lru_cache
from itertools import accumulate
from heapq import *
import bisect

def geti():
	return int(input())

def gets():
	return input()

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

def getsl():
	return input().split()

def getinps(s):
	inps = s.split()
	m = {'i': geti, 's': gets, 'il': getil, 'sl': getsl}
	if len(inps) == 1:
		return m[s]()
	return [m[k]() for k in inps]

def get2d(nrows, ncols, n=0):
	return [[n] * ncols for r in range(nrows)]

def get_acc(a):
	return list(accumulate(a))

def get_ncr(n, r, mod=10 ** 9 + 7):
	num = den = 1
	r = min(r, n - r)
	for i in range(r):
		num = num * (n - i) % mod
		den = den * (i + 1) % mod
	return num * pow(den, mod - 2, mod) % mod

def get_nc2(n):
	return n * (n - 1) // 2

def get_npr(n, r):
	if n < r:
		return 0
	return math.factorial(n) // math.factorial(r)

def put(a):
	return ' '.join(map(str, a))
ALPHABETS = 'abcdefghijklmnopqrstuvwxyz'
VOWELS = 'aeiou'
CONSONANTS = 'bcdfghjklmnpqrstvwxyz'
inf = float('inf')
mod = 10 ** 9 + 7

class Solution:

	def main(self):
		N = geti()
		print(-(N - 1), N)
try:
	Sol = Solution()
	Test = geti()
	for Case in range(Test):
		ans = Sol.main()
except Exception as e:
	print(e)
	traceback.print_exc()


import math
for _ in range(int(input())):
	n = int(input())
	print(-n + 1, n)


from sys import stdin
input = lambda : stdin.readline().strip()
lin = lambda : list(map(int, input().split()))
iin = lambda : int(input())
main = lambda : map(int, input().split())
from math import ceil, sqrt, factorial, log
from collections import deque
from bisect import bisect_left
mod = 998244353
mod = 1000000007

def solve(we):
	n = iin()
	print(-(n - 1), n)
qwe = 1
qwe = iin()
for _ in range(qwe):
	solve(_ + 1)


x = int(input())
import math
for q in range(x):
	y = int(input())
	if y % 2 == 1:
		print(y // 2, y // 2 + 1)
	else:
		print(y * -1 + 1, y)


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	r = n
	l = -n + 1
	ans += [[l, r]]
for i in range(t):
	print(ans[i][0], ans[i][1])


t = int(input())
for i in range(0, t):
	num = int(input())
	print('%d %d' % (-(num - 1), num))


t = int(input())
if 1 <= t <= 10 ** 14:
	for i in range(t):
		n = int(input())
		if 1 <= n <= 10 ** 18:
			if -10 ** 18 <= -(n - 1) <= n and n <= 10 ** 18:
				print(-(n - 1), n)


from typing import Counter
import sys
from collections import defaultdict as dd
from math import *

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

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

def sinp():
	return input()

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

def mod(f):
	return f % 1000000007

def pr(*x):
	print(*x)

def finp():
	f = open('input.txt', 'r')
	f = f.read().split('\n')
	return f

def finp():
	f = open('input.txt', 'r')
	f = f.read().split('\n')
	return f

def fout():
	return open('output.txt', 'w')

def fpr(f, x):
	f.write(x + '\n')

def csort(c):
	sorted(c.items(), key=lambda pair: pair[1], reverse=True)

def indc(l, n):
	c = {}
	for i in range(n):
		c[l[i]] = c.get(l[i], []) + [i + 1]
	return c
cou = inp()
for i in range(cou):
	n = inp()
	pr(-(n - 1), n)


import atexit, io, sys, math, heapq, collections

def get_int():
	return int(sys.stdin.readline().strip())

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_string():
	return sys.stdin.readline().strip()

def write_int(a):
	sys.stdout.write(str(a) + '\n')

def write_str(a):
	sys.stdout.write(a + '\n')

def write_list(arr):
	sys.stdout.write(' '.join(map(str, arr)) + '\n')

def swap(arr, a, b):
	arr[a] ^= arr[b]
	arr[b] ^= arr[a]
	arr[a] ^= arr[b]

def int_len(a):
	return math.floor(math.log(a, 10)) + 1

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def Sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	res = []
	for i in range(2, len(prime)):
		if prime[i]:
			res.append(i)
	return res

def binarySearch(arr, l, r, x):
	if r >= l:
		mid = l + (r - l) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] > x:
			return binarySearch(arr, l, mid - 1, x)
		else:
			return binarySearch(arr, mid + 1, r, x)
	else:
		return -1

def search(arr, x):
	return binarySearch(arr, 0, len(arr) - 1, x)

def toString(A):
	return ''.join(A)

def toArray(str):
	return str.split()

def arrSum(Arr):
	Sum = 0
	for i in range(len(Arr)):
		Sum += Arr[i]
	return Sum

def computeXOR(n):
	if n % 4 == 0:
		return n
	if n % 4 == 1:
		return 1
	if n % 4 == 2:
		return n + 1
	return 0
N = get_int()
while N > 0:
	n = get_int()
	print(-1 * (n - 1), n)
	N -= 1


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 collections import defaultdict, deque
from math import ceil, floor, sqrt, log2, gcd, pi
from heapq import heappush, heappop
from bisect import bisect_left, bisect
from functools import reduce
from copy import deepcopy
import sys
abc = 'abcdefghijklmnopqrstuvwxyz'
ABC = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
mod = 1000000007
for _ in range(int(input())):
	n = int(input())
	print(-(n - 1), n)


def solve(Test_cases):
	Resultant_list = []
	for i in range(Test_cases):
		n = int(input())
		Resultant_list.append(-1 * (n - 1))
		Resultant_list.append(n)
	return Resultant_list
Test_cases = int(input())
Result = solve(Test_cases)
for i in range(0, len(Result), 2):
	print(Result[i], Result[i + 1])


n = int(input())
a = []
for i in range(n):
	a.append(int(input()))
for i in a:
	print('{} {}'.format(-i + 1, i))


def consecutiveSum(num):
	if num == 0:
		print(0, 0)
	else:
		print(-(num - 1), num)
testcases = int(input())
res = []
for _ in range(testcases):
	res.append(int(input()))
for i in res:
	consecutiveSum(i)


import bisect
import collections
import copy
import functools
import itertools
import math
import operator
import sys
import os
from heapq import heappop, heappush
from typing import Callable, Generic, Iterable, List, Tuple, TypeVar, Union
sys.setrecursionlimit(100000)
is_local = 'TERM_PROGRAM' in os.environ
input = sys.stdin.readline
INF = float('inf')
MOD = 998244353

def debug(*args, **kwargs):
	if is_local:
		print(*args, **kwargs)

def I():
	return input().rstrip()

def IS():
	return input().split()

def II():
	return int(input())

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

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

def main():
	q = II()
	for _ in range(q):
		a = II()
		(l, r) = solve(a)
		print(f'{l} {r}')

def solve(a):
	return (-(a - 1), a)
main()


cases = int(input())
for _ in range(cases):
	num = int(input())
	print(-abs(num - 1), num)


x = int(input())
for t in range(x):
	n = int(input())
	diff = n - 1
	print(-diff, n)