#include <bits/stdc++.h>
using namespace std;
vector<int> prime;
void init(int range) {
  map<int, int> mark;
  for (int p = 2; p * p <= range; ++p) {
    if (mark[p] == 0) {
      for (int i = p * p; i <= range; i += p) {
        mark[i] = 1;
      }
    }
  }
  for (int p = 2; p <= range; ++p) {
    if (mark[p] == 0) {
      prime.push_back(p);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int a[3];
    cin >> a[0] >> a[1] >> a[2];
    sort(a, a + 3);
    if (a[1] != a[2]) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      cout << a[0] << " " << a[0] << " " << a[2] << endl;
    }
  }
}
