#include <bits/stdc++.h>
using namespace std;
int n;
int q;
char s[500];
void czyt() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> s[i];
}
void rozw() {
  if (n <= 1) {
    cout << "NO\n";
    return;
  }
  if (n == 2 & s[0] >= s[1]) {
    cout << "NO\n";
    return;
  }
  cout << "YES\n2\n";
  cout << s[0] << " ";
  for (int i = 1; i < n; i++) cout << s[i];
  cout << "\n";
}
int main() {
  cin >> q;
  while (q-- > 0) {
    czyt();
    rozw();
  }
}
