Company: iRageCapital_30july
Difficulty: medium
Game of Coordinates Problem Description You are standing on an integer grid at the point (1, 1), and you are given a target point (x, y). If your current position is (a, b), then in one move you may go to either (a + b, b) or (a, a + b). No other move is allowed. For each given target (x, y), determine whether you can reach it starting from (1, 1) using zero or more such moves. Input Format The first line contains a single integer T, the number of test cases. Each of the next T lines contains two space-separated integers x and y, describing one target point. Output Format For each test case, print "Yes" (without quotes) if the target (x, y) can be reached from (1, 1), and "No" otherwise. Print the answers in the same order as the input, one per line. Constraints 1 <= T <= 4000 (inferred - the source states T <= 10^5. At that size one test file needs about 3,900,007 bytes of input and produces up to 400,000 bytes of output, against this judge's limits of 200,000 input bytes and