#include <bits/stdc++.h>
using namespace std;
int t, x, y, z;
int a[10];
int main() {
  cin >> t;
  while (t--) {
    for (int i = 1; i <= 3; i++) scanf("%d", &a[i]);
    sort(a + 1, a + 4);
    if (a[1] != a[2] && a[2] != a[3] && a[1] != a[3])
      cout << "NO" << endl;
    else if ((a[1] == a[2]) && (a[2] != a[3]))
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      if (a[1] == a[2] == a[3])
        cout << a[1] << " " << a[2] << " " << a[3] << endl;
      else
        cout << a[1] << " " << a[1] << " " << a[3] << endl;
    }
  }
}
