#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int q;
  long long int i, j, k, l, n, m;
  cin >> q;
  while (q--) {
    cin >> n;
    string s;
    cin >> s;
    if (n == 2 && s[0] >= s[1]) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      cout << 2 << endl;
      cout << s[0] << " ";
      for (i = 1; i < n; i++) cout << s[i];
      cout << endl;
    }
  }
}
