#include <stdio.h>
int main()
{
int i, add, sub, x, y, n;
if (scanf("%d", &n) < 1) return 0;
for (i = 0 ; i < n ; i ++)
{
scanf("%d %d", &add, &sub);
if (add < sub || (add + sub) % 2 == 1 && (add - sub) % 2 == 1)
{
printf("impossible\n");
continue;
}
x = (add + sub) / 2;
y = (add - sub) / 2;
printf("%d %d\n", x, y);
}
return 0;
}
回目錄
回首頁
沒有留言 :
張貼留言