#include <bits/stdc++.h>
using namespace std;
int main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    int x, y, z;
    cin >> x >> y >> z;
    int a = INT_MAX, b = INT_MAX, c = INT_MAX;
    a = min(x, a);
    b = min(x, b);
    a = min(y, a);
    c = min(y, c);
    b = min(z, b);
    c = min(z, c);
    if (x > a && x > b || y > a && y > c || z > b && z > c) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
      cout << a << " " << b << " " << c << "\n";
    }
  }
  return 0;
}
