#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    int n, i;
    cin >> n;
    string s;
    cin >> s;
    if (n == 2 && s[0] >= s[1]) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      cout << 2 << endl;
      cout << s[0] << " " << s.substr(1) << endl;
    }
  }
  return 0;
}
