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