#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin.exceptions(cin.failbit);
  ;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    if (s.length() < 2) {
      cout << "NO"
           << "\n";
      continue;
    }
    if (s.length() == 2) {
      if (s[1] > s[0]) {
        cout << "YES"
             << "\n";
        cout << "2"
             << "\n";
        cout << s[0] << " " << s[1] << "\n";
        continue;
      } else {
        cout << "NO"
             << "\n";
        continue;
      }
    } else {
      cout << "YES"
           << "\n";
      cout << "2"
           << "\n";
      cout << s[0] << " ";
      for (int i = 1; i < s.length(); i++) cout << s[i];
      cout << "\n";
    }
  }
}
