#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int ar[4];
    set<long long int> s;
    long long int mx = -1;
    for (long long int i = 1; i <= 3; i++) {
      cin >> ar[i];
      s.insert(ar[i]);
      mx = max(ar[i], mx);
    }
    if ((long long int)s.size() == 3) {
      cout << "NO"
           << "\n";
    } else if ((long long int)s.size() == 2) {
      long long int f = 1;
      sort(ar + 1, ar + 4);
      for (long long int i = 2; i <= 3; i++) {
        if (ar[i] == ar[i - 1]) {
          if (ar[i] != mx) f = 0;
        }
      }
      if (f) {
        cout << "YES"
             << "\n";
        for (long long int i : s) cout << i << ' ';
        cout << 1 << "\n";
      } else {
        cout << "NO"
             << "\n";
      }
    } else {
      cout << "YES"
           << "\n";
      for (long long int i = 1; i <= 3; i++) {
        cout << ar[i] << ' ';
      }
      cout << "\n";
    }
  }
}
