#include<bits/stdc++.h>
#define ll long long
#define fi first
#define se second
using namespace std;
int main(){
int t;
std::cin>>t;
while(t--){
int x;
std::cin>>x;
int cur = x/2;
if(x&1)puts("-1");
else {
int b=3*cur;
if((cur^b) !=x || (cur+b)/2!=x)puts("-1");
else std::cout<<cur<<' '<<3*cur<<'\n';
}
}
return 0;
}
E. Vlad and a Pair of Numbers
于 2023-02-02 01:31:50 首次发布