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