#include <bits/stdc++.h>
using namespace std;
int Q, N;
char s[301];
int main(void) {
  scanf("%d", &Q);
  while (Q--) {
    scanf("%d", &N);
    scanf("%s", s);
    if (N == 2) {
      if (s[0] < s[1]) {
        printf("YES\n");
        printf("2\n");
        printf("%c %c\n", s[0], s[1]);
      } else
        printf("NO\n");
    } else {
      printf("YES\n");
      printf("2\n");
      printf("%c %s\n", s[0], s + 1);
    }
  }
  return 0;
}
