#include<bits/stdc++.h> using namespace std; #define LL long long LL gcd(LL a,LL b){ ? a:gcd(b,a%b); } int main(){ LL n,m,k; cin>>n>>m>>k; )%k){ cout<<"NO"<<endl; ; } LL g=gcd(n*,k),p=gcd(m*,k),a,b; ){ a=n*/g; k=k/g; ){ b=m; }else b=m/k; }else{ b=*m/p; k=k/p; ){ a=n; }else a=n/ k; } cout<<"YES"<<endl; cout<<"0 0"<<endl; cout<<"0 "<<b<<endl; cout<<a<<"<<endl; }
相关文章
- Codeforces Round #454 (Div. 1) CodeForces 906D Power Tower (欧拉降幂)
- Codeforces Round #600 (Div. 2) - D. Harmonious Graph(并查集)
- Educational Codeforces Round 78 (Rated for Div. 2) D. Segment Tree
- Educational Codeforces Round 64 (Rated for Div. 2)D(并查集,图)
- Codeforces Round #426 (Div. 2) D 线段树优化dp
- Codeforces Round #435 (Div. 2) c+d
- Codeforces Round #396 (Div. 2) A,B,C,D,E
- 2017年浙工大迎新赛热身赛 J Forever97与寄信 【数论/素数/Codeforces Round #382 (Div. 2) D. Taxes】
- Codeforces Round #378 (Div. 2) D - Kostya the Sculptor
- Codeforces Round #672 (Div. 2) D. Rescue Nibel!(排序)