#include <bits/stdc++.h>
using namespace std;
int main() {
  {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  };
  int t;
  cin >> t;
  while (t--) {
    long long a, b, x = 0, n, m, y = 0, p = 0, c = 500007, pp = 0, f = 0, l = 0,
                    r = 0, res = 0, k = 0, ff = 0;
    cin >> a >> b >> c;
    p = max(p, a);
    p = max(p, b);
    p = max(p, c);
    pp = min(b, a);
    pp = min(pp, c);
    if (p == a) x++;
    if (p == b) x++;
    if (p == c) x++;
    if (x < 2)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      cout << p << ' ' << pp << ' ' << pp << endl;
    }
  }
  return 0;
}
