#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
const long long inf = 2e9 + 5;
void solve() {
  int64_t n;
  cin >> n;
  cout << -n + 1 << ' ' << n << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
