#include <bits/stdc++.h>
using namespace std;
long long int pow1(long long int x, long long int y) {
  long long int res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
long long int powmod(long long int x, long long int y) {
  long long int res = 1;
  while (y > 0) {
    if (y & 1) res = ((res % 1000000007LL) * (x % 1000000007LL)) % 1000000007LL;
    y = y >> 1;
    x = ((x % 1000000007LL) * (x % 1000000007LL)) % 1000000007LL;
  }
  return res % 1000000007LL;
}
long long int ans = 0, g;
void combinationUtil(int arr[], int data[], int start, int end, int index,
                     int r) {
  if (index == r) {
    long long int x = 1;
    for (int j = 0; j < r; j++) x *= data[j];
    if (r % 2 == 0)
      ans -= (g / x);
    else
      ans += g / x;
    return;
  }
  for (int i = start; i <= end && end - i + 1 >= r - index; i++) {
    data[index] = arr[i];
    combinationUtil(arr, data, i + 1, end, index + 1, r);
  }
}
void printCombination(int arr[], int n, int r) {
  int data[r];
  combinationUtil(arr, data, 0, n - 1, 0, r);
}
long long int bit[100000] = {0};
void update(long long int n, long long int i, long long int val) {
  cout << val << "------->\n";
  i++;
  while (i <= n) {
    bit[i] += val;
    i = i + (i & (-i));
    cout << i << '\n';
  }
}
void cbit(long long int arr[], long long int n) {
  for (int i = 0; i < n; i++) update(n, i, arr[i]);
}
int main() {
  long long int n;
  cin >> n;
  while (n--) {
    long long int n;
    cin >> n;
    string s;
    cin >> s;
    if (s.length() == 1) {
      cout << "NO\n";
      continue;
    } else if (s.length() == 2) {
      if (s[0] < s[1])
        cout << "YES\n2\n" << s[0] << " " << s[1] << '\n';
      else
        cout << "NO\n";
    } else {
      cout << "YES\n2\n";
      cout << s[0] << " ";
      for (int i = 1; i < s.length(); i++) cout << s[i];
      cout << '\n';
    }
  }
}
