#include <bits/stdc++.h>
using namespace std;
long long fx[4] = {1, -1, 0, 0};
long long fy[4] = {0, 0, 1, -1};
bool rs(long long a, long long b) { return (a > b); }
long long spd(long long n) {
  if (n % 2 == 0) return 2;
  for (long long i = 3; i * i <= n; i++) {
    if (n % i == 0) return i;
  }
  return n;
}
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    string s;
    cin >> s;
    if (n == 2) {
      long long k1 = s[0] - '0';
      long long k2 = s[1] - '0';
      if (k2 > k1)
        cout << "YES" << endl << 2 << endl << s[0] << " " << s[1] << endl;
      else
        cout << "NO" << endl;
    } else {
      cout << "YES" << endl << 2 << endl << s[0] << " ";
      for (long long i = 1; i < s.length(); i++) {
        cout << s[i];
      }
      cout << endl;
    }
  }
  return 0;
}
