#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
const int INF = 0x3f3f3f3f;
const int iinf = 1 << 30;
const long long linf = 2e18;
const int MOD = 1000000007;
void print(int x) {
  cout << x << endl;
  exit(0);
}
void PRINT(string x) {
  cout << x << endl;
  exit(0);
}
void douout(double x) { printf("%lf\n", x + 0.0000000001); }
int n, q;
string s;
signed main() {
  scanf("%d", &q);
  while (q--) {
    scanf("%d", &n);
    cin >> s;
    if (n == 1 || (n == 2 && s[0] >= s[1]))
      cout << "NO\n";
    else {
      cout << "YES\n2\n";
      cout << s[0] << " " << s.substr(1) << endl;
    }
  }
  return 0;
}
