Codeforces Round 512 (Div. 1, based on Technocup 2019 Elimination Round 1)
A
Vasya and Triangle
Codeforces
未评级
原题
←B →
翻译中…

Vasya has got three integers 𝑛n, 𝑚m and 𝑘k. He'd like to find three integer points (𝑥1,𝑦1)(x1,y1), (𝑥2,𝑦2)(x2,y2), (𝑥3,𝑦3)(x3,y3), such that 0≤𝑥1,𝑥2,𝑥3≤𝑛0≤x1,x2,x3≤n, 0≤𝑦1,𝑦2,𝑦3≤𝑚0≤y1,y2,y3≤m and the area of the triangle formed by these points is equal to 𝑛𝑚𝑘nmk.

翻译中…

Help Vasya! Find such points (if it's possible). If there are multiple solutions, print any of them.

翻译中…

Input

翻译中…

The single line contains three integers 𝑛n, 𝑚m, 𝑘k (1≤𝑛,𝑚≤1091≤n,m≤109, 2≤𝑘≤1092≤k≤109).

翻译中…

Output

翻译中…

If there are no such points, print "NO".

翻译中…

Otherwise print "YES" in the first line. The next three lines should contain integers 𝑥𝑖,𝑦𝑖xi,yi — coordinates of the points, one point per line. If there are multiple solutions, print any of them.

翻译中…

You can print each letter in any case (upper or lower).

翻译中…

Note

翻译中…

In the first example area of the triangle should be equal to 𝑛𝑚𝑘=4nmk=4. The triangle mentioned in the output is pictured below:

翻译中…

image

翻译中…

In the second example there is no triangle with area 𝑛𝑚𝑘=167nmk=167.

翻译中…

样例

Input #1
4 3 3
Output #1
YES
1 0
2 3
4 1
InputCopy OutputCopy
Input #2
4 4 7
Output #2
NO
InputCopy OutputCopy
题目信息
题号
1053A
时间限制
1 s
内存限制
256 MB

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。