#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int a, b, c;
    cin >> a >> b >> c;
    int x, y;
    bool p = 0;
    if (a == b && a >= c) {
      x = a;
      y = c;
      p = 1;
    }
    if (a == c && a >= b) {
      x = a;
      y = b;
      p = 1;
    }
    if (c == b && a <= c) {
      x = b;
      y = a;
      p = 1;
    }
    if (p) {
      cout << "YES\n" << x << " " << y << " " << y << endl;
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
