8.13ÉÏÎç

This commit is contained in:
ljcjames 2022-08-13 14:23:40 +08:00
parent 65b6b8310f
commit 78c5fe402c
1 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,46 @@
#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;
}