#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (n--) {
    int a, s, d;
    cin >> a >> s >> d;
    if (a > s) swap(a, s);
    if (a > d) swap(a, d);
    if (s > d) swap(s, d);
    if (s == d) {
      cout << "YES" << endl;
      cout << a << " " << a << " " << d << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
