#include <bits/stdc++.h>
using namespace std;
int main() {
  int Q;
  cin >> Q;
  while (Q-- > 0) {
    int N;
    string S;
    cin >> N >> S;
    if (N == 2 && S[0] >= S[1]) {
      cout << "NO" << '\n';
    } else {
      cout << "YES" << '\n';
      cout << 2 << '\n';
      cout << S[0] << ' ' << S.substr(1) << '\n';
    }
  }
}
