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