#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int tt;
  cin >> tt;
  while (tt--) {
    long long n;
    cin >> n;
    cout << -n + 1 << " " << n << endl;
  }
  return 0;
}
