#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
ostream &operator<<(ostream &out, const pair<T, U> &p) {
  out << "(" << p.first << ", " << p.second << ")";
  return out;
}
template <template <typename, typename...> class ContainerType,
          typename ValueType, typename... Args>
void print(const ContainerType<ValueType, Args...> &c) {
  for (const auto &v : c) cout << v << ' ';
  cout << '\n';
}
void print() { cout << '\n'; }
template <typename T, typename... Args>
void print(T a, Args... args) {
  cout << a << " ";
  print(args...);
}
long long llipower(long long x, long long y, long long p = LLONG_MAX) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int x, y, z;
    cin >> x >> y >> z;
    if (x == y && x >= z) {
      cout << "YES"
           << "\n";
      print(x, 1, z);
    } else if (y == z && y >= x) {
      cout << "YES"
           << "\n";
      print(1, x, y);
    } else if (z == x && x >= y) {
      cout << "YES"
           << "\n";
      print(1, x, y);
    } else {
      cout << "NO"
           << "\n";
    }
  }
}
