import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.string;

void solve() {
    auto N = readln.chomp.to!int;
    auto S = readln.chomp;

    if (N == 1) {
        writeln("NO");
        return;
    }

    if (N == 2) {
        if (S[0] >= S[1]) {
            writeln("NO");
            return;
        }
    }

    writeln("YES");
    writeln(2);
    writeln(S[0], " ", S[1..$]);
}

void main() {
    auto T = readln.chomp.to!int;
    while (T--) solve;
}
