http://uva.onlinejudge.org/external/108/10812.html
Solution:
1. run the loop down to n
2. take the input s and d.
3. Print the output using this technique:
printf("impossible\n");
else{
a=(s+d)/2;
b=(s-a);
if(a>b)
printf("%d %d\n", a, b);
else
printf("%d %d\n", b, a);
}