#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 5;
const long long mod = 1e9 + 7;
const long long N = 2e5 + 314;
const long double pi = 3.1415926535897932384626433832795;
long long a[3];
void solve() {
  cin >> a[0] >> a[1] >> a[2];
  sort(a, a + 3);
  if (a[2] == a[1]) {
    cout << "YES\n";
    cout << a[2] << " " << a[0] << " 1\n";
  } else
    cout << "NO\n";
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  while (t--) solve();
}
