Two Jugs

No attempts yetTime limit2sMemory limit256 MB

Problem

You have two empty jugs and a tap that fills a jug. The tap can only fill a jug all the way, because the jugs carry no volume markings and you cannot stop at a chosen level.

You may empty either jug at any time.

You may also pour water from one jug into the other. If the poured water is more than the receiving jug can still take, the receiving jug ends up full and the rest stays in the jug it came from.

Given the volumes of the two jugs, decide whether one of them can end up holding exactly the wanted volume of water.

Input

The first line contains the number of test cases TT (1T1051 \le T \le 10^5). Each of the next TT lines contains three integers aa, bb, and dd separated by spaces. Here aa and bb are the volumes of the two jugs (1a,b1071 \le a, b \le 10^7), and dd is the volume of water you want (0dmax(a,b)0 \le d \le \max(a, b)).

Output

For each test case, print one line. Print Yes if one of the two jugs can hold exactly dd units of water, and No otherwise.