#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int x, y, z;
    cin >> x >> y >> z;
    long long int a = 0, b = 0, c = 0;
    if ((x == y) && (x == z)) {
      cout << "YES" << endl;
      a = b = c = x;
      cout << a << " " << b << " " << c << endl;
    } else if ((z < y) && (x == y)) {
      cout << "YES" << endl;
      a = x;
      b = z;
      c = z;
      cout << a << " " << b << " " << c << endl;
    } else if ((x < y) && (y == z)) {
      cout << "YES" << endl;
      a = x;
      b = x, c = y;
      cout << a << " " << b << " " << c << endl;
    } else if ((x > y) && (x == z)) {
      cout << "YES" << endl;
      a = y;
      b = z;
      c = y;
      cout << a << " " << b << " " << c << endl;
    } else if ((x < y) && (x == z)) {
      cout << "NO" << endl;
    } else if ((z > y) && (x == y)) {
      cout << "NO" << endl;
    } else if ((x < y) && (y < z)) {
      cout << "NO" << endl;
    } else if ((x > y) && (y > z)) {
      cout << "NO" << endl;
    } else if ((y > x) && (x > z)) {
      cout << "NO" << endl;
    } else if ((y > z) && (z > x)) {
      cout << "NO" << endl;
    } else if ((x > y) && (y == z)) {
      cout << "NO" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
