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