#include <bits/stdc++.h>
void solve() {
  long long n;
  std::cin >> n;
  std::cout << -1 * (n - 1) << " " << n << "\n";
}
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  long long t = 0;
  std::cin >> t;
  while (t--) {
    solve();
  }
}
