Under construction

Still being built. Things may change

Road Construction

Time limit2sMemory limit1024 MB

Summary
Two players alternately build rectangles of area at most s on an n by m grid, and the task asks whether the first player wins.
Level

Medium6 of 10

Topics
Math, Game theory
Solved
No attempts yet

Problem

Sam is not the only person who builds roads. Today he met another builder who does the same job. The two quickly found common ground and decided to play a game.

They are building a rectangular section of road of size n×mn \times m meters. Treat it as a grid of n×mn \times m cells. Before the game starts, no cell is built.

The players take turns. On a turn, a player picks any rectangle on the grid with area at most ss in which no cell is built yet, and builds every cell inside it. The player who cannot move loses. Sam moves first.

Determine whether Sam wins when both players play optimally.

Input

The first line contains three integers nn, mm, and ss (1≤n,m≤10001 \le n, m \le 1000, 1≤s≤n×m1 \le s \le n \times m), the grid size and the maximum area of a rectangle built in one turn.

Output

If Sam can win, print YES on a single line. Otherwise, print NO.

Examples1

  1. Example 1

    Input
    1 4 2
    
    Expected output
    YES