#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long a, b, c;
  cin >> a >> b >> c;
  if ((a == b) && (b == c)) {
    cout << "YES" << endl;
    cout << a << " " << b << " " << c << endl;
  } else {
    unordered_map<long long, long long> mp;
    mp[a]++;
    mp[b]++;
    mp[c]++;
    int flag = 0, x1, x2, x3;
    for (auto i : mp) {
      if (i.second == 2) {
        flag = 1;
        x1 = i.first;
      }
      if (i.second == 1) {
        x2 = i.first;
      }
    }
    if (x1 < x2) {
      cout << "NO" << endl;
    } else if (flag == 0) {
      cout << "NO" << endl;
    } else if (flag == 1) {
      cout << "YES" << endl;
      if (x2 == 1) {
        cout << x1 << " " << x2 << " " << 1 << endl;
      } else {
        cout << x1 << " " << x2 << " " << (x2 - 1) << endl;
      }
    }
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
