#include <bits/stdc++.h>
using namespace std;
const int64_t mod = 1e9 + 7;
const int64_t primm = 998244353;
long long q, n;
char a[302];
int main() {
  cin >> q;
  while (q--) {
    cin >> n >> a;
    if (n > 2) {
      cout << "YES" << endl << 2 << endl << a[0] << endl;
      for (long long i = (long long)1; i < (long long)n; i++) cout << a[i];
      cout << endl;
    } else if (a[0] >= a[1])
      cout << "NO" << endl;
    else {
      cout << "YES" << endl << 2 << endl << a[0] << endl << a[1] << endl;
    }
  }
  return 0;
}
