#include <bits/stdc++.h>
using namespace std;
int t = 0, n = 0;
string s;
int main() {
  cin >> t;
  while (t--) {
    scanf("%d", &n);
    cin >> s;
    if (s.length() == 2 && s[0] >= s[1]) {
      cout << "NO" << endl;
    } else {
      cout << "YES\n2\n" << s[0] << " ";
      s.erase(0, 1);
      cout << s << endl;
    }
  }
  return 0;
}
