#include <bits/stdc++.h>
const int BIG = 1e5 + 55;
const long long MOD = 1e9 + 7;
using namespace std;
int t, a[BIG];
void solve() {
  int x, y, z;
  cin >> x >> y >> z;
  a[0] = x;
  a[1] = y;
  a[2] = z;
  a[3] = 0;
  int A, B, C;
  for (int i = 0; i < 4; i++) {
    A = a[i];
    for (int j = 0; j < 4; j++) {
      B = a[j];
      for (int k = 0; k < 4; k++) {
        C = a[k];
        if (x == max(A, B) && y == max(A, C) && z == max(B, C)) {
          cout << "YES\n" << A << " " << B << " " << C << "\n";
          return;
        }
      }
    }
  }
  cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
