#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  cerr << fixed << setprecision(6);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    cout << -n + 1 << " " << n << endl;
  }
  return 0;
}
