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