#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.14159265358979323;
const long long mx64 = 9223372036854775807;
const int mx32 = 2147483647;
const short int mx16 = 32767;
const long long mod_1 = 1000000007;
const long long mod_2 = 1000000009;
const long long mod_3 = 998244353;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q;
  cin >> q;
  for (int i = 0; i < q; i++) {
    int s;
    cin >> s;
    vector<char> a(s);
    for (int j = 0; j < s; j++) {
      cin >> a[j];
    }
    if (s == 2) {
      if (a[0] >= a[1]) {
        cout << "NO\n";
      } else {
        cout << "YES\n2\n" << a[0] << " " << a[1] << "\n";
      }
    } else {
      cout << "YES\n2\n";
      cout << a[0] << " ";
      for (int j = 1; j < s; j++) {
        cout << a[j];
      }
      cout << "\n";
    }
  }
  return 0;
}
