#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    int arr[5];
    for (int f = 0; f < 3; f++) scanf("%d", &arr[f]);
    sort(arr, arr + 3);
    if (arr[2] != arr[1])
      printf("NO\n");
    else {
      if (arr[1] == arr[0])
        printf("YES\n%d %d %d\n", arr[2], arr[2], arr[2]);
      else
        printf("YES\n%d %d %d\n", arr[2], arr[0], arr[0]);
    }
  }
}
