#include <bits/stdc++.h>
using namespace std;
namespace threeprmaxes {
int t;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> t;
  while (t--) {
    int x, y, z;
    cin >> x >> y >> z;
    if (x == y && y == z) {
      cout << "YES" << endl;
      cout << x << " " << y << " " << z << endl;
      continue;
    }
    if (x == y) {
      if (x > z) {
        cout << "YES" << endl;
        cout << x << " " << z << " " << z << endl;
        continue;
      } else {
        cout << "NO" << endl;
        continue;
      }
    }
    if (y == z) {
      if (y > x) {
        cout << "YES" << endl;
        cout << x << " " << x << " " << z << endl;
        continue;
      } else {
        cout << "NO" << endl;
        continue;
      }
    }
    if (z == x) {
      if (z > y) {
        cout << "YES" << endl;
        cout << y << " " << y << " " << z << endl;
        continue;
      } else {
        cout << "NO" << endl;
        continue;
      }
    }
    cout << "NO" << endl;
    continue;
  }
  return 0;
}
}  // namespace threeprmaxes
int main() {
  threeprmaxes::main();
  return 0;
}
