#include <bits/stdc++.h>
using namespace std;
struct abc {
  int p, q, idx;
};
bool compareTwoStudents(abc a, abc b) {
  if (a.p != b.p) return a.p < b.p;
  return (a.q < b.q);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s, s1, s2;
  int a, b, c, x, y, z, p, q, u, v, idx;
  int i, j, k, m, n, t, flag = 0, count = 0;
  cin >> q;
  while (q--) {
    cin >> n;
    cin >> s;
    if (s.length() == 2) {
      if (s[1] <= s[0]) {
        cout << "NO\n";
      } else {
        cout << "YES\n2\n";
        for (i = 0; i < s.length(); i++) {
          cout << s[i];
          if (i == 0) cout << " ";
        }
        cout << "\n";
      }
    } else {
      cout << "YES\n2\n";
      for (i = 0; i < s.length(); i++) {
        cout << s[i];
        if (i == 0) cout << " ";
      }
      cout << "\n";
    }
  }
  return 0;
}
