#include <bits/stdc++.h>
using namespace std;
void fun(long long int c, long long int m, long long int a[]) {
  if (c < 2) {
    cout << "NO";
    cout << endl;
  } else {
    cout << "YES\n";
    cout << m << ' ';
    cout << a[0] << ' ' << a[0];
    cout << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int a[3];
    cin >> a[0] >> a[1] >> a[2];
    sort(a, a + 3);
    long long int c = 0;
    long long int m = a[2];
    int c1 = 0;
    if (m == a[0]) c++;
    if (m == a[1]) c++;
    if (m == a[2]) c++;
    fun(c, m, a);
  }
  return 0;
}
