#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int T;
  scanf("%d", &T);
  while (T--) {
    vector<int> V(3);
    for (auto &i : V) scanf("%d", &i);
    sort(V.begin(), V.end());
    if (V.at(1) != V.at(2))
      cout << "NO\n";
    else
      cout << "YES\n" << V.at(0) << ' ' << V.at(0) << ' ' << V.at(2) << endl;
  }
  return 0;
}
