#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 5;
const double pi = acos(-1);
const int mod = 998244353;
int x, y, z, a, b, c;
int t;
int main(){
cin >> t;
while(t--){
cin >> x >> y >> z;
int a = (x == y) + (x == z) + (y == z);
if(!a){
puts("NO");
continue;
}
else if(a == 3){
puts("YES");
cout << x << ' ' << x << ' ' << x << endl;
continue;
}
else{
if((x == y && z > x) || (x == z && y > x) || (y == z && x > y)) puts("NO");
else{
puts("YES");
if(x == y) cout << x << ' ' << z << ' ' << z << endl;
else if(x == z) cout << x << ' ' << y << ' ' << y << endl;
else cout << y << ' ' << x << ' ' << x << endl;
}
}
}
}