#include <bits/stdc++.h>
using namespace std;
char s[500];
int main() {
  long long t, k, i;
  cin >> t;
  while (t--) {
    cin >> k;
    cin >> s;
    if (k == 2) {
      if (s[0] >= s[1]) {
        cout << "NO" << '\n';
        continue;
      }
    }
    cout << "YES" << '\n';
    cout << 2 << '\n';
    cout << s[0];
    cout << ' ';
    for (i = 1; i < k; i++) cout << s[i];
    cout << '\n';
  }
  return 0;
}
