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