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