#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    if (s.size() == 2) {
      if (s[0] < s[1]) {
        cout << "YES\n";
        cout << 2 << endl;
        cout << s[0] << " " << s[1] << endl;
      } else
        cout << "NO\n";
    } else {
      cout << "YES\n";
      cout << 2 << endl;
      cout << s[0] << " ";
      for (int i = 1; i < s.size(); i++) {
        cout << s[i];
      }
      cout << endl;
    }
  }
  cerr << "\ntime elapsed:" << clock() * 1000.0 / CLOCKS_PER_SEC << "ms"
       << "\n";
  return 0;
}
