#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T;
  cin >> T;
  while (T--) {
    int X, Y, Z;
    cin >> X >> Y >> Z;
    map<int, int> M;
    M[X]++;
    M[Y]++;
    M[Z]++;
    if (M.size() == 1)
      cout << "YES\n" << X << " " << Y << " " << Z << "\n";
    else if (M.size() == 3) {
      cout << "NO\n";
    } else {
      auto i = M.begin();
      if (i->second == 2)
        cout << "NO\n";
      else {
        cout << "YES\n";
        cout << i->first << " ";
        cout << i->first << " ";
        i++;
        cout << i->first << " ";
        cout << "\n";
      }
    }
  }
  return 0;
}
