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