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