#include <bits/stdc++.h>
using namespace std;
const char duom[] = "i.txt";
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int q;
  cin >> q;
  string s;
  while (q--) {
    int n;
    cin >> n >> s;
    if (n == 2) {
      if (s[0] >= s[1]) {
        cout << "NO" << endl;
        continue;
      }
    }
    cout << "YES" << endl << 2 << endl;
    cout << s[0] << " ";
    for (int i = 1; i < n; i++) cout << s[i];
    cout << endl;
  }
  return 0;
}
