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