#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int kkk;
  cin >> kkk;
  for (int qqq = 0; qqq < kkk; qqq++) {
    int n, x, a, b, c, k, m;
    cin >> a >> b >> c;
    if (a < b) swap(a, b);
    if (a < c) swap(a, c);
    if (b < c) swap(b, c);
    if (a == b)
      cout << "YES\n" << a << ' ' << c << ' ' << c << '\n';
    else
      cout << "NO\n";
  }
  return 0;
}
