#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int l;
    string s;
    cin >> l >> s;
    if ((l == 2) && (s[0] >= s[1])) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      cout << "2" << endl;
      cout << s[0] << " " << s.substr(1) << endl;
    }
  }
}
