#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  bool* res1 = new bool[t];
  int* res2 = new int[3 * t];
  for (int f = 0; f < t; f++) {
    int x, y, z;
    cin >> x >> y >> z;
    if (y > x) {
      x += y;
      y = x - y;
      x -= y;
    }
    if (z > x) {
      x += z;
      z = x - z;
      x -= z;
    }
    if (y < z) {
      y += z;
      z = y - z;
      y -= z;
    }
    if (x == y || x == z) {
      res2[f * 3] = x;
      res2[f * 3 + 1] = z;
      if (y == z)
        res2[f * 3 + 2] = z;
      else
        res2[f * 3 + 2] = 1;
      res1[f] = true;
    } else
      res1[f] = false;
  }
  for (int i = 0; i < t; i++)
    if (res1[i])
      cout << "YES\n"
           << res2[i * 3] << " " << res2[i * 3 + 1] << " " << res2[i * 3 + 2]
           << endl;
    else
      cout << "NO\n";
}
