#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t, n;
  cin >> t;
  while (t--) {
    string s;
    cin >> n >> s;
    if (n == 2) {
      if (s[0] < s[1])
        cout << "YES\n2\n" << s[0] << " " << s[1] << endl;
      else
        cout << "NO" << endl;
    } else {
      cout << "YES\n2" << endl << s[0] << " ";
      s.erase(s.begin());
      cout << s << endl;
    }
  }
  return 0;
}
