Johnny and the Quadratic Equation

No attempts yetTime limit1sMemory limit512 MB

Problem

Johnny just learned about quadratic equations. As an eager young programmer, he immediately wrote the following program to help with his homework:

#include<cstdio>
int main() {
    unsigned int a,b,c,x=0;
    scanf("%u %u %u",&a,&b,&c);
    do {
        if (a*x*x+b*x+c==0) {
            puts("YES");
            return 0;
        }
        x++;
    } while(x);
    puts("NO");
    return 0;
}

Every calculation is done on unsigned 32-bit integers (that is, modulo 2322^{32}). The program tries every unsigned 32-bit value of xx in turn and prints YES as soon as it finds one with ax2+bx+c0(mod232)a \cdot x^2 + b \cdot x + c \equiv 0 \pmod{2^{32}}; if no such xx exists it prints NO. Unfortunately this brute-force loop is far too slow, even on his brand-new gaming rig. Can you reproduce its output quickly?

Input

The first line contains an integer tt (t104t \le 10^4), the number of test cases. Each of the next tt lines contains three space-separated integers aa, bb, and cc (0a,b,c<2320 \le a, b, c < 2^{32}).

Output

For each test case, print YES if there exists an unsigned 32-bit integer xx with ax2+bx+c0(mod232)a \cdot x^2 + b \cdot x + c \equiv 0 \pmod{2^{32}}, and NO otherwise. Print each answer on its own line, in the order the test cases are given.