#include <bits/stdc++.h>
using namespace std;
void solve() {
  int x, y, z;
  cin >> x >> y >> z;
  std::vector<int> v;
  v.push_back(x);
  v.push_back(y);
  v.push_back(z);
  set<int> st;
  st.insert(x);
  st.insert(y);
  st.insert(z);
  if (st.size() == 3) {
    cout << "NO" << endl;
  } else if (st.size() == 1) {
    cout << "YES" << endl;
    cout << x << " " << y << " " << z << endl;
  } else {
    int mx = *max_element(st.begin(), st.end());
    int cnt = count(v.begin(), v.end(), mx);
    if (cnt == 2) {
      cout << "YES" << endl;
      for (auto it : st) {
        if (it != mx) {
          cout << it << " " << it << " ";
          break;
        }
      }
      cout << mx << endl;
    } else
      cout << "NO" << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
