#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int x, y, z;
    cin >> x >> y >> z;
    if (((x ^ y) ^ z) == min(min(x, y), z)) {
      cout << "YES"
           << "\n";
      cout << max(max(x, y), z) << " ";
      cout << min(min(x, y), z) << " ";
      cout << min(min(x, y), z) << "\n";
    } else {
      cout << "NO"
           << "\n";
    }
  }
  return 0;
}
