#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, m, q, p;
  cin >> q;
  while (q--) {
    cin >> n;
    string s;
    cin >> s;
    p = 0;
    if (s.length() > 2) {
      cout << "YES\n2\n";
      cout << s[0] << " ";
      for (i = 1; i < n; i++) cout << s[i];
      cout << endl;
    } else {
      if (s[0] < s[1])
        cout << "YES\n2\n" << s[0] << " " << s[1] << endl;
      else
        cout << "NO" << endl;
    }
  }
  return 0;
}
