description: 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} ≤ l < r ≤ 10^{18} and l + (l + 1) + … + (r - 1) + r = n.
  
  Input
  
  The first line contains a single integer t (1 ≤ t ≤ 10^4) — the number of test cases.
  
  The first and only line of each test case contains a single integer n (1 ≤ n ≤ 10^{18}).
  
  Output
  
  For each test case, print the two integers l and r such that -10^{18} ≤ l < r ≤ 10^{18} and l + (l + 1) + … + (r - 1) + r = n. 
  
  It can be proven that an answer always exists. If there are multiple answers, print any.
  
  Example
  
  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.
solution: import javax.swing.*;
  import java.lang.reflect.Array;
  import java.math.BigInteger;
  import java.nio.file.attribute.FileAttribute;
  import java.util.*;
  import java.io.*;
  //a+b = (a^b) + 2*(a&b)
  //b^c = (a^b)^(a^c)
  //gcd(x,y) = gcd(x-y,y)
  // bit value at ith position changes in interval of 2^i
  // Do not define variables by a weird name
  // always use   (p*1LL >> q)
  // prefer 'int' than 'long long'
  // gcd(Fn,Fm) = Fgcd(n,m)  // Property of Fibonacci
  // lets prime factorization of n=(p1^e1)*(p2^e2) //total factors will be (e1+1)*(e2+1)
  // and some of factors would be (1+p1+p1^2 + .. p1^e1)*(1+p2+p2^2+...+p2^e2)
  // nC(r) + nC(r+1) = (n+1)C(r+1) => pascal's formula
  public class Main {
  
      static long gcd(long a, long b) {
          if (a == 0) return b;
          return gcd(b % a, a);
      }
  
      static class TrieNode {
          TrieNode childern[] = new TrieNode[26];
          int count = 0;
          boolean isEnd = false;
  
          TrieNode() {
              for (int i = 0; i < childern.length; ++i) childern[i] = null;
          }
      }
  
      //----------------------
  
  
      static int max(int tree[], int index, int left, int right, int l, int r, int max) {
  
          if (left >= right) {
              return 0;
          }
          if (right < l || r < left) {
              return 0;
          }
  
          System.out.println(index + " " + left + " " + right);
  
          int mid = (left + right) / 2;
          int first = max(tree, 2 * index + 1, left, mid, l, r, max);
          int second = max(tree, 2 * index + 2, mid + 1, right, l, r, max);
          return Math.max(first, second);
  
      }
  
      static class FastReader {
          BufferedReader br;
          StringTokenizer st;
  
          public FastReader() {
              br = new BufferedReader(
                      new InputStreamReader(System.in));
          }
  
          String next() {
              while (st == null || !st.hasMoreElements()) {
                  try {
                      st = new StringTokenizer(br.readLine());
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
              return st.nextToken();
          }
  
          int nextInt() {
              return Integer.parseInt(next());
          }
  
          long nextLong() {
              return Long.parseLong(next());
          }
  
          double nextDouble() {
              return Double.parseDouble(next());
          }
  
          String nextLine() {
              String str = "";
              try {
                  str = br.readLine();
              } catch (IOException e) {
                  e.printStackTrace();
              }
              return str;
          }
      }
  
      static int mod = 1000000007;
  
      static long mul(long a, long b) {
          return (a % mod * b % mod) % mod;
      }
  
      static long add(long a, long b) {
          return (a % mod + b % mod) % mod;
      }
  
      static long factorial(int n) {
          long ans = 1;
          for (int i = 1; i <= n; ++i) {
              ans = (ans % mod * i % mod) % mod;
          }
          return ans;
      }
  
      static long lcm(long a, long b) {
          return (a * b) / gcd(a, b);
      }
  
      static long power(long x, long y, int p) {
          long res = 1;
          x = x % p;
  
          while (y > 0) {
  
  
              if (y % 2 == 1)
                  res = (res * x) % p;
  
              y = y >> 1;
              x = (x * x) % p;
          }
  
          return res;
      }
  
  
      static long modInverse(long n, int p) {
          return power(n, p - 2, p);
      }
  
      static long nCrModPFermat(int n, int r,
                                int p) {
  
          if (n < r) {
              return 0;
          } else if (r == 0) {
              return 1;
          }
  
  
          long[] fac = new long[n + 1];
          fac[0] = 1;
  
          for (int i = 1; i <= n; i++)
              fac[i] = fac[i - 1] * i % p;
  
          return (fac[n] * modInverse(fac[r], p)
                  % p * modInverse(fac[n - r], p)
                  % p)
                  % p;
      }
  
      static void print(int arr[]) {
          for (int elements : arr) System.out.print(elements + " ");
      }
  
      static boolean union(int x, int y, int parent[]) {
          int root1 = find(x, parent);
          int root2 = find(y, parent);
          if (root1 == root2) {
              return false;
          }
          parent[root1] = root2;
          return true;
      }
  
      static int find(int x, int parent[]) {
          if (x == parent[x]) {
              return x;
          }
          return parent[x] = find(parent[x], parent);  //path compression
      }
  
      static int dp[] = new int[1000006];
  
      static void count() {
          int dp[] = new int[1000006];
          Arrays.fill(dp, -1);
          int count = 0;
          for (int i = 2; i < dp.length; ++i) {
              if (dp[i] == -1) {
                  for (int j = i; j < dp.length; j += i) {
                      dp[j] = 1;
                      Main.dp[j]++;
                  }
              }
          }
  
      }
  
      static class Pair  implements  Comparable<Pair>{
          int a;
          int b;
          int c;int d;
  
  
          Pair(int a, int b,int c,int d) {
              this.a = a;
              this.b = b;
              this.c=c;
              this.d=d;
  
  
          }
  
          @Override
          public int compareTo(Pair o) {
            if(this.a==o.a){
                return this.b-o.b;
            }
            else{
                return this.a-o.a;
            }
  
          }
      }
  
   static int upperbound(int arr[],int element){
          if(element<0){
              return -1;
          }
          int start=0;
          int end=arr.length-1;
          int answer=-1;
          while(start<=end){
              int mid=((start+end))>>1;
              //System.out.println(mid);
              if(arr[mid]<element){
                  start=mid+1;
              }
  
              else{
                  answer=mid;
                  end=mid-1;
              }
  
          }
          return answer;
   }
   static int lowerBound(int arr[],int element){
        int start=0;
        int end=arr.length-1;
        int answer=-1;
        while(start<=end){
            int mid=(start+end)>>1;
            if(arr[mid]>element){
                answer=mid;
                end=mid-1;
            }
            else{
                start=mid+1;
            }
        }
        return answer;
   }
      static long arr[] = new long[1000001];
  
      static void fill() {
          Arrays.fill(arr, -1);
          boolean bl[] = new boolean[1000001];
          for (int i = 2; i * i <= arr.length; ++i) {
              if (arr[i] == -1) {
                  for (int j = i * i; j < arr.length; j += i) {
                      arr[j] = 1;
  
                  }
              }
          }
  
      }
  
  static int search(int arr[],int element){
          int start=0;
          int end=arr.length-1;
          int answer=arr.length;
          while(start<=end){
              int mid=(start+end)/2;
              if(arr[mid]>element){
                  answer=mid;
                  end=mid-1;
              }
              else{
                  start=mid+1;
              }
  
          }
          return answer;
  }
  
  
      public static void main(String[] args) {
  
  
  FastReader scan=new FastReader();
  int t=scan.nextInt();
  while(t-->0){
      long n=scan.nextLong();
      if(n==1){
          System.out.println(0+" "+1);
          continue;
      }
      System.out.println(-(n-1)+" "+n);
  }
  
  
  
  
      }
  }
  
  
  
  
  
  