#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  int x, y, z;
  while (q--) {
    cin >> x >> y >> z;
    if ((x == y && x >= z) || (x == z && x >= y) || (y == z && y >= x)) {
      int m = max(x, max(y, z));
      int n = min(x, min(y, z));
      cout << "YES\n";
      if (x == y && y == z || n - 1 < 1)
        cout << m << " " << n << " " << n;
      else
        cout << m << " " << n << " " << n - 1;
    } else
      cout << "NO";
    cout << endl;
  }
}
