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