#include <bits/stdc++.h>
using namespace std;
const int oo = 1000000007;
const long long Mod = (long long)1e9;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    if (s.size() == 1) {
      cout << "YES\n1\n";
      cout << s << endl;
    } else {
      if (s.size() == 2) {
        if (s[0] >= s[1])
          cout << "NO\n";
        else {
          cout << "YES\n2\n";
          cout << s[0] << " " << s[1] << endl;
        }
      } else {
        cout << "YES\n2\n";
        cout << s[0] << " ";
        for (int i = 1; i < s.size(); i++) cout << s[i];
        cout << endl;
      }
    }
  }
}
