#include <bits/stdc++.h>
using namespace std;
int cif[305];
string x;
int main() {
  int q, nrc, n;
  cin >> q;
  while (q--) {
    cin >> n >> x;
    nrc = 0;
    for (int i = x.size() - 1; i >= 0; i--) cif[++nrc] = x[i] - '0';
    if (nrc == 1)
      cout << "NO\n";
    else if (nrc == 2) {
      if (cif[2] >= cif[1])
        cout << "NO\n";
      else {
        cout << "YES\n";
        cout << "2\n";
        cout << cif[2] << " " << cif[1] << "\n";
      }
    } else {
      cout << "YES\n";
      cout << "2\n";
      cout << cif[nrc] << " ";
      for (int i = nrc - 1; i >= 1; i--) cout << cif[i];
      cout << "\n";
    }
  }
  return 0;
}
