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