#include <bits/stdc++.h>
using namespace std;
ifstream fin("input.txt");
ofstream fout("output.txt");
bool isPrime(long long int x) {
  if (x <= 4 || x % 2 == 0 || x % 3 == 0) return x == 2 || x == 3;
  for (int i = 5; i * i <= x; i += 6)
    if (x % i == 0 || x % (i + 2) == 0) return 0;
  return 1;
}
void primeFactors(long long n, set<long long> &Fac) {
  while (n % 2 == 0) {
    Fac.insert(2);
    n = n / 2;
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      Fac.insert(i);
      n = n / i;
    }
  }
  if (n > 2) Fac.insert(n);
}
int NumDigits(int x) {
  return (
      x < 10
          ? 1
          : (x < 100
                 ? 2
                 : (x < 1000
                        ? 3
                        : (x < 10000
                               ? 4
                               : (x < 100000
                                      ? 5
                                      : (x < 1000000
                                             ? 6
                                             : (x < 10000000
                                                    ? 7
                                                    : (x < 100000000
                                                           ? 8
                                                           : (x < 1000000000
                                                                  ? 9
                                                                  : 10)))))))));
}
inline void boostIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout.precision(10);
}
long long int Pow10[19] = {
    (long long int)0,    (long long int)1e1,  (long long int)1e2,
    (long long int)1e3,  (long long int)1e4,  (long long int)1e5,
    (long long int)1e6,  (long long int)1e7,  (long long int)1e8,
    (long long int)1e9,  (long long int)1e10, (long long int)1e11,
    (long long int)1e12, (long long int)1e13, (long long int)1e14,
    (long long int)1e15, (long long int)1e16, (long long int)1e17,
    (long long int)1e18};
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a * b / gcd(a, b);
}
template <class T>
struct Fenwick {
  vector<T> V;
  Fenwick(long long n) : V(n) {}
  void add(size_t i, T x) {
    for (; i < V.size(); i |= i + 1) V[i] += x;
  }
  T sum(long long i) {
    T r = T();
    for (--i; i >= 0; i = (i & (i + 1)) - 1) r += V[i];
    return r;
  }
  T sum(long long l, long long r) { return sum(r) - sum(l); }
};
long long MOD = 1e9 + 7;
int32_t main() {
  boostIO();
  long long q;
  cin >> q;
  for (long long k = 0; k < (q); ++k) {
    long long n;
    cin >> n;
    string s;
    cin >> s;
    if (n == 2 && s[0] >= s[1]) {
      cout << "NO" << '\n';
      continue;
    }
    cout << "YES" << '\n';
    cout << 2 << '\n';
    cout << s[0] << " ";
    for (long long i = 1; i < n; ++i) {
      cout << s[i];
    }
    cout << '\n';
  }
  cerr << '\n' << "RUNTIME: " << 1.0 * clock() / CLOCKS_PER_SEC << " s" << '\n';
  return 0;
  ;
}
