#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, x, y, z;
  cin >> t;
  while (t != 0) {
    cin >> x >> y >> z;
    if ((x == y) && x > z) {
      cout << "YES" << endl;
      cout << z << " " << z << " " << y;
    } else if ((x == z) && x > y) {
      cout << "YES" << endl;
      cout << y << " " << y << " " << x;
    } else if ((y == z) && y > x) {
      cout << "YES" << endl;
      cout << x << " " << x << " " << y;
    } else if (x == y && x == z) {
      cout << "YES" << endl;
      cout << x << " " << x << " " << x;
    } else {
      cout << "NO";
    }
    cout << endl;
    t--;
  }
  return 0;
}
