#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int x, y, z;
    cin >> x >> y >> z;
    if ((x == y && y >= z) || (x == z && x >= y) || (y == z && y >= x)) {
      cout << "YES" << endl;
      if (x <= y && x <= z)
        cout << x << " " << x << " " << max(y, z) << endl;
      else if (y <= x && y <= z)
        cout << y << " " << max(x, z) << " " << y << endl;
      else if (z <= y && z <= x)
        cout << z << " " << z << " " << max(x, y) << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
