#include <bits/stdc++.h>
using namespace std;
long long t[2001];
string s[2001];
int main() {
  long long a;
  cin >> a;
  for (int i = 0; i < a; i++) {
    cin >> t[i] >> s[i];
  }
  for (int i = 0; i < a; i++) {
    if (t[i] > 2) {
      cout << "YES" << endl;
      cout << 2 << endl;
      cout << s[i][0] << " ";
      for (int j = 1; j < s[i].size(); j++) cout << s[i][j];
      cout << endl;
    } else if (int(s[i][0] - 48) >= int(s[i][1] - 48)) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
      cout << 2 << endl;
      cout << s[i][0] << " " << s[i][1] << endl;
    }
  }
}
