#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const double PI = acos(-1.0);
const long long int mod = 1e9 + 7;
const int MAXN = 1e6 + 5;
void cp() {
  int x, y, z;
  cin >> x >> y >> z;
  if (x == y || y == z || x == z) {
    int a[] = {x, y, z};
    sort(a, a + 3);
    a[1] = 1;
    sort(a, a + 3);
    do {
      if (max(a[0], a[1]) == x && max(a[0], a[2]) == y &&
          max(a[1], a[2]) == z) {
        cout << "YES\n";
        cout << a[0] << " " << a[1] << " " << a[2] << '\n';
        return;
      }
    } while (next_permutation(a, a + 3));
    cout << "NO\n";
  } else
    cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  t = 1;
  cin >> t;
  while (t--) {
    cp();
  }
  return 0;
}
