#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s;
  int i, n;
  cin >> n;
  cin >> s;
  if (s.size() == 2 && s[0] >= s[1])
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    cout << 2 << endl;
    cout << s[0] << " ";
    for (i = 1; i < s.size(); i++) cout << s[i];
    cout << endl;
  }
}
int main() {
  int i, j, k, l, m, n, x, y, t;
  cin >> t;
  while (t--) solve();
}
