#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    string s;
    int u = 0;
    cin >> u;
    cin >> s;
    if (u == 1) {
      cout << "NO\n";
      u = 1;
    } else if (u == 2) {
      int m = s[0] - '0';
      int n = s[1] - '0';
      if (n <= m) {
        cout << "NO\n";
      } else {
        cout << "YES\n";
        cout << "2\n";
        cout << s[0] << " " << s[1] << "\n";
      }
    } else {
      cout << "YES \n";
      cout << "2\n";
      cout << s[0] << " ";
      for (int i = 1; i < u; i++) {
        cout << s[i];
      }
      cout << "\n";
    }
  }
  return 0;
}
