47 lines
573 B
C++
47 lines
573 B
C++
#include<iostream>
|
|
#include<cstdio>
|
|
#include<algorithm>
|
|
#include<cmath>
|
|
using namespace std;
|
|
int n,m,k;
|
|
int s,d,x;
|
|
|
|
int baoli()
|
|
{
|
|
int len=sqrt(s);
|
|
for(int i=1;i<=len;i++)
|
|
{
|
|
if(s%i==0)
|
|
{
|
|
if(x>=i&&d>=s/i)
|
|
{
|
|
return i;
|
|
}
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
int main()
|
|
{
|
|
scanf("%d%d%d",&n,&m,&k);
|
|
s=n*m/k*2;
|
|
d=m>n? m:n,x=m<n? m:n;
|
|
if(n*m*2%k!=0)
|
|
{
|
|
printf("NO");
|
|
return 0;
|
|
}
|
|
int i=baoli();
|
|
// printf("%d %d",d,x);
|
|
if(i>0)
|
|
{
|
|
if(x==n)printf("YES\n0 0\n%d 0\n0 %d",i,s/i);
|
|
else printf("YES\n0 0\n%d 0\n0 %d",s/i,i);
|
|
}
|
|
else
|
|
{
|
|
printf("NO");
|
|
}
|
|
return 0;
|
|
}
|