#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int q;
  cin >> q;
  while (q--) {
    int n;
    string s;
    cin >> n >> s;
    if (n > 2) {
      cout << "YES\n2\n";
      cout << s[0] << " " << s.substr(1);
    } else if (n == 2) {
      if (s[0] < s[1]) {
        cout << "YES\n2\n";
        cout << s[0] << " " << s[1];
      } else {
        cout << "NO";
      }
    } else {
      cout << "NO";
    }
    cout << "\n";
  }
  return 0;
}
