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