#include using namespace std; int main() { int T; long long a,b; cin>>T; while (T--) { cin>>a>>b; if (abs(a-b)==1 || a+b==2) cout<<-1<<" "<<-1<