#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int arr[3];
  string yes = "YES", no = "NO";
  while (t--) {
    for (int i = 0; i < 3; i++) {
      cin >> arr[i];
    }
    sort(arr, arr + 3);
    if (arr[1] == arr[2] && arr[1] >= arr[0]) {
      cout << yes << endl;
      cout << arr[0] << " " << arr[0] << " " << arr[2] << endl;
    } else {
      cout << no << endl;
    }
  }
}
