#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int a[3];
    cin >> a[0] >> a[1] >> a[2];
    sort(a, a + 3, greater<long long int>());
    if (a[0] != a[1]) {
      cout << "NO"
           << "\n";
    } else {
      cout << "YES"
           << "\n";
      cout << a[0] << " " << a[2] << " " << a[2] << "\n";
    }
  }
}
