#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  for (int q = 0; q < t; q++) {
    int x, y, z;
    cin >> x >> y >> z;
    if (x == y && y == z && z == x) {
      cout << "YES\n";
      cout << x << " " << y << " " << z << "\n";
    } else if (x != y && y != z && z != x) {
      cout << "NO\n";
    } else if (x == y && y != z) {
      int d = x;
      if (z > d) {
        cout << "NO\n";
      } else {
        cout << "YES\n";
        cout << d << " " << z << " " << z << "\n";
      }
    } else if (x != y && y == z) {
      int d = y;
      if (x > d) {
        cout << "NO\n";
      } else {
        cout << "YES\n";
        cout << x << " " << x << " " << d << "\n";
      }
    } else if (x == z && z != y) {
      int d = x;
      if (y > d) {
        cout << "NO\n";
      } else {
        cout << "YES\n";
        cout << y << " " << d << " " << y << "\n";
      }
    }
  }
  return 0;
}
