SPEED  Circular Track
Two persons are running on a circular track either in the same direction or in the opposite direction, indefinitely. The speed of both of them is given to you. Speed will be positive in clockwise direction, and negative in anticlockwise direction. Print the number of distinct points, at which they will meet on the circle.
Input
First line contains T, number of test cases. Each test case contains two integers, S1 and S2 (not equal to zero) which are the speeds of the two persons. S1 and S2 will be distinct.
Edited: All the numbers fit in signed 32bit integer.
Output
Print in a separate line, the number of distinct points at which they meet.
Example
Input 2 1 2 1 1 Output 1 2
hide comments
Monkey D. Luffy :
20120826 13:15:13
yeah i did same and and got ac in 1st attempt... 

Simón Murillo Gómez:
20120715 04:59:56
@saket diwakar thanks, got AC :) 

Nikhar Agrawal:
20120610 06:07:11
What is the upper limit of S1 and S2. 

ajax:
20120529 21:49:19
can anyone tell me a test case where the chances of errors are very much ?


Prashant Gupta:
20120119 16:02:52
since radius is not given in the problem think otherway..... 

saket diwakar:
20120110 15:45:05
if u r getting WA..


Ajey Golsangi:
20111220 16:34:00
@Shizuo Heiwajima


ash:
20111014 18:58:20
Should we calculate the number of times the athletes meet till the first one completes one round or till the slower one completes one round?? 

Chandan Giri:
20110920 14:45:08
nice :) 

!(accepted):
20110905 15:42:20
looked tricky but turned out to be an easy one.. 
Added by:  Nikunj Jain 
Date:  20110721 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 