#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int q, l, c;
  cin >> q;
  string s;
  for (long long int j = 0; j < q; j++) {
    cin >> l;
    cin >> s;
    if (l == 2) {
      c = stoi(s);
      if (c / 10 < c % 10) {
        cout << "YES" << endl << "2" << endl;
        cout << c / 10 << " " << c % 10 << endl;
      } else
        cout << "NO" << endl;
    } else if (l % 2 != 0) {
      cout << "YES" << endl << "2" << endl;
      for (long long int i = 0; i < l / 2; i++) cout << s[i];
      cout << " ";
      for (long long int i = l / 2; i < l; i++) cout << s[i];
      cout << endl;
    } else {
      cout << "YES" << endl << "2" << endl;
      for (long long int i = 0; i < (l / 2 - 1); i++) {
        cout << s[i];
      }
      cout << " ";
      for (long long int i = (l / 2 - 1); i < l; i++) cout << s[i];
      cout << endl;
    }
  }
  return 0;
}
