#include <bits/stdc++.h>
using namespace std;
int q;
int n;
char s[10005];
int main() {
  cin >> q;
  while (q--) {
    cin >> n;
    cin >> s;
    if (n == 2 && s[0] >= s[1]) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      cout << 2 << endl;
      cout << s[0] << ' ' << s + 1 << endl;
    }
  }
  return 0;
}
