#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, j, k, l, f;
  cin >> n;
  char arr[n][500];
  for (i = 0; i < n; i++) {
    cin >> f;
    scanf("%s", arr[i]);
  }
  for (j = 0; j < n; j++) {
    if (strlen(arr[j]) > 2) {
      cout << "YES\n" << 2 << endl;
      cout << arr[j][0] << ' ';
      for (i = 1; i < strlen(arr[j]); i++) cout << arr[j][i];
    } else if (arr[j][0] < arr[j][1]) {
      cout << "YES\n" << 2 << endl << arr[j][0] << ' ' << arr[j][1];
    } else {
      cout << "NO\n";
    }
    cout << endl;
  }
}
