#include <bits/stdc++.h>
using namespace std;
int Q, N;
string S;
string p;
int main() {
  for (cin >> Q; Q; Q--) {
    cin >> N;
    char c;
    cin >> c;
    p.clear();
    S.clear();
    p.push_back(c);
    for (int i = 1; i < N; i++) {
      cin >> c;
      S.push_back(c);
    }
    if (p.size() == S.size() && p >= S)
      cout << "NO\n";
    else
      cout << "YES\n2\n" << p << " " << S << "\n";
  }
  return 0;
}
