#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    vector<long long int> v;
    long long int temp;
    for (int i = 0; i < 3; i++) {
      cin >> temp;
      v.push_back(temp);
    }
    sort(v.begin(), v.end());
    if (v[1] != v[2])
      cout << "NO" << endl;
    else
      cout << "YES" << endl << v[0] << " " << v[0] << " " << v[2] << endl;
  }
  return 0;
}
