#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;
template <typename T>
using matrix = vector<vector<T>>;
using Graph = matrix<int>;
template <typename T>
bool relax(T& r, const T& first) {
  if (first < r) {
    r = first;
    return true;
  }
  return false;
}
template <typename T>
bool heavy(T& h, const T& first) {
  if (h < first) {
    h = first;
    return true;
  }
  return false;
}
const int DX[8] = {-1, +1, +0, +0, +1, -1, +1, -1};
const int DY[8] = {+0, +0, -1, +1, +1, -1, -1, +1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int q;
  cin >> q;
  for (int n; q--;) {
    cin >> n;
    string s;
    cin >> s;
    string a, b;
    a = s.substr(0, 1);
    s.erase(s.begin());
    b = s;
    if (a.size() == b.size() && a >= b)
      cout << "NO\n";
    else {
      cout << "YES\n2\n";
      cout << a << ' ' << b << '\n';
    }
  }
  return false;
}
