#include <bits/stdc++.h>
using namespace std;
template <typename T>
T BigMod(T b, T p, T m) {
  if (p == 0) return 1;
  if (p % 2 == 0) {
    T s = BigMod(b, p / 2, m);
    return ((s % m) * (s % m)) % m;
  }
  return ((b % m) * (BigMod(b, p - 1, m) % m)) % m;
}
template <typename T>
T POW(T B, T P) {
  if (P == 0) return 1;
  if (P & 1)
    return B * POW(B, P - 1);
  else
    return (POW(B, P / 2)) * (POW(B, P / 2));
}
template <typename T>
T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / __gcd(a, b));
}
template <typename T>
T Prime(T n) {
  for (long long i = 2; i < min(50000, n / 2); i++)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  long long t, n;
  cin >> t;
  while (t--) {
    long long x, y, z, a, b, c = 0;
    cin >> x >> y >> z;
    long long tt = max({x, y, z});
    if (x == tt) c++;
    if (y == tt) c++;
    if (z == tt) c++;
    if (c < 2) {
      cout << "NO" << endl;
      continue;
    }
    b = min({x, y, z});
    cout << "YES" << endl;
    cout << tt << " " << b << " " << b << endl;
  }
}
