#include <cstdio>
#include <cmath>
using namespace std;
int main(){
int ncase;
scanf("%d",&ncase);
while(ncase--){
int i,j,m,n;
scanf("%d%d",&i,&j);
if(i<=j||(i-j) % 2==1){
//(i%2==0&&j%2==1)||(i%2==1&&j%2==0))
printf("impossble\n");
//结束当前的一次循环
continue;
}
m=(i+j)/2;
n=(i-j)/2;
n=n>0?n:-n;
printf("%d %d\n",m,n);
}
return 0;
}