#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 6;
const int mod = 998244353;
const long long INF = 1e18 + 7;
int ans = 0;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int x, y, z;
    scanf("%d", &x);
    scanf("%d", &y);
    scanf("%d", &z);
    if (x == y && y >= z) {
      printf("YES\n%d %d %d\n", x, z, z);
    } else if (y == z && z >= x) {
      printf("YES\n%d %d %d\n", x, x, z);
    } else if (x == z && z >= y) {
      printf("YES\n%d %d %d\n", y, z, y);
    } else
      printf("NO\n");
  }
  return 0;
}
