#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int a[200003];
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) {
    int x, y, z;
    cin >> x >> y >> z;
    if (x == y && y < z)
      cout << "NO" << endl;
    else if (x < y && y != z)
      cout << "NO" << endl;
    else if (x > y && z != max(x, y)) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      if (x == y)
        cout << x << " " << 1 << " " << z;
      else if (y == z)
        cout << x << " " << 1 << " " << z;
      else if (x == z)
        cout << x << " " << 1 << " " << y;
      else
        cout << x << " " << y << " " << z;
      cout << endl;
    }
  }
  return 0;
}
