#include <bits/stdc++.h>
using namespace std;
int x[20003], y[20003], z[20003], a, b, c;
int t;
int main() {
  cin >> t;
  int i1;
  for (i1 = 0; i1 < t; i1++) {
    cin >> x[i1] >> y[i1] >> z[i1];
  }
  for (i1 = 0; i1 < t; i1++) {
    if (z[i1] == y[i1] && x[i1] == z[i1]) {
      a = x[i1];
      b = x[i1];
      c = x[i1];
      cout << "YES";
      cout << endl << a << ' ' << b << ' ' << c << endl;
    } else if (x[i1] == y[i1] && z[i1] < y[i1]) {
      a = x[i1];
      b = z[i1];
      c = z[i1];
      cout << "YES";
      cout << endl << a << ' ' << b << ' ' << c << endl;
    } else if (x[i1] == z[i1] && y[i1] < z[i1]) {
      b = z[i1];
      a = y[i1];
      c = y[i1];
      cout << "YES";
      cout << endl << a << ' ' << b << ' ' << c << endl;
    } else if (z[i1] == y[i1] && x[i1] < z[i1]) {
      c = z[i1];
      a = x[i1];
      b = x[i1];
      cout << "YES";
      cout << endl << a << ' ' << b << ' ' << c << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
