#include <bits/stdc++.h>
using namespace std;
int main() {
  int q, n, x;
  char a, b;
  vector<char> v;
  cin >> q;
  for (int i = 0; i < q; i++) {
    x = 0;
    cin >> n;
    for (int j = 0; j < n; j++) {
      cin >> a;
      v.push_back(a);
    }
    if (v[0] < v[n - 1]) {
      cout << "YES" << endl;
      cout << "2" << endl;
      for (int j = 0; j < n; j++) {
        if (j == 0)
          cout << v[j] << " ";
        else
          cout << v[j];
      }
      cout << endl;
    } else {
      for (int j = 1; j < n - 1; j++) {
        if (v[j] != '0') {
          x = 1;
          break;
        }
      }
      if (x == 0)
        cout << "NO" << endl;
      else {
        cout << "YES" << endl;
        cout << "2" << endl;
        for (int j = 0; j < n; j++) {
          if (j == 0)
            cout << v[j] << " ";
          else
            cout << v[j];
        }
        cout << endl;
      }
    }
    v.clear();
  }
}
