#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
const int INF = 2e9 + 10;
void solve() {
  vector<int> a(3);
  int mx = 0, notmx = 0, c = 0;
  for (int &x : a) {
    cin >> x;
    mx = max(x, mx);
  }
  for (int x : a) {
    if (x == mx) {
      c++;
    } else {
      notmx = x;
    }
  }
  if (c < 2) {
    cout << "NO" << endl;
    return;
  } else if (c == 3) {
    cout << "YES" << endl;
    cout << mx << " " << mx << " " << mx << endl;
  } else {
    cout << "YES" << endl;
    cout << mx << " " << notmx << " " << notmx << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
