Economic Game "P&T"#148

Economic Game "P&T"

1 second
64 megabytes
Easy

Two non-negative integers and are given. Two players — Provider () and Transit () — take turns making moves, starting with . On each turn, a player must subtract from the larger of the two numbers a positive integer that is a multiple of the smaller number, such that the result remains non-negative. The player who cannot make a move loses.

Input

The first line contains the number of test cases (1 \le N \le 10). Each of the next lines contains two integers and (A, B < 2 \cdot 10^9).

Output

Output a single line containing a sequence of digits, each or , written consecutively without spaces. Here, and represent the winner's number (: wins, : wins).

Examples

Example 1

Loading
Loading