#include <bits/stdc++.h>
using namespace std;
long long int t;
int main() {
  cin >> t;
  while (t--) {
    long long int n;
    string s;
    cin >> n >> s;
    if (s.size() == 2 && s[0] >= s[1]) {
      cout << "NO" << '\n';
    } else {
      cout << "YES" << '\n' << 2 << '\n' << s[0] << " ";
      for (int i = 1; i < s.size(); i++) {
        cout << s[i];
      }
      cout << '\n';
    }
  }
  return 0;
}
