#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string s;
  int q;
  int n;
  cin >> q;
  while (q--) {
    cin >> n;
    cin >> s;
    if ((s[0] - '0') >= (s[1] - '0') && n == 2)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      cout << 2 << endl;
      cout << s[0] << " ";
      for (int i = 1; i < n; i++) cout << s[i];
      cout << endl;
    }
  }
}
