#include <bits/stdc++.h>
using namespace std;
void no() { cout << "NO" << endl; }
void yes() { cout << "YES" << endl; }
int main() {
  int q, n, wyn;
  cin >> q;
  for (int i = 0; i < q; i++) {
    cin >> n;
    char a;
    string s;
    cin >> a;
    cin >> s;
    if (s.length() == 1 && a >= s[0])
      no();
    else {
      yes();
      cout << 2 << endl;
      cout << a << "\n" << s << endl;
    }
  }
}
