#include <bits/stdc++.h>
using namespace std;
void func() {
  long long int n1, n2, n3;
  cin >> n1 >> n2 >> n3;
  long long int x, y, z;
  z = max(n1, max(n2, n3));
  x = min(n1, min(n2, n3));
  y = n1 + n2 + n3 - x - z;
  if (y != z) {
    cout << "NO";
    return;
  }
  cout << "YES";
  cout << endl;
  cout << z << " " << x << " " << x;
  return;
}
int main() {
  long long int t;
  cin >> t;
  for (long long int i = 0; i < t; i++) {
    func();
    cout << endl;
  }
  return 0;
}
