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