#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 9;
const int MOD = 1e9 + 7;
const int oo = (int)1e9;
const long long OO = (long long)1e18;
const double PI = acos(-1.0);
bool isprime(long long n) {
  if (n <= 1) return 0;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return 1;
}
long long intlog(long long base, long long x) { return (log(x) / log(base)); }
bool prime[N];
void primee() {
  for (int p = 2; p * p <= N; p++) {
    if (prime[p] == true) {
      for (int i = p * 2; i < N; i += p) prime[i] = false;
    }
  }
}
string decToBinary(long long n) {
  string z = "";
  int i = 0;
  while (n > 0) {
    z += (n % 2) + 48;
    n = n / 2;
    i++;
  }
  reverse(((z).begin()), ((z).end()));
  return z;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long power(long long x, int y) {
  long long temp;
  if (y == 0) return 1;
  temp = power(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else
    return x * temp * temp;
}
int main() {
  int q;
  scanf("%d", &q);
  while (q--) {
    int n;
    scanf("%d", &n);
    string s;
    cin >> s;
    if (n == 2 && s[1] <= s[0])
      puts("NO");
    else {
      string t = "";
      for (int i = 1; i < n; i++) {
        t += s[i];
      }
      printf("YES\n2\n");
      cout << s[0] << " " << t << endl;
    }
  }
  return 0;
}
