#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n;
  string s;
  cin >> t;
  for (int k = 0; k < t; k++) {
    cin >> n >> s;
    if (n == 2 && s[0] >= s[1])
      puts("NO");
    else {
      puts("YES");
      puts("2");
      cout << s[0] << " ";
      s.erase(s.begin());
      cout << s << endl;
    }
  }
  return 0;
}
