#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (n--) {
    long long int num, a = 0, l = 0;
    cin >> num;
    cout << 0 - num + 1 << " " << num << "\n";
  }
}
