#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int q;
  cin >> q;
  while (q--) {
    long long int n;
    cin >> n;
    string s, s1, s2;
    cin >> s;
    s1 = s.substr(0, 1);
    s2 = s.substr(1);
    if (n > 2 || (n == 2 && s1 < s2))
      cout << "YES\n" << 2 << "\n" << s1 << " " << s2 << "\n";
    else
      cout << "NO\n";
  }
  return 0;
}
