#include <bits/stdc++.h>
using namespace std;
long long hcf(long long a, long long b) {
  if (a == 0)
    return b;
  else
    return hcf(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long x, y, z;
    cin >> x >> y >> z;
    if (x == y) {
      if ((y - z) >= 0) {
        cout << "YES\n";
        cout << x << " " << z << " "
             << "1"
             << "\n";
      } else
        cout << "NO\n";
    } else if (x == z) {
      if ((z - y) >= 0) {
        cout << "YES\n";
        cout << x << " " << y << " "
             << "1"
             << "\n";
      } else
        cout << "NO\n";
    } else if (y == z) {
      if ((z - x) >= 0) {
        cout << "YES\n";
        cout << x << " " << y << " "
             << "1"
             << "\n";
      } else
        cout << "NO\n";
    } else
      cout << "NO\n";
  }
}
