#include <bits/stdc++.h>
using namespace std;
int T, N, i, j;
string str;
bool ok;
int main() {
  cin >> T;
  while (T--) {
    cin >> N >> str;
    if ((N == 2 && str[0] >= str[1]) || N == 1)
      cout << "NO";
    else {
      cout << "YES"
           << "\n";
      cout << "2"
           << "\n";
      cout << str[0] << " ";
      for (i = 1; i < N; i++) cout << str[i];
    }
    cout << "\n";
  }
  return 0;
}
