#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int a, b, c;
    cin >> a >> b >> c;
    if (a == b && b == c) {
      cout << "YES" << '\n';
      cout << a << " " << b << " " << c << '\n';
      continue;
    }
    if (a != b && a != c && c != b) {
      cout << "NO" << '\n';
    } else {
      vector<int> V{a, b, c};
      sort(V.begin(), V.end());
      if (V[2] > V[1])
        cout << "NO" << '\n';
      else {
        cout << "YES" << '\n' << V[2] << " " << V[0] << " " << V[0] << '\n';
      }
    }
  }
  return 0;
}
