#13119: C++簡易參考解答


shawn2000100 (東華財金)


#include <iostream>
using namespace std;

int main(){
int t, s, d;
while(cin >> t){
while(t--){
cin >> s >> d;
if( ((s + d) & 1) || s < d)
cout << "impossible" << endl;
else
cout << (s + d) / 2 << " " << (s - d) / 2 << endl;
}
}

return 0;
}