Solve problem "Chocolate bar" online - Learn Python 3 - Snakify

Problem «Chocolate bar» (Medium)


Statement

Chocolate bar has the form of a rectangle divided into \(n \times m\) portions. Chocolate bar can be split into two rectangular parts by breaking it along a selected straight line on its pattern. Determine whether it is possible to split it so that one of the parts will have exactly k squares.

The program reads three integers: n, m, and k. It should print YES or NO.


In all the problems input the data using input() and print the result using print().



Saved solutions

Tests

Input Correct answer Result
4
2
6
YES
2
10
7
NO
5
7
1
NO
7
4
21
YES
5
12
100
NO
6
6
6
YES
6
6
35
NO
6
6
37
NO
7
1
99
NO
300
100
3000
YES
256
124
4069
NO
348
41
6183
NO
387
13
2709
YES
13
387
2709
YES
1
1
2
NO