#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long i, j;
long long temp;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    string a;
    cin >> a;
    if (n == 2 && a[1] <= a[0])
      cout << "NO\n";
    else {
      cout << "YES\n" << 2 << '\n' << a[0] << " ";
      for (i = 1; i < n; i++) cout << a[i];
      cout << '\n';
    }
  }
  return 0;
}
