Solution
A wrong idea is, it is solvable if
x
x
x or
y
y
y (or both) conform to the form 1 << k
;
A counterexample is (5,6); it is solvable (5,6) -> (5,1) -> (4,1) -> … (1,1);
@Delimiter
+
The first-operation (x,y) -> (x,y-x) / (x-y,y)
, you should link it to (辗转相除法), therefore, the GCD of them would not change under this operation;
+
The second-operation may lead the GCD to x -> 2x -> 4x ...
;
+
Therefore, it is solvable if and only if GCD(x,y)
conforms to the form 1 << k
;