#include <bits/stdc++.h>
using namespace std;
void solve() {
  int x, y, z;
  cin >> x >> y >> z;
  if (x != y && y != z && x != z) {
    cout << "NO\n";
    return;
  }
  if (x == y) {
    if (x < z) {
      cout << "NO\n";
      return;
    } else {
      cout << "YES\n";
      cout << x << " " << z << " " << 1 << "\n";
    }
  } else if (y == z) {
    if (y < x) {
      cout << "NO\n";
      return;
    } else {
      cout << "YES\n";
      cout << y << " " << x << " " << 1 << "\n";
    }
  } else {
    if (z < y) {
      cout << "NO\n";
      return;
    } else {
      cout << "YES\n";
      cout << z << " " << y << " " << 1 << "\n";
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
