#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, c, d, i, j, k, l, p, q, r = 0, s = 1;
  scanf("%lld", &a);
  while (a--) {
    scanf("%lld %lld %lld", &b, &c, &d);
    l = b;
    k = c;
    p = d;
    if (b > c) swap(b, c);
    if (b > d) swap(b, d);
    if (c > d) swap(c, d);
    if (c != d)
      printf("NO\n");
    else {
      printf("YES\n");
      if (l != d)
        printf("%lld %lld %lld\n", l, l, d);
      else if (k != d)
        printf("%lld %lld %lld\n", k, d, k);
      else if (p != d)
        printf("%lld %lld %lld\n", d, p, p);
      else
        printf("%lld %lld %lld\n", d, d, d);
    }
  }
  return 0;
}
