题解 | #A加B,A模B#
A加B,A模B
https://ac.nowcoder.com/acm/problem/253632
#include<bits/stdc++.h> using namespace std; int main() { int T; cin>>T; while(T--) { long long n, m, a; cin>>n>>m; a=n-m; if(a>m) cout<<m<<" "<<a<<endl; else cout<<-1<<endl; } return 0; }