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