#include <bits/stdc++.h>
using namespace std;
const int N = (5e5) + 322;
const long long INF = 2e18 + 17;
const int inf = 2e9 + 17;
const int MOD = 998244353;
const double eps = 1e-9;
int q, n;
string s;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cin >> q;
  for (int i = 1; i <= q; ++i) {
    cin >> n;
    cin >> s;
    if (n == 1 || (n == 2 && s[0] >= s[1])) {
      cout << "NO"
           << "\n";
      continue;
    }
    cout << "YES"
         << "\n";
    cout << 2 << "\n";
    cout << s[0] << ' ' << s.substr(1) << "\n";
  }
  return 0;
}
