#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (auto tt = 0; tt < t; tt++) {
    int x, y, z;
    cin >> x >> y >> z;
    int a, b, c;
    bool OK = true;
    if (x == y) {
      if (x >= z) {
        a = x;
        b = c = z;
      } else {
        OK = false;
      }
    } else if (x == z) {
      if (x >= y) {
        b = x;
        a = c = y;
      } else {
        OK = false;
      }
    } else if (y == z) {
      if (y >= x) {
        c = y;
        a = b = x;
      } else {
        OK = false;
      }
    } else {
      OK = false;
    }
    if (OK) {
      cout << "YES" << endl;
      cout << a << ' ' << b << ' ' << c << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
