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