During soccer matches, in order to make wait time caused by brief commercials and player changes pass faster, the leaders of the two galleries organized a game betting contest. The supporters begin to bet on the sum between the number of goals scored by each team and the absolute difference between these.
Task
Create a program which, knowing the sum and the absolute difference between the number of goals scored by each team at the end of the game, determines the final score of the game.
Input Data
Input file scor.in contains on the first line a positive integer T, representing the number of tests in the input file. Each of the following T lines contains two positive integers, s and d, representing the sum and respectively the absolute difference between the number of goals scored by the two teams.
Output Data
Output file scor.out will contain T lines, one for each test of the output file. Line i will contain the score with which the game described on line i+1 of the input file ended, in the form of two positive integers separated by a space, c p, c>=p (if such a score doesn't exist, message impossible will be displayed).
Constraints
scor.in | scor.out |
2 400 200 20 40 |
300 100 impossible |
Time limit: 0.1 seconds/test
prof. Dana Lica
"I. L. Caragiale" National College, Ploieşti
Contact:danal182002@yahoo.com