#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int x, y, z, a, b, c;
  while (t--) {
    cin >> x >> y >> z;
    a = max(x, y), b = max(y, z), c = max(x, z);
    if (a != b || b != c || c != a) {
      cout << "NO" << endl;
      continue;
    }
    cout << "YES" << endl;
    int mx = max(x, max(y, z));
    int mi = min(x, min(y, z));
    cout << mi << " " << mi << " " << mx << endl;
  }
  return 0;
}
