#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  cin >> TESTS;
  while (TESTS--) {
    int n;
    cin >> n;
    string s;
    cin >> s;
    if ((long long int)s.size() == 1)
      cout << "NO\n";
    else if ((long long int)s.size() == 2) {
      if (s[0] < s[1]) {
        cout << "YES\n2\n";
        cout << s[0] << " " << s[1] << "\n";
      } else
        cout << "NO\n";
    } else {
      cout << "YES\n2\n";
      cout << s[0] << " " << s.substr(1, n - 1) << "\n";
    }
  }
  return 0;
}
