#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long T;
  cin >> T;
  while (T--) {
    long long x[3];
    cin >> x[0] >> x[1] >> x[2];
    sort(x, x + 3);
    if (x[0] == x[2]) {
      cout << "YES\n";
      cout << x[0] << " " << x[0] << " " << x[0] << "\n";
      continue;
    }
    if (x[1] != x[2]) {
      cout << "NO\n";
      continue;
    }
    cout << "YES\n";
    cout << x[1] << " " << x[0] << " " << (x[0]) << "\n";
  }
  return 0;
}
