#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t, x, y, i, n, j, m, k, ans = 0, count = 0, tot = 0, flag = 0,
                                        od, ev;
  cin >> t;
  while (t--) {
    cin >> x >> y >> k;
    if (x != y && x != k && y != k) {
      cout << "NO\n";
    } else {
      if (x == y && x == k && y == k) {
        cout << "YES\n";
        cout << x << " " << x << " " << x << "\n";
      } else if (x == y) {
        if (x > k) {
          cout << "YES\n";
          cout << x << " " << k << " " << k << "\n";
        } else {
          cout << "NO\n";
        }
      } else if (k == y) {
        if (k > x) {
          cout << "YES\n";
          cout << x << " " << x << " " << k << "\n";
        } else {
          cout << "NO\n";
        }
      } else if (x == k) {
        if (x > y) {
          cout << "YES\n";
          cout << y << " " << x << " " << y << "\n";
        } else {
          cout << "NO\n";
        }
      }
    }
  }
  return 0;
}
