#include <bits/stdc++.h>
using namespace std;
const int magic_const = 1e9 + 20;
const long long mod = 1000 * 1000 * 1000 + 7;
const int LOG_NUM = 20;
int n, m, k;
vector<int> a;
void solve() {
  int q;
  cin >> q;
  for (int i = 0; i < q; i++) {
    cin >> n;
    string s;
    cin >> s;
    if (n == 2 && s[1] <= s[0]) {
      cout << "NO"
           << "\n";
    } else {
      cout << "YES"
           << "\n";
      cout << 2 << "\n";
      cout << s[0] << " ";
      for (int i = 1; i < n; i++) {
        cout << s[i];
      }
      cout << "\n";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
}
