Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define fast()(ios_base::sync_with_stdio(0),cin.tie(NULL));
- int main()
- {
- fast();
- ll t;
- cin>>t;
- while(t--)
- {
- ll x,y,z;
- bool f= false;
- cin>>x>>y>>z;
- ll a,b,c;
- if(x==y && y==z)
- {
- cout<<"YES"<<endl;
- cout<<x<<" "<<y<<" "<<z<<endl;
- continue;
- }
- else if(x!=y && x!=z && y!=z)
- {
- cout<<"NO"<<endl;
- continue;
- }
- else if(x==y)
- {
- a=x;
- if(z<a)
- {
- c=z;
- b=z;
- }
- else f=true;
- }
- else if(x==z)
- {
- b=x;
- if(y<b)
- {
- a=y;
- c=y;
- }
- else f=true;
- }
- else if( y==z)
- {
- c=y;
- if(x<c)
- {
- a=x;
- b=x;
- }
- else
- f=true;
- }
- if(f)cout<<"NO"<<endl;
- else
- {
- cout<<"YES"<<endl;
- cout<<a<<" "<<b<<" "<<c<<endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement