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