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