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