The principal line contains one integer t (1≤t≤104) — the number of experiments. Then, at that point, t experiments follow. Each experiment comprises of one line containing three integers w, h, n (1≤w,h≤104,1≤n≤109) — the width and stature of the sheet Polycarp has and the number of companions he wants to send a postcard to.
Correct answer will be upvoted else downvoted. Computer science.
Polycarp can cut any piece of paper w×h that he has in just two cases:
On the off chance that w is even, he can slice the sheet down the middle and get two sheets of size w2×h;
In the event that h is even, he can slice the sheet down the middle and get two sheets of size w×h2;
On the off chance that w and h are even simultaneously, Polycarp can slice the sheet as indicated by any of the standards above.
In the wake of cutting a piece of paper, the complete number of pieces of paper is expanded by 1.
Assist Polycarp with seeing whether he can cut his sheet of size w×h at into n or more pieces, utilizing just the principles portrayed previously.
Input
The principal line contains one integer t (1≤t≤104) — the number of experiments. Then, at that point, t experiments follow.
Each experiment comprises of one line containing three integers w, h, n (1≤w,h≤104,1≤n≤109) — the width and stature of the sheet Polycarp has and the number of companions he wants to send a postcard to.
Output
For each experiment, output on a different line:
"Indeed", in case it is feasible to cut a sheet of size w×h into basically n pieces;
"NO" in any case.
You can output "YES" and "NO" regardless (for instance, the strings yEs, indeed, Yes and YES will be perceived as sure).
Step by step
Solved in 2 steps with 1 images