#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long fpo(long long x, long long y);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int t;
  cin >> t;
  while (t--) {
    int n;
    char s[1000];
    cin >> n >> s;
    if (n > 2) {
      cout << "YES"
           << "\n";
      cout << 2 << "\n";
      cout << s[0] << " ";
      for (int i = 1; i < n; i++) {
        cout << s[i];
      }
    } else {
      if (s[0] < s[1]) {
        cout << "YES"
             << "\n";
        cout << 2 << "\n";
        cout << s[0] << " " << s[1];
      } else
        cout << "NO"
             << " ";
    }
    cout << ""
         << "\n";
  }
  return 0;
}
long long fpo(long long x, long long y) {
  if (y == 0)
    return 1;
  else {
    long long tem = fpo(x, y / 2);
    if (y % 2 == 0)
      return (tem * tem) % mod;
    else
      return (((tem * tem) % mod) * x) % mod;
  }
}
