#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
const int mod = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--) {
    long long n;
    cin >> n;
    cout << -(n - 1) << " " << n << endl;
  }
  return 0;
}
