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