#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const long long INF = (1e18);
const long double PI = 4 * atan((long double)1);
void array_debug(vector<long long> ar) {
  for (auto x : ar) cout << x << ' ';
  cout << '\n';
}
long long power(long long x, long long n) {
  long long result = 1;
  while (n > 0) {
    if (n & 1) result = (result * x);
    x = (x * x);
    n >>= 1;
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(20);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    string second;
    cin >> n >> second;
    if (n == 2) {
      if ((second[0] - '0') >= (second[1] - '0'))
        cout << "NO";
      else {
        cout << "YES\n"
             << "2\n"
             << second[0] << ' ' << second[1];
      }
    } else {
      cout << "YES\n"
           << "2\n";
      cout << second[0] << ' ';
      for (long long i = 1; i < n; i++) cout << second[i];
    }
    cout << '\n';
  }
}
