407000: GYM102672 H Road building

Memory Limit:512 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

H. Road buildingtime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard output

Sam is not the only one who builds roads. Today he met a man who does the same. They instantly hit it off and decided to play a game.

Right now they are building a rectangular part of the road $$$n$$$ by $$$m$$$ meters. Let's imagine that the road is placed on a grid and consists of $$$n \times m$$$ cells. Before the start of the game no cell is build. Players take turns. The first player can choose any rectangle on the grid with total area less or equal to $$$s$$$, but no cell of that rectangle should be build. Then the player builds all the cells of the chosen rectangle. The second player does the same. The winner takes the last turn. Sam goes first. Please, help him understand if he will be the winner considering that both players intend to win and play optimally.

Input

The first line contains three integers $$$n$$$, $$$m$$$ and $$$s$$$ ($$$1 \le n, m \le 1\,000$$$, $$$1 \le s \le n \cdot m$$$) — the sizes of the road and maximum area of the chosen rectangle.

Output

If Sam can win output "YES". Otherwise output "NO".

ExampleInput
1 4 2
Output
YES

加入题单

算法标签: