#include <bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
void solve() {
  int x, y, z;
  cin >> x >> y >> z;
  if (x == y && y == z) {
    cout << "YES"
         << "\n"
         << x << " " << x << " " << x;
  } else if (x == y && x > z) {
    cout << "YES"
         << "\n"
         << x << " " << z << " " << z;
  } else if (x == z && x > y) {
    cout << "YES"
         << "\n"
         << x << " " << y << " " << y;
  } else if (y == z && y > x) {
    cout << "YES"
         << "\n"
         << x << " " << x << " " << y;
  } else
    cout << "NO";
  cout << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
