Problem Description

Read t pairs a b. For each pair output gcd(a,b).

Input Format

First integer t. Next t lines: a b.

Output Format

t lines gcd.

Sample Test Case

Input:
4 10 15 7 3 0 9 -12 18
Output:
5 1 9 6

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next