#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int y, long long int p) {
  long long int r = 1;
  x = x % p;
  while (y) {
    if (y & 1) r = r * x % p;
    y = y >> 1;
    x = x * x % p;
  }
  return r;
}
const int N = 1e5 + 9;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int T0;
  cin >> T0;
  while (T0--) {
    int l;
    cin >> l;
    string s;
    cin >> s;
    if (l == 2 && (int)s[0] >= (int)s[1]) {
      cout << "NO" << '\n';
      continue;
    }
    cout << "YES" << '\n';
    cout << 2 << '\n';
    cout << s[0] << " ";
    for (int i = 0; i < l - 1; i++) cout << s[i + 1];
    cout << '\n';
  }
}
