Wow! This problem is kind of tricky. If you're ready to put your thinking cap on, brace yourself and good luck! Otherwise, you can skip it for now and return any time later
Imagine a chocolate bar. Remember how it is usually split into smaller bits by a special grid?
Now think of chocolate as an N x M rectangle divided into little segments: N segments in width and M in height. Each segment is 1x1 and unbreakable. Find out whether it is possible to break off exactly K segments from the chocolate with a single straight line: vertical or horizontal.
Input data format
The program gets an input of three integers: N, M, K.
Output data format
The program must output one of the two words: YES or NO.
If you're having trouble understanding the task, try drawing it on a piece of paper.