#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int test;
  cin >> test;
  while (test--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    if (a == b && a >= c) {
      cout << "YES\n";
      cout << a << " " << c << " " << c << "\n";
    } else if (a == c && a >= b) {
      cout << "YES\n";
      cout << b << " " << a << " " << b << "\n";
    } else if (b == c && b >= a) {
      cout << "YES\n";
      cout << a << " " << a << " " << b << "\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
