#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int T;
  cin >> T;
  while (T--) {
    long long int x, y, z;
    cin >> x >> y >> z;
    long long int ans = 0;
    if (x == y || x == z || y == z) {
      if (x == y && z == y) {
        cout << "YES"
             << "\n"
             << x << " " << x << " " << x << "\n";
        ans = 1;
      } else if (x == z && y < x) {
        cout << "YES"
             << "\n"
             << x << " " << y << " " << 1 << "\n";
        ans = 1;
      } else if (y == z && x < y) {
        cout << "YES"
             << "\n"
             << x << " " << 1 << " " << y << "\n";
        ans = 1;
      } else if (x == y && z < x) {
        cout << "YES"
             << "\n"
             << x << " " << z << " " << 1 << "\n";
        ans = 1;
      } else if (ans == 0)
        cout << "NO"
             << "\n";
    } else
      cout << "NO"
           << "\n";
  }
  return 0;
}
