#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
int n, k, f;
string s, l, r;
int main() {
  cin >> n;
  for (int u = 0; u < n; u++) {
    cin >> k >> s;
    if (s.size() > 2) {
      cout << "YES\n";
      cout << "2\n";
      cout << s[0] << " " << s.substr(1) << "\n";
    } else if (s.size() == 2) {
      if (s[0] < s[1]) {
        cout << "YES\n";
        cout << "2\n";
        cout << s[0] << " " << s[1] << "\n";
      } else
        cout << "NO\n";
    } else
      cout << "NO\n";
  }
}
