#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x, y, z;
    int a, b, c;
    cin >> x >> y >> z;
    int u = max(x, y);
    int k = max(u, z);
    int t = min(x, y);
    int q = min(t, z);
    if (k - x == 0 && k - y == 0 || k - y == 0 && k - z == 0 ||
        k - z == 0 && k - x == 0) {
      cout << "YES" << endl;
      if (x == y && y == z && z == x) {
        cout << x << " " << y << " " << z << endl;
      } else {
        a = k;
        b = q;
        c = q;
        cout << a << " " << b << " " << c << endl;
      }
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
