#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
int main() {
  int t = 1;
  cin >> t;
  while (t--) {
    long long int x, y, z;
    cin >> x >> y >> z;
    long long int mx = max(x, max(y, z));
    if (mx == x && mx == z) {
      cout << "YES" << endl;
      cout << x << " " << y << " " << y << endl;
      continue;
    }
    if (mx == y && mx == z) {
      cout << "YES" << endl;
      cout << x << " " << x << " " << z << endl;
      continue;
    }
    if (mx == y && mx == x) {
      cout << "YES" << endl;
      cout << z << " " << x << " " << z << endl;
      continue;
    }
    cout << "NO" << endl;
  }
  return 0;
}
