#Lutece0177. The Story of ZCS

The Story of ZCS

Migrated from Lutece 177 The Story of ZCS

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

Love and Eternal lay hid in night;

God said "Let CS be" and all was light.

*Walking alone in darkness, lonely and never knew what I would go through. How many times I walked lonely in the campus, how many times I woke up with a start at midnight, and how many times I sang a sorrow song but no one cared about? The terrible feeling is just like a albatross around my neck until I met CS. My door is opened and the sky is lightened. It is a moment for my renaissance, which makes me understand the meaning of sunshine and rainbow once again. When I catch sight of you, you are the only one in my view. When you are out of sight, you are the only one in my heart. When I am awake, you are the only one in my mind. When I am asleep, you are the only one in my dream. You are my only one.I want to catch sight of you every minute and every second. *

-- Letter from Kamel (ZS) to CS

Kamel has lots of photos of CS. He wants to fill his desktop with her photos. The desktop is made up of m rows and n columns. One photo occupies b consecutive squares in a row or b consecutive squares in a column. He want to know want to know whether it is possible to cover his desktop with CS's photos while no two photos overlap with each other and the whole desktop is full?

You may assume that Kamel has tens of thousands of photos of CS. If it is possible then print YES else print NO.

Input

The first line of the inputs is TT(no more than 120120), which stands for the number of test cases you need to solve. Each line has three numbers MM,NN,BB (1M,N10001\leq M,N\leq 1000, 1BM,N1\leq B\leq M,N).

Output

Each YES or NO occupies one line.

Samples

2
4 8 4
5 7 3
YES
NO

Resources

kamel