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