#include <bits/stdc++.h>
using namespace std;
template <class T>
void show(const vector<T> &a) {
  for (T x : a) cout << x << " ";
  cout << endl;
}
signed main() {
  long long tc;
  cin >> tc;
  while (tc--) {
    long long x, y, z;
    cin >> x >> y >> z;
    vector<long long> a(3);
    a[2] = z;
    a[1] = y;
    a[0] = x;
    sort(a.begin(), a.end());
    if (a[2] == a[1]) {
      cout << "YES" << endl;
      cout << a[0] << " " << a[0] << " " << a[2] << endl;
    } else
      cout << "NO" << endl;
  }
}
