#include <bits/stdc++.h>
using namespace std;
void solve() {
  int x, y, z, a, b, c;
  cin >> x >> y >> z;
  if (x == y && x >= z) {
    cout << "YES\n";
    cout << x << " " << 1 << " " << z << "\n";
    return;
  }
  if (z == y && z >= x) {
    cout << "YES\n";
    cout << y << " " << 1 << " " << x << "\n";
    return;
  }
  if (x == z && x >= y) {
    cout << "YES\n";
    cout << z << " " << 1 << " " << y << "\n";
    return;
  }
  cout << "NO\n";
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
