fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int t;
  7. cin>>t;
  8. while(t--){
  9. int a[3];
  10. for(int i=0;i<3;i++)
  11. cin>>a[i];
  12. sort(a,a+3);
  13. if(a[1]!=a[2])
  14. cout<<"NO"<<endl;
  15. else{
  16. cout<<"YES"<<endl;
  17. cout<<a[0]<<" "<<a[0]<<" "<<a[2]<<endl;
  18. }
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5476KB
stdin
5
3 2 3
100 100 100
50 49 49
10 30 20
1 1000000000 1000000000
stdout
YES
2 2 3
YES
100 100 100
NO
NO
YES
1 1 1000000000