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