#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--) {
    long long int a[3];
    for (int i = 0; i < 3; i++) {
      cin >> a[i];
    }
    sort(a, a + 3);
    if (a[1] == a[2]) {
      cout << "YES"
           << "\n";
      cout << a[2] << " " << a[0] << " " << a[0];
    } else {
      cout << "NO";
    }
    cout << "\n";
  }
  return 0;
}
