#include <bits/stdc++.h>
using namespace std;
long long mult(long long a, long long b, long long p = (int)(1e9 + 7)) {
  return ((a % p) * (b % p)) % p;
}
long long add(long long a, long long b, long long p = (int)(1e9 + 7)) {
  return (a % p + b % p) % p;
}
long long fpow(long long n, long long k, long long p = (int)(1e9 + 7)) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
long long inv(long long a, long long p = (int)(1e9 + 7)) {
  return fpow(a, p - 2, p);
}
bool sa(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
bool fd(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
bool sd(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second > b.second);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    string s;
    cin >> n;
    cin >> s;
    if (s.length() == 2) {
      if (s[0] >= s[1])
        cout << "NO\n";
      else {
        cout << "YES\n";
        cout << 2 << "\n";
        cout << s[0] << " " << s[1] << "\n";
      }
    } else {
      cout << "YES\n";
      cout << "2\n";
      cout << s[0] << " " << s.substr(1, s.length() - 1) << "\n";
    }
  }
  return 0;
}
