A. Subtractionstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got two numbers. As long as they are both larger than zero, they go through the same operation: subtract the lesser number from the larger one. If they equal substract one number from the another. For example, one operation transforms pair (4,17) to pair (4,13), it transforms (5,5) to (0,5).You've got some number of pairs (ai, bi). How many operations will be performed for each of them?InputThe first line contains the number of pairs n (1  ≤  n  ≤  1000). Then follow n lines, each line contains a pair of positive integers ai, bi (1  ≤  ai,  bi  ≤  109).OutputPrint the sought number of operations for each pair on a single line.ExamplesInput24 177 987654321Output8141093479
Input24 177 987654321
Output8141093479
['math', 'number theory', '*900']