The following languages are only available languages for the problems from the contest

Surprise Language Round #8:

- Kotlin 1.3.10

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

D. Chocolate Bar

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputA chocolate bar has a rectangular shape and consists of *n* × *m* slices. In other words, a bar consists of *n* rows with *m* slices of chocolate in each row.

Each slice of chocolate is known to weigh 1 gram. Your task is to determine for each of the *q* chocolate bars whether it is possible to obtain a piece weighing *p* grams by breaking the bar several (possibly zero) times. The final piece of the chocolate bar should be whole, and breaks are made along the line of slices' section for the whole length of the current piece.

Input

The first line contains the positive integer *q* (1 ≤ *q* ≤ 100) — the number of chocolate bars.

Each of the following *q* lines contains three positive integers *n*, *m* and *p* (1 ≤ *n*, *m*, *p* ≤ 1000) — the size of the chocolate bar, and the weight of the piece which should be obtained.

Output

The output should contain *q* lines and the *i*-th line must contain "Yes" (without the quotes), if it is possible to perform the task for *i*-th chocolate bar, or "No" otherwise.

Example

Input

2

3 3 4

4 4 7

Output

Yes

No

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Oct/15/2019 13:31:29 (e1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|