int main() //构造
{
//freopen("in.txt", "r", stdin);
ll m, n, k;
while (cin >> n >> m >> k)
{
if (2 * n*m%k != 0) { puts("NO");continue; }
ll d = gcd(2 * m, k);
puts("YES");
cout << "0 0" << endl;
if (d == 1)//n%k==0
{
cout << n * 2 / k <<" "<<0<< endl;
cout << 0 << " " << m << endl;
}
else
{
cout << n*d/k << " " << 0 << endl;
cout << 0 << " " << m * 2 / d << endl;
}
}
return 0;
}
D. Vasya and Triangle(构造)
最新推荐文章于 2020-08-31 17:28:39 发布