#include <bits/stdc++.h>
const int N = 1e5 + 50;
const int MOD = 1e9 + 7;
using namespace std;
int T;
int n, m;
char s[N];
int read() {
  int s = 0, t = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') t = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    s = s * 10 + c - '0';
    c = getchar();
  }
  return s * t;
}
long long readl() {
  long long s = 0, t = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') t = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    s = s * 10 + c - '0';
    c = getchar();
  }
  return s * t;
}
int main() {
  T = read();
  while (T--) {
    n = read();
    scanf("%s", s);
    if (n == 1)
      puts("NO");
    else if (n == 2) {
      if (s[0] < s[1])
        puts("YES"), printf("%d", 2), printf("\n"),
            cout << s[0] << ' ' << s[1] << endl;
      else
        puts("NO");
    } else {
      puts("YES");
      printf("%d", 2), printf("\n");
      cout << s[0] << ' ';
      for (int i = 1; i < n; i++) cout << s[i];
      printf("\n");
    }
  }
  return 0;
}
