You are given a sequence $s$ consisting of $n$ digits from $1$ to $9$.

You have to divide it into at least two segments (segment — is a consecutive sequence of elements) (in other words, you have to place separators between some digits of the sequence) in such a way that each element belongs to exactly one segment and if the resulting division will be represented as an integer numbers sequence then each next element of this sequence will be strictly greater than the previous one.

More formally: if the resulting division of the sequence is $t_1, t_2, \dots, t_k$, where $k$ is the number of element in a division, then for each $i$ from $1$ to $k-1$ the condition $t_{i} < t_{i + 1}$ (using numerical comparing, it means that the integer representations of strings are compared) should be satisfied.

For example, if $s=654$ then you can divide it into parts $[6, 54]$ and it will be suitable division. But if you will divide it into parts $[65, 4]$ then it will be bad division because $65 > 4$. If $s=123$ then you can divide it into parts $[1, 23]$, $[1, 2, 3]$ but not into parts $[12, 3]$.

Your task is to find any suitable division for each of the $q$ independent queries.


-----Input-----

The first line of the input contains one integer $q$ ($1 \le q \le 300$) — the number of queries.

The first line of the $i$-th query contains one integer number $n_i$ ($2 \le n_i \le 300$) — the number of digits in the $i$-th query.

The second line of the $i$-th query contains one string $s_i$ of length $n_i$ consisting only of digits from $1$ to $9$.


-----Output-----

If the sequence of digits in the $i$-th query cannot be divided into at least two parts in a way described in the problem statement, print the single line "NO" for this query.

Otherwise in the first line of the answer to this query print "YES", on the second line print $k_i$ — the number of parts in your division of the $i$-th query sequence and in the third line print $k_i$ strings $t_{i, 1}, t_{i, 2}, \dots, t_{i, k_i}$ — your division. Parts should be printed in order of the initial string digits. It means that if you write the parts one after another without changing their order then you'll get the string $s_i$.

See examples for better understanding.


-----Example-----
Input
4
6
654321
4
1337
2
33
4
2122

Output
YES
3
6 54 321
YES
3
1 3 37
NO
YES
2
21 22

Difficulty: EASY

Solutions:
for _ in range(int(input())):
	n = int(input())
	s = input()
	if n == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES\n2')
		print(s[0], s[1:])


t = int(input())
while t > 0:
	n = int(input())
	s = input()
	if n == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0] + ' ' + s[1:])
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	x = s[0]
	y = s[1:]
	if int(x) < int(y):
		print('YES')
		print(2)
		print(x, y)
	else:
		print('NO')


q = int(input())
for _ in range(q):
	n = int(input())
	s = input()
	if len(s) == 2:
		if int(s[0]) >= int(s[1]):
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0], s[1])
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


n = int(input())
for i in range(n):
	k = int(input())
	t = input()
	if int(t[0]) < int(t[1:]):
		print('YES', '\n', 2, '\n', t[0] + ' ' + t[1:], sep='')
	else:
		print('NO')


t = int(input())
while t:
	t = t - 1
	n = int(input())
	str = input()
	if n != 2:
		print('YES')
		print('2')
		print(str[0], str[1:n])
	elif str[0] == str[1] or str[0] > str[1]:
		print('NO')
	else:
		print('YES')
		print('2')
		print(str[0], str[1])


for _ in range(int(input())):
	input()
	x = int(input())
	if x < 10:
		print('NO')
	elif x < 100 and x // 10 >= x % 10:
		print('NO')
	else:
		print('YES')
		x = str(x)
		print(2)
		print(x[0], x[1:])


q = int(input())
for x in range(q):
	n = int(input())
	s = input().rstrip()
	if n == 2:
		if s[0] == s[1]:
			print('NO')
		elif s[0] > s[1]:
			print('NO')
		elif s[0] < s[1]:
			print('YES')
			print('2')
			print(s[0], s[1])
	else:
		print('YES')
		print('2')
		print(s[0], s[1:])


q = int(input())
for i in range(q):
	x = int(input())
	str = input()
	if x == 2 and str[1] <= str[0]:
		print('NO')
	else:
		print('YES')
		print('2')
		print(str[0], end=' ')
		for i in range(x - 1):
			print(str[i + 1], end='')
		print()


n = int(input())
for _ in range(n):
	l = int(input())
	s = input()
	if l >= 3:
		print('YES')
		print('2')
		print(s[0], s[1:])
	elif l == 2:
		if s[0] >= s[1]:
			print('NO')
		else:
			print('YES\n2')
			print(s[0], s[1])
	else:
		print('NO')


q = int(input())
for i in range(q):
	k = int(input())
	n = int(input())
	if k > 2:
		print('YES')
		print(2)
		print(str(n)[0], str(n)[1:])
	elif str(n)[0] < str(n)[1]:
		print('YES')
		print(2)
		print(str(n)[0], str(n)[1])
	else:
		print('NO')


k = int(input())
for i in range(k):
	l = int(input())
	g = input()
	if int(g[0]) < int(g[1:]):
		print('YES')
		print(2)
		print(g[0], g[1:])
	else:
		print('NO')


def rlist():
	return list(map(int, input().split()))

def rdi():
	return int(input())
n = rdi()
for i in range(n):
	k = rdi()
	line = input()
	if len(line) == 1:
		print('NO')
	elif len(line) == 2 and line[0] >= line[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(line[0], line[1:])


q = int(input())
for _ in range(q):
	n = int(input())
	s = input()
	s1 = s[:1]
	s2 = s[1:]
	if n >= 3 or s1 < s2:
		print('YES')
		print(2)
		print(s1, s2)
	else:
		print('NO')


q = int(input())
for w in range(q):
	n = int(input())
	ch = input()
	if int(ch[0]) < int(ch[1:]):
		print('YES')
		print('2')
		print('{} {}'.format(ch[0], ch[1:]))
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	if n >= 3:
		print('YES')
		print(2)
		print(s[0] + ' ' + s[1:])
	elif int(s[1]) > int(s[0]):
		print('YES')
		print(2)
		print(s[0] + ' ' + s[1])
	else:
		print('NO')


q = int(input())
res = []
for _ in range(q):
	n = int(input())
	s = input()
	if n == 2 and s[0] >= s[1]:
		res.append(['NO'])
	else:
		res.append(['YES', s[0], s[1:]])
for elem in res:
	if elem[0] == 'NO':
		print('NO')
	else:
		print('YES')
		print(2)
		print(elem[1], elem[2])


def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
for _ in range(ii()):
	n = ii()
	s = input()
	temp = s[0]
	rest = s[1:]
	if int(temp) >= int(rest):
		print('NO')
	else:
		print('YES')
		print(2)
		print(temp, rest)


nr_of_testcases = int(input())
for testcase in range(nr_of_testcases):
	n = int(input())
	s = input()
	if len(s) == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


q = int(input())
for i in range(q):
	n = int(input())
	data = input()
	if len(data) == 2:
		if data[0] >= data[1]:
			print('NO')
			continue
	print('YES')
	print(2)
	print(data[0] + ' ' + data[1:])


for _ in range(int(input())):
	n = int(input())
	c = []
	s = input()
	if len(s) == 1:
		print('NO')
	elif len(s) == 2:
		if s[1] <= s[0]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0], s[1])
	else:
		print('YES')
		print(2)
		b = ''
		for i in range(1, len(s)):
			b += s[i]
		print(s[0], b)


T = int(input())
for _ in range(T):
	_ = input()
	S = input()
	if int(S[0]) < int(S[1:]):
		print('YES\n2')
		print(S[0], S[1:])
	else:
		print('NO')


a = int(input())
for i in range(a):
	c = int(input())
	b = input()
	if c > 2:
		print('YES')
		print(2)
		print(b[0], b[1:])
	elif c == 2 and int(b[0]) < int(b[1]):
		print('YES')
		print(2)
		print(b[0], b[1])
	else:
		print('NO')


import sys
from math import ceil, floor
input = sys.stdin.readline
t = int(input())
for zzz in range(t):
	n = int(input())
	a = list(map(int, input().strip()))
	if len(a) == 2:
		if a[0] < a[1]:
			print('YES')
			print(2)
			print(str(a[0]) + ' ' + str(a[1]))
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		print(str(a[0]) + ' ' + ''.join([str(x) for x in a[1:]]))


def get():
	return map(int, input().split())
n = int(input())
for i in range(n):
	x = int(input())
	s = input()
	if x > 2:
		print('YES')
		print(2)
		print(s[0], s[1:])
	elif int(s[1]) > int(s[0]):
		print('YES')
		print(2)
		print(s[0], s[1])
	else:
		print('NO')


import sys
import math
q = int(input())
for _ in range(q):
	n = int(input())
	nums_str = input()
	nums = []
	for i in range(n):
		nums.append(int(nums_str[i]))
	if n > 2:
		print('YES')
		print('2')
		print(nums[0], end=' ')
		print(nums_str[1:])
	elif nums[0] < nums[1]:
		print('YES')
		print('2')
		print(nums[0], end=' ')
		print(nums[1])
	else:
		print('NO')


for t in range(int(input())):
	n = int(input())
	s = input()
	arr = [0] * n
	for i in range(len(s)):
		arr[i] = int(s[i])
	if len(arr) == 1:
		print('NO')
	elif len(arr) == 2:
		if arr[0] >= arr[1]:
			print('NO')
		else:
			print('YES')
			print('2')
			print(arr[0], arr[1])
	else:
		print('YES')
		print('2')
		print(arr[0], end=' ')
		for i in range(1, len(arr)):
			print(arr[i], end='')
		print()


t = int(input())
for i in range(t):
	n = int(input())
	p = int(input())
	x = str(p)
	if n >= 3:
		print('YES')
		print(2)
		print(x[0], end=' ')
		for j in range(1, n):
			print(x[j], end='')
		print()
	if n == 2:
		if x[0] < x[1]:
			print('YES')
			print(2)
			print(x[0], end=' ')
			print(x[1])
		else:
			print('NO')


n = int(input())
for i in range(n):
	(p, s) = (int(input()), str(input()))
	if len(s) == 2:
		if s[0] < s[1]:
			print('YES')
			print('2')
			print(s[0] + ' ' + s[1])
		else:
			print('NO')
	else:
		print('YES')
		print('2')
		print(s[0] + ' ' + s[1:])


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(input())
	if int(a[0]) < int(''.join(a[1:n])):
		print('YES')
		print(2)
		print(a[0], ''.join(a[1:n]))
	else:
		print('NO')


for __ in range(int(input())):
	n = int(input())
	k = input()
	if int(k[0]) < int(k[1:]):
		print('YES')
		print(2)
		print(k[0], k[1:])
	elif len(k) == 1:
		print('NO')
	else:
		print('NO')


q = int(input())
while q:
	div = []
	n_q = int(input())
	s = input()
	if n_q == 2:
		if int(s[0]) < int(s[1]):
			print('YES')
			print(2)
			print(s[0], s[1])
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])
	q -= 1


import math
import os
import random
import re
import sys

def solve(n, s):
	next_length = 1
	results = list(s[0])
	last_result = s[0]
	current = list()
	current_is_bigger = False
	is_definitely_smaller = False
	j = 0
	i = 1
	while i < n:
		current.append(s[i])
		if not current_is_bigger:
			if last_result[j] < s[i]:
				current_is_bigger = True
			elif last_result[j] > s[i]:
				current_is_bigger = True
				next_length += 1
		j += 1
		if j == next_length:
			if not current_is_bigger:
				next_length += 1
				i += 1
				if i >= n:
					return ('NO', None, None)
				current.append(s[i])
			last_result = ''.join(current)
			results.append(last_result)
			j = 0
			current = list()
			current_is_bigger = False
		i += 1
	if len(results) > 1:
		if len(current) != 0:
			results[len(results) - 1] = results[len(results) - 1] + ''.join(current)
		return ('YES', len(last_result), ' '.join(results))
	else:
		return ('NO', None, None)
q = int(input().strip())
for _ in range(q):
	digits = int(input())
	s = input().strip()
	if digits == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print('2')
		print(s[0] + ' ' + s[1:])


for _ in range(int(input())):
	N = int(input())
	s = input()
	if len(s) == 1:
		print('NO')
	elif len(s) == 2:
		if s[0] < s[1]:
			print('YES\n2\n' + s[0] + ' ' + s[1])
		else:
			print('NO')
	else:
		print('YES\n2\n' + s[0] + ' ' + s[1:])


for _ in range(int(input())):
	n = int(input())
	s = input()
	arr = list(map(int, list(s)))
	if n == 2:
		if arr[0] >= arr[1]:
			print('NO')
			continue
	print('YES\n2')
	print(arr[0], end=' ')
	for i in range(1, n):
		print(arr[i], end='')
	print()


casos = int(input())
for i in range(casos):
	n = int(input())
	cadena = input()
	if n == 2:
		if int(cadena[1]) > int(cadena[0]):
			print('YES')
			print(n)
			aux = cadena[0] + ' ' + cadena[1]
			print(aux)
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		aux = cadena[0] + ' ' + cadena[1:]
		print(aux)


def delimiter(number: str):
	for i in range(1, len(number)):
		if int(number[:i]) < int(number[i:]):
			return [number[:i], number[i:]]
	return []
q = int(input())
to_print_list = []
for index in range(0, q):
	useless_string = input()
	s = input()
	after_transform = delimiter(s)
	if len(after_transform) > 0:
		to_print_list.append('YES')
		to_print_list.append('2')
		to_print_list.append(after_transform[0] + ' ' + after_transform[1])
	else:
		to_print_list.append('NO')
for string in to_print_list:
	print(string)


q = int(input())

def toPrint(a):
	print('YES')
	print(2)
	print(a[0], a[1:])
for _ in range(q):
	n = int(input())
	s = str(input())
	if n != 2:
		toPrint(s)
	elif s[1] > s[0]:
		toPrint(s)
	else:
		print('NO')


q = int(input())
for i in range(0, q):
	n = int(input())
	s = str(input())
	div = True
	if n == 2 and int(s[0:1]) >= int(s[1:2]):
		div = False
	if div == True:
		print('YES')
		print(2)
		print(s[:1] + ' ' + s[1:])
	else:
		print('NO')


q = int(input())
while q > 0:
	n = int(input())
	inp = input()
	res = []
	if len(inp) == 1:
		print('NO')
	elif len(inp) == 2 and int(inp[0]) >= int(inp[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(' '.join([inp[0], inp[1:]]))
	q -= 1


q = int(input())
while q > 0:
	q -= 1
	n = int(input())
	s = input()
	if n > 2:
		print('YES')
		print(2)
		print(s[0], s[1:])
	elif s[0] < s[1]:
		print('YES')
		print(2)
		print(s[0], s[1])
	else:
		print('NO')


def condition(parts):
	ok = True
	for i in range(len(parts) - 1):
		if int(parts[i + 1]) > int(parts[i]):
			pass
		else:
			ok = False
			if len(parts[i + 1]) == 1 and len(parts[i]) == 1:
				return None
	return ok

def search_rec(parts):
	if len(parts) < 2:
		return None
	cond = condition(parts)
	if cond is None:
		return None
	if cond:
		return parts
	else:
		for i in range(len(parts)):
			if len(parts[i]) > 1:
				for j in range(len(parts[i]) - 1):
					parts_next = list(parts)
					parts_next[i] = parts[i][:j]
					parts_next.insert(i + 1, parts[i][j:])
					search_rec_res = search_rec(parts_next)
					if search_rec_res:
						return search_rec_res

def search(n):
	if len(n) < 2:
		return None
	for i in range(1, len(n)):
		search_res = search_rec([n[:i], n[i:]])
		if search_res:
			return search_res
q = int(input())
for _ in range(q):
	input()
	n = input()
	solution = search(n)
	if solution:
		print('YES')
		print(len(solution))
		print(' '.join(solution))
	else:
		print('NO')


for _ in range(int(input().strip())):
	n = int(input().strip())
	s = input().strip()
	if n == 1:
		print('NO')
		continue
	if n == 2:
		if int(s[0]) >= int(s[1]):
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0], s[1])
		continue
	print('YES')
	print(2)
	print(s[0], s[1:])


q = int(input())
for i in range(q):
	n = int(input())
	str = input()
	fn = str[0]
	sn = str[1:]
	if int(fn) >= int(sn):
		print('NO')
	else:
		print('YES')
		print(2)
		print('{} {}'.format(fn, sn))


def ckeck(a, t):
	ans = []
	if len(a) == 2:
		if int(a[0]) < int(a[1]):
			ans.append('YES')
			ans.append(a)
			return ans
		else:
			ans.append('NO')
			return ans
	elif len(a) > 2:
		if int(a[0]) < int(a[1:]):
			ans.append('YES')
			ans.append(a)
			return ans
		else:
			ans.append('NO')
			return ans
	else:
		ans.append('NO')
		return ans

def _print(ar):
	for i in ar:
		if len(i) == 1:
			print(i[0])
		else:
			print(i[0])
			print(2)
			print(i[1][0], i[1][1:])
_list = []
n = int(input())
for i in range(n):
	t = int(input())
	a = input()
	_list.append(ckeck(a, t))
_print(_list)


for _ in range(int(input())):
	n = int(input())
	z = input()
	if n == 2 and z[0] >= z[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(z[0], z[1:])


import sys
import bisect
from collections import Counter
read_int = lambda : int(sys.stdin.readline())
read_ints = lambda : map(int, sys.stdin.readline().split())
read_int_list = lambda : list(read_ints())
read = lambda : sys.stdin.readline().strip()
read_list = lambda : sys.stdin.readline().split()

def main():
	n = read_int()
	for _ in range(n):
		l = read_int()
		s = read()
		res = 'NO'
		for k in range(1, l):
			tmp = s[:k]
			ne = s[k:]
			if int(tmp) < int(ne):
				res = 'YES\n2\n%s %s' % (tmp, ne)
				break
		print(res)
main()


for i in range(int(input())):
	t = int(input())
	if t - 1:
		a = input()
		if int(a[0]) < int(a[1:]):
			print('YES')
			print(2)
			print(str(a[0]) + ' ' + str(a[1:]))
		else:
			print('NO')
	else:
		print('NO')


n = int(input())
for i in range(n):
	m = int(input())
	s = str(input())
	e = s[0]
	f = s[1:]
	if int(f) > int(e):
		print('YES')
		print(2)
		print(e + ' ' + f)
	else:
		print('NO')


n = int(input())
answer = []
num = []
for i in range(n):
	m = int(input())
	a = input()
	if len(a) == 2:
		c = int(a[0])
		f = int(a[1])
		if c < f:
			answer.append('YES')
			num.append(a)
		else:
			answer.append('NO')
			num.append(a)
	if len(a) >= 3:
		answer.append('YES')
		num.append(a)
for i in range(n):
	print(answer[i])
	if answer[i] == 'YES':
		print('2')
		print(num[i][0], num[i][1:])


from collections import deque
from sys import stdin
lines = deque((line.strip() for line in stdin.readlines()))

def nextline():
	return lines.popleft()

def types(cast, sep=None):
	return tuple((cast(x) for x in strs(sep=sep)))

def ints(sep=None):
	return types(int, sep=sep)

def strs(sep=None):
	return tuple(nextline()) if sep == '' else tuple(nextline().split(sep=sep))

def main():
	T = int(nextline())
	for testCase in range(1, T + 1):
		n = int(nextline())
		s = nextline()
		if n == 2 and int(s[0]) >= int(s[1]):
			print('NO')
		else:
			print('YES')
			print('2')
			print(s[0], s[1:])
main()


n = int(input())
for i in range(n):
	l = int(input())
	nums = input()
	if int(nums[0]) < int(nums[1:]):
		print('YES')
		print(2)
		print(nums[0], nums[1:])
	else:
		print('NO')


for _ in range(int(input())):
	input()
	s = input()
	if int(s[0]) < int(s[1:]):
		print('YES')
		print(2)
		print(s[0], s[1:])
	else:
		print('NO')


q = int(input())
for i in range(q):
	d = int(input())
	k = int(input())
	if d == 1 or (d == 2 and k // 10 >= k % 10):
		print('NO')
	else:
		print('YES')
		print(2)
		print(str(k)[0], str(k)[1:])


n = int(input())

def solve():
	q = int(input())
	s = input()
	if len(s) is 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:len(s)])
for i in range(n):
	solve()


temp = []
n = int(input())
for i in range(n):
	k = int(input())
	temp.append(input())
for i in range(n):
	str1 = temp[i]
	if len(str1) > 2:
		print('YES')
		print('2')
		print(str1[0:1], str1[1:])
	elif str1[0] < str1[1]:
		print('YES')
		print('2')
		print(str1[0:1], str1[1:])
	else:
		print('NO')


def digitsSequenceDividing(q):
	for i in range(q):
		n = int(input())
		s = input()
		if n == 2 and s[0] >= s[1]:
			print('NO')
		else:
			print('YES\n2\n' + s[:1] + ' ' + s[1:])

def main():
	q = int(input())
	digitsSequenceDividing(q)
main()


for i in range(int(input())):
	n = int(input())
	a = input()
	if len(a) < 2 or (len(a) == 2 and a[0] >= a[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(a[0], a[1:])


for i in range(int(input())):
	a = int(input())
	s = input()
	if int(s[0]) < int(s[1:]):
		print('YES')
		print(2)
		print(s[0], s[1:])
	else:
		print('NO')


t = int(input())
for k in range(t):
	size = int(input())
	val = str(input())
	if size == 2:
		if int(val[0]) >= int(val[1]):
			print('NO')
		else:
			print('YES')
			print('2')
			print(val[0] + ' ' + val[1:])
	else:
		print('YES')
		print('2')
		print(val[0] + ' ' + val[1:])


q = int(input())
for _ in range(q):
	length = int(input())
	n = input()
	if length == 2:
		if int(n[0]) < int(n[1]):
			print('YES')
			print('2')
			print(n[0], n[1])
		else:
			print('NO')
	else:
		print('YES')
		print('2')
		print(n[0], n[1:])


q = int(input())
for i in range(0, q):
	out = []
	length = input()
	if length == '1':
		print('NO')
	elif length == '2':
		s = input()
		if s[0] < s[1]:
			out.insert(0, s[0])
			out.insert(1, s[1])
			print('YES')
			print('2')
			print(out[0], out[1])
		else:
			print('NO')
	else:
		s = input()
		group = []
		group.insert(0, s[0])
		group.insert(1, s[1:len(s)])
		print('YES')
		print(len(group))
		print(' '.join((str(x) for x in group)))


def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())
q = ii()
while q > 0:
	n = ii()
	s = input()
	if n == 2 and int(s[0]) >= int(s[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0] + ' ' + s[1:])
	q = q - 1


x = int(input())
m = 0
num2 = ''
for i in range(x):
	n = int(input())
	num = input()
	if n > 2 or num[0] < num[1]:
		print('YES')
		print(2)
		print(num[0], end=' ')
		print(num[1:], sep=' ')
	else:
		print('NO')


n = int(input())
for i in range(n):
	l = int(input())
	s = input()
	if l == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


n = int(input())

def fix_string(str):
	(prev, next) = (str[0], str[1:])
	if len(str) == 2 and prev >= next:
		print('NO')
	else:
		print('YES')
		print(2)
		print(prev, next)
for i in range(n):
	m = int(input())
	str = input()
	fix_string(str)


q = int(input())

def solve(st):
	if any([len(st) < 2, len(st) == 2 and int(st[0]) >= int(st[1])]):
		print('NO')
		return
	print('YES')
	print('2')
	print(' '.join([st[0], st[1:]]))
for _ in range(q):
	numbers = int(input())
	st = input()
	solve(st)


n = int(input())
a = []
for i in range(n):
	b = [0, 0]
	b[0] = int(input())
	b[1] = int(input())
	a.append(b)
for i in range(n):
	q = []
	m = a[i][1]
	q[:0] = str(m)
	if int(m / 10 ** (len(q) - 1)) < int(m % 10 ** (len(q) - 1)):
		print('YES')
		print('2')
		z = q[0]
		q.pop(0)
		print(str(z) + ' ' + ''.join((str(j) for j in q)))
	else:
		print('NO')


nq = int(input())
for qqq in range(nq):
	n = int(input())
	s = input()
	if int(s[0]) < int(s[1:]):
		print('YES')
		print(2)
		print(s[0], s[1:])
	else:
		print('NO')


t = int(input())
for cases in range(0, t):
	len = int(input())
	num = input()
	if len == 2:
		if num[0] >= num[1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(num[0], num[1])
	else:
		print('YES')
		print(2)
		print(num[0], num[1:])


def digits(n):
	x = n[0]
	y = n[1:]
	if int(x) == int(y) or int(x) > int(y):
		print('NO')
	else:
		print('YES\n' + '2\n' + str(x) + ' ' + str(y))
for _ in range(int(input())):
	a = int(input())
	n = input()
	digits(n)


Q = int(input())
n_s = []
numbers_q = []
for q in range(Q):
	n_s.append(int(input()))
	numbers_q.append([input()])
for numbers_l in numbers_q:
	numbers = numbers_l[0]
	if len(numbers) >= 3:
		print('YES')
		print(2)
		print(numbers[:1] + ' ' + numbers[1:])
	elif int(numbers[0]) < int(numbers[1]):
		print('YES')
		print(2)
		print(numbers[0] + ' ' + numbers[1])
	else:
		print('NO')


def spl(a, b):
	if a == 2:
		if b[0] < b[1]:
			print('YES')
			print(2)
			print(b[0] + ' ' + b[1])
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		print(b[0] + ' ' + b[1:])
q = int(input())
arr = []
for i in range(q):
	a = int(input())
	b = str(input())
	arr.append([a, b])
for i in arr:
	spl(i[0], i[1])


q = int(input())
for i in range(q):
	n = int(input())
	s = input()
	s1 = s[0:1]
	s2 = s[1:len(s)]
	if len(s) == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(s1 + ' ' + s2)


q = int(input())
for _ in range(q):
	l = int(input())
	s = input()
	if l == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


from math import *
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	if int(s[0]) >= int(s[1:]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


def sequence_dividing(sequence):
	if sequence is None:
		return ('NO', None)
	if len(sequence) == 2 and sequence[0] >= sequence[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(str(sequence[0]) + ' ' + str(sequence[1:]))
n = int(input())
for _ in range(n):
	_ = int(input())
	sequence_dividing(str(input()))


q = int(input())
while q != 0:
	q -= 1
	n = int(input())
	s = input()
	if len(s) == 2 and int(s[0]) >= int(s[1]):
		print('NO')
	else:
		print('YES')
		print('2')
		print(s[0] + ' ' + s[1:])


import sys

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline().strip('\n')
for _ in range(int(input())):
	n = int(input())
	l = list(input())
	if len(l) == 2 and l[0] >= l[1]:
		print('NO')
	else:
		print('YES\n', '2\n', l[0], ' ', *l[1:], sep='')


for _ in range(int(input())):
	t = int(input())
	sn = input()
	if t == 2:
		if sn[0] < sn[1]:
			print('YES\n2')
			print(sn[0], sn[1])
		else:
			print('NO')
	else:
		print('YES\n2')
		print(sn[0], sn[1:])


INF = 100000000
from collections import deque
t = int(input())
for test in range(t):
	n = int(input())
	num = input()
	if int(num[0]) < int(num[1:]):
		print('YES')
		print(2)
		print(num[0], num[1:])
	else:
		print('NO')


t = int(input())
for tc in range(t):
	l = int(input())
	s = input()
	if len(s) == 1:
		print('NO')
	elif len(s) == 2 and ord(s[0]) - ord(s[1]) >= 0:
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


n = [int(input()) for i in range(2 * int(input()))]
n1 = [n[i] for i in range(1, len(n), 2)]
for i in n1:
	if len(str(i)) == 2 and str(i)[0] >= str(i)[1]:
		print('NO')
	elif len(str(i)) == 2 and str(i)[0] < str(i)[1]:
		print('YES')
		print(2)
		print(str(i)[0] + ' ' + str(i)[1])
	else:
		print('YES')
		print(2)
		print(str(i)[0] + ' ' + str(i)[1:len(str(i))])


t = int(input())
for x in range(t):
	n = int(input())
	l = input()
	if int(l[0]) < int(l[1:]):
		print('YES')
		print(2)
		print(l[0], l[1:])
	else:
		print('NO')


t = int(input())
while t > 0:
	n = int(input())
	a = input()
	if len(a) == 1:
		print('YES')
		print(1)
		print(a)
	elif len(a) == 2:
		if a[0] >= a[1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(a[0], a[1])
	else:
		print('YES')
		print(2)
		print(a[0], a[1:])
	t -= 1


for _ in range(int(input())):
	k = input()
	p = input()
	if int(p[0]) == int(p[1:]):
		print('NO')
	elif int(p[0]) > int(p[1:]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(p[0], end=' ')
		print(p[1:])


from sys import stdin, stdout
q = int(stdin.readline())
for i in range(q):
	v = int(stdin.readline())
	n = stdin.readline().strip()
	if v > 2:
		stdout.write('YES\n2\n')
		stdout.write(n[0] + ' ' + n[1:] + '\n')
	elif n[0] >= n[1]:
		stdout.write('NO\n')
	else:
		stdout.write('YES\n2\n' + n[0] + ' ' + n[1] + '\n')


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	if len(s) < 2:
		print('NO')
	elif len(s) == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print('2')
		print(s[0], s[1:])


from sys import stdin, stdout
import cProfile, math
from collections import Counter
from bisect import bisect_left, bisect, bisect_right
import itertools
from copy import deepcopy
from fractions import Fraction
import sys, threading
import operator as op
from functools import reduce
sys.setrecursionlimit(10 ** 6)
threading.stack_size(2 ** 27)
fac_warmup = False
printHeap = str()
memory_constrained = False
P = 10 ** 9 + 7
import sys

class Operation:

	def __init__(self, name, function, function_on_equal, neutral_value=0):
		self.name = name
		self.f = function
		self.f_on_equal = function_on_equal

def add_multiple(x, count):
	return x * count

def min_multiple(x, count):
	return x

def max_multiple(x, count):
	return x
sum_operation = Operation('sum', sum, add_multiple, 0)
min_operation = Operation('min', min, min_multiple, 1000000000.0)
max_operation = Operation('max', max, max_multiple, -1000000000.0)

class SegmentTree:

	def __init__(self, array, operations=[sum_operation, min_operation, max_operation]):
		self.array = array
		if type(operations) != list:
			raise TypeError('operations must be a list')
		self.operations = {}
		for op in operations:
			self.operations[op.name] = op
		self.root = SegmentTreeNode(0, len(array) - 1, self)

	def query(self, start, end, operation_name):
		if self.operations.get(operation_name) == None:
			raise Exception('This operation is not available')
		return self.root._query(start, end, self.operations[operation_name])

	def summary(self):
		return self.root.values

	def update(self, position, value):
		self.root._update(position, value)

	def update_range(self, start, end, value):
		self.root._update_range(start, end, value)

	def __repr__(self):
		return self.root.__repr__()

class SegmentTreeNode:

	def __init__(self, start, end, segment_tree):
		self.range = (start, end)
		self.parent_tree = segment_tree
		self.range_value = None
		self.values = {}
		self.left = None
		self.right = None
		if start == end:
			self._sync()
			return
		self.left = SegmentTreeNode(start, start + (end - start) // 2, segment_tree)
		self.right = SegmentTreeNode(start + (end - start) // 2 + 1, end, segment_tree)
		self._sync()

	def _query(self, start, end, operation):
		if end < self.range[0] or start > self.range[1]:
			return None
		if start <= self.range[0] and self.range[1] <= end:
			return self.values[operation.name]
		self._push()
		left_res = self.left._query(start, end, operation) if self.left else None
		right_res = self.right._query(start, end, operation) if self.right else None
		if left_res is None:
			return right_res
		if right_res is None:
			return left_res
		return operation.f([left_res, right_res])

	def _update(self, position, value):
		if position < self.range[0] or position > self.range[1]:
			return
		if position == self.range[0] and self.range[1] == position:
			self.parent_tree.array[position] = value
			self._sync()
			return
		self._push()
		self.left._update(position, value)
		self.right._update(position, value)
		self._sync()

	def _update_range(self, start, end, value):
		if end < self.range[0] or start > self.range[1]:
			return
		if start <= self.range[0] and self.range[1] <= end:
			self.range_value = value
			self._sync()
			return
		self._push()
		self.left._update_range(start, end, value)
		self.right._update_range(start, end, value)
		self._sync()

	def _sync(self):
		if self.range[0] == self.range[1]:
			for op in self.parent_tree.operations.values():
				current_value = self.parent_tree.array[self.range[0]]
				if self.range_value is not None:
					current_value = self.range_value
				self.values[op.name] = op.f([current_value])
		else:
			for op in self.parent_tree.operations.values():
				result = op.f([self.left.values[op.name], self.right.values[op.name]])
				if self.range_value is not None:
					bound_length = self.range[1] - self.range[0] + 1
					result = op.f_on_equal(self.range_value, bound_length)
				self.values[op.name] = result

	def _push(self):
		if self.range_value is None:
			return
		if self.left:
			self.left.range_value = self.range_value
			self.right.range_value = self.range_value
			self.left._sync()
			self.right._sync()
			self.range_value = None

	def __repr__(self):
		ans = '({}, {}): {}\n'.format(self.range[0], self.range[1], self.values)
		if self.left:
			ans += self.left.__repr__()
		if self.right:
			ans += self.right.__repr__()
		return ans

def display(string_to_print):
	stdout.write(str(string_to_print) + '\n')

def primeFactors(n):
	factors = dict()
	for i in range(2, math.ceil(math.sqrt(n)) + 1):
		while n % i == 0:
			if i in factors:
				factors[i] += 1
			else:
				factors[i] = 1
			n = n // i
	if n > 2:
		factors[n] = 1
	return factors

def isprime(n):
	if n < 4:
		return True
	if n % 2 == 0:
		return False
	if n % 3 == 0:
		return False
	i = 5
	w = 2
	while i * i <= n:
		if n % i == 0:
			return False
		i += w
		w = 6 - w
	return True
factorial_modP = []

def warm_up_fac(MOD):
	global factorial_modP, fac_warmup
	if fac_warmup:
		return
	factorial_modP = [1 for _ in range(fac_warmup_size + 1)]
	for i in range(2, fac_warmup_size):
		factorial_modP[i] = factorial_modP[i - 1] * i % MOD
	fac_warmup = True

def InverseEuler(n, MOD):
	return pow(n, MOD - 2, MOD)

def nCr(n, r, MOD):
	global fac_warmup, factorial_modP
	if not fac_warmup:
		warm_up_fac(MOD)
		fac_warmup = True
	return factorial_modP[n] * (pow(factorial_modP[r], MOD - 2, MOD) * pow(factorial_modP[n - r], MOD - 2, MOD) % MOD) % MOD

def test_print(*args):
	if testingMode:
		print(args)

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result
TestCases = True
testingMode = False
fac_warmup_size = 10 ** 5 + 100
optimiseForReccursion = True

def main():
	n = get_int()
	li = list(stdin.readline().strip())
	if len(li) > 2:
		print('YES')
		print(2)
		print(li[0], ''.join(li[1:]))
	elif li[1] > li[0]:
		print('YES')
		print(2)
		print(li[0], li[1])
	else:
		print('NO')
if TestCases:
	for _ in range(get_int()):
		cProfile.run('main()') if testingMode else main()
else:
	(cProfile.run('main()') if testingMode else main()) if not optimiseForReccursion else threading.Thread(target=main).start()


q = int(input())
for _ in range(q):
	n = int(input())
	A = input()
	if len(A) == 1:
		print('NO')
	elif len(A) == 2 and int(A[0]) >= int(A[1]):
		print('NO')
	else:
		print('YES\n2')
		print(A[0] + ' ' + A[1:])


q = int(input())
for _ in range(q):
	n = int(input())
	s = input()
	cond = False
	result = []
	if int(s[0]) < int(s[1:n]):
		result.extend([s[0], s[1:]])
		cond = True
	if cond:
		print('YES')
		print(2)
		print(' '.join(result))
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	s = str(input())
	if n > 2:
		print('YES')
		print(2)
		print(s[0], s[1:])
	elif n == 2:
		if s[0] >= s[n - 1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0], s[1])


import sys
import collections
import math
input = sys.stdin.readline

def printnl(val):
	sys.stdout.write(str(val) + '\n')
T = int(input())

def solve(n, s):
	if n == 2 and s[0] >= s[1]:
		print('NO')
	else:
		printnl('YES')
		printnl(2)
		printnl(s[0] + ' ' + ''.join(s[1:n]))
while T:
	n = int(input())
	s = list(input())[:n]
	solve(n, s)
	T -= 1


def A():
	q = int(input())
	for i in range(q):
		ni = int(input())
		s = input()
		if ni == 2 and s[0] >= s[-1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0], s[1:])
A()


import math
t = int(input())
for q in range(t):
	s = int(input())
	n = input()
	p = n[0]
	q = n[1:len(n)]
	if p != '' and q != '' and (int(p) < int(q)):
		print('YES')
		print('2')
		print(p + ' ' + q)
	else:
		print('NO')


a = int(input())
for i in range(a):
	b = int(input())
	c = input()
	if b == 2:
		d = int(c) // 10
		e = int(c) % 10
		if d >= e:
			print('NO')
		else:
			print('YES')
			print(2)
			print(d, e)
	if b > 2:
		d = c[0]
		e = c[1:b + 1]
		print('YES')
		print(2)
		print(d, e)


def sp(s):
	if len(s) == 2 and int(s[0]) >= int(s[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:len(s)])
q = int(input())
for i in range(q):
	input()
	sp(input())


n = int(input())
for i in range(0, n):
	s = int(input())
	m = input()
	if int(m[0]) < int(m[1:]):
		print('YES')
		print(2)
		print(int(m[0]), end=' ')
		print(m[1:])
	else:
		print('NO')


queries = int(input())
for x in range(0, queries):
	digits = int(input())
	string = str(input())
	dividable = True
	if digits == 2 and int(string[0:1]) >= int(string[1:2]):
		dividable = False
	if dividable:
		print('YES')
		print(2)
		print(string[:1] + ' ' + string[1:])
	else:
		print('NO')


import sys
import math
n = int(sys.stdin.readline())
for i in range(0, n):
	leng = int(sys.stdin.readline().split('\n')[0])
	query = str(sys.stdin.readline().split('\n')[0])
	if leng > 2:
		print('YES')
		print('2')
		print(query[:1] + ' ' + query[1:])
	elif leng == 2:
		if query[0] >= query[1]:
			print('NO')
		else:
			print('YES')
			print('2')
			print(query[0] + ' ' + query[1])
	else:
		print('NO')


for i in range(int(input())):
	int(input())
	s = input()
	if s[0] >= s[1] and len(s) == 2:
		print('NO')
	else:
		print('YES\n2')
		print(s[0], s[1:])


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	chk = 0
	if len(s) == 1:
		print('NO')
		continue
	for i in range(1, n):
		if int(s[:i]) < int(s[i:]):
			ans1 = s[:i]
			ans2 = s[i:]
			chk = 1
			break
	if chk == 1:
		print('YES')
		print(2)
		print(ans1, ans2)
	else:
		print('NO')


q = int(input())
for i in range(q):
	f = 0
	n = int(input())
	s = input()
	for j in range(n - 1):
		if int(s[j]) < int(s[j + 1:n]):
			print('YES')
			print(2)
			print(s[j], s[j + 1:n])
			f = 1
			break
	if f == 0:
		print('NO')


q = int(input())
for i in range(q):
	n = int(input())
	x = list(input())
	if n == 2 and x[0] >= x[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(*x[0] + ' ', *x[1:], sep='')


n = int(input())
for i in range(n):
	m = int(input())
	s = input()
	if int(s[0]) < int(s[1:]):
		print('YES')
		print('2')
		print(s[0], s[1:])
	elif s[0] == s[1] or s[0] > s[1]:
		print('NO')


Input = lambda : map(int, input().split())
for i in range(int(input())):
	n = int(input())
	number = input()
	if n == 2:
		if number[0] < number[1]:
			print('YES')
			print(2)
			print(number[0], number[1])
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		print(number[0], number[1:])


n = int(input())
for i in range(0, n):
	(x, ent) = (str(input()), str(input()))
	if len(ent) == 1:
		print('NO')
	elif len(ent) == 2 and ent[0] >= ent[1]:
		print('NO')
	else:
		print('YES\n2\n%s %s' % (ent[:1], ent[1:]))


t = int(input())
for tc in range(t):
	n = int(input())
	num = str(input())
	for i in range(n):
		if n == 2:
			if num[i] < num[i + 1]:
				print('YES')
				print(2)
				print(num[i], num[i + 1])
				break
			if num[i] == num[i + 1]:
				print('NO')
				break
			else:
				print('NO')
				break
		else:
			print('YES')
			print(2)
			print(num[0], '', end='')
			for j in range(1, n):
				print(num[j], end='')
			print()
			break


n = int(input())

def solve():
	no_digits = int(input())
	seq = input()
	if len(seq) < 2:
		print('NO')
		return
	first = seq[0]
	if not int(first) < int(seq[1:]):
		print('NO')
		return
	print('YES')
	print('2')
	print(first, seq[1:])
while n:
	solve()
	n -= 1


n = int(input())
for x in range(n):
	a = int(input())
	if a == 1:
		print('NO')
		input()
	elif a == 2:
		ar = input()
		(q, w) = map(int, ar)
		if q < w:
			print('YES')
			print(2)
			print(q, w)
		else:
			print('NO')
	else:
		ar = input()
		print('YES')
		print(2)
		print(ar[0], ar[1:])


import atexit
import io
import sys
INP = sys.stdin.read().splitlines()
input = iter(INP).__next__
OUT = io.StringIO()
sys.stdout = OUT

@atexit.register
def write():
	sys.__stdout__.write(OUT.getvalue())
q = int(input())
for i in range(q):
	n = int(input())
	s = input()
	if n == 2 and int(s[1]) <= int(s[0]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(str.format('{} {}', s[0], s[1:]))


n = int(input())
for x in range(n):
	p = int(input())
	ka = input()
	if p == 2:
		if ka[0] < ka[1]:
			print('YES')
			print(2)
			print(ka[0], ka[1])
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		print(ka[0], ka[1:])


def process(S):
	n = len(S)
	if n == 1:
		return ['NO', []]
	elif n == 2:
		if S[0] < S[1]:
			return ['YES', [S[0], S[1]]]
		else:
			return ['NO', []]
	else:
		return ['YES', [S[0], S[1:]]]
t = int(input())
for i in range(t):
	n = input()
	S = input()
	(a1, a2) = process(S)
	print(a1)
	if a1 == 'YES':
		print(len(a2))
		print(' '.join(a2))


z = int(input())
for x in range(z):
	n = input()
	a = input()
	if len(a) == 1:
		print('NO')
	elif len(a) == 2:
		if int(a[0]) >= int(a[1]):
			print('NO')
		else:
			print('YES')
			print('2')
			print(a[0] + ' ' + a[1])
	elif int(a[0]) > int(a[1:]):
		print('NO')
	else:
		print('YES')
		print('2')
		print(a[0] + ' ' + a[1:])


t = int(input())
for i in range(t):
	n = int(input())
	st = input()
	if int(st[0]) < int(st[1:]):
		print('YES')
		print(2)
		print(st[0], st[1:])
	else:
		print('NO')


def solve():
	num_digits = int(input())
	digits_str = input()
	(d, *rest) = digits_str
	rest = ''.join(rest)
	if num_digits > 2 or int(d) < int(rest[0]):
		print('YES')
		print(2)
		print(d, rest)
	else:
		print('NO')
num_tests = int(input())
for _ in range(num_tests):
	solve()


q = int(input())
for _ in range(q):
	d = int(input())
	ns = input()
	if d > 2 or int(ns[0]) < int(ns[1]):
		print('YES')
		print(2)
		print('{} {}'.format(ns[0], ns[1:]))
	else:
		print('NO')


def check(s):
	n = len(s)
	if len(s) > 2:
		print('YES')
		print(2)
		print(s[0] + ' ' + s[1:])
	elif len(s) <= 1:
		print('NO')
	elif int(s[:1]) < int(s[1:]):
		print('YES')
		print(2)
		print(s[:1] + ' ' + s[1:])
	else:
		print('NO')
q = int(input())
for _ in range(q):
	n = int(input())
	s = input().strip()
	check(s)


for query in range(int(input().strip())):
	n = int(input().strip())
	s = input().strip()
	if int(s[0]) >= int(s[1:]):
		print('NO')
	else:
		print('YES')
		print('2')
		print(s[0], s[1:])


q = int(input())
for _ in range(q):
	n = int(input())
	x = input().strip()
	if n > 2:
		print('YES')
		print(2)
		print(x[0], x[1:])
	elif int(x[0]) < int(x[1]):
		print('YES')
		print(2)
		print(x[0], x[1])
	else:
		print('NO')


n = int(input())
alist = []
for i in range(n):
	m = int(input())
	num = int(input())
	l = len(str(num))
	numm = str(num)
	if l == 1:
		alist.append('NO')
	elif l == 2 and int(numm[0]) >= int(numm[1]):
		alist.append('NO')
	elif l == 2 and int(numm[0]) < int(numm[1]):
		alist.append('YES')
		clist = [numm[0], numm[1]]
		a = ' '.join(clist)
		alist.append('2')
		alist.append(a)
	else:
		alist.append('YES')
		alist.append('2')
		a = numm[0]
		b = numm[1:]
		clist = [a, b]
		m = ' '.join(clist)
		alist.append(m)
for i in alist:
	print(i)


for _ in range(int(input())):
	(n, x) = (int(input()), input())
	if len(x) == 2:
		if x[0] < x[1]:
			print('YES')
			print(2)
			print(x[0], x[1])
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		print(x[0], x[1:])


def main():
	requests = int(input())
	for i in range(requests):
		n = int(input())
		m = input()
		if n > 2:
			print('YES')
			print('2')
			print(m[0] + ' ' + m[1:])
		elif n == 2:
			if int(m[0]) >= int(m[1]):
				print('NO')
			else:
				print('YES')
				print('2')
				print(m[0] + ' ' + m[1])
main()


from sys import stdin, stdout
import math
q = int(input())
while q > 0:
	n = int(input())
	a = input()
	if n == 2 and a[1] <= a[0]:
		print('NO')
	else:
		print('YES')
		print('2')
		print(a[0], end=' ')
		for i in range(1, n):
			print(a[i], end='')
		print()
	q = q - 1


for k in range(int(input())):
	n = int(input())
	b = input()
	if n > 2:
		print('YES')
		print(2)
		print(b[0], b[1:])
	elif n == 2 and int(b[0]) < int(b[1]):
		print('YES')
		print(2)
		print(b[0], b[1])
	elif n == 2:
		print('NO')
	elif n == 1:
		print('NO')


import sys
import math
data = sys.stdin.read().splitlines()
n = len(data)
for i in range(2, n, 2):
	line = data[i]
	if len(line) < 2 or (len(line) == 2 and int(line[0]) >= int(line[1])):
		print('NO')
	else:
		print('YES')
		print(2)
		print('{} {}'.format(line[0], line[1:]))


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	if len(s) > 2 or int(s[0]) < int(s[1]):
		print('YES')
		print(2)
		print('{} {}'.format(s[0], s[1:]))
	else:
		print('NO')


n = int(input())
for i in range(n):
	k = int(input())
	s = input()
	if k < 2:
		print('NO')
	if k == 2:
		if s[0] < s[1]:
			print('YES')
			print(2)
			print(s[0] + ' ' + s[1])
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		res = s[0] + ' '
		for i in range(1, len(s)):
			res += s[i]
		print(res)


def a():
	res = ''
	q = int(input())
	for i in range(q):
		n = int(input())
		num = input()
		if n < 2:
			res += 'NO\n'
		elif n is 2:
			if int(num[0]) < int(num[1]):
				res += 'YES\n'
				res += '2\n'
				res += num[0] + ' ' + num[1] + '\n'
			else:
				res += 'NO\n'
		else:
			res += 'YES\n'
			res += '2\n'
			res += num[0] + ' ' + num[1:] + '\n'
	print(res)
a()


for _ in range(int(input())):
	n = int(input())
	x = input()
	flag = 0
	for i in range(n - 1):
		if int(x[:i + 1]) < int(x[i + 1:]):
			print('YES')
			print(2)
			print(x[:i + 1], x[i + 1:])
			flag = 1
			break
	if flag == 0:
		print('NO')


q = int(input())
for i in range(q):
	n = int(input())
	s = input()
	if n == 2 and int(s[0]) >= int(s[1]):
		print('NO')
		continue
	print('YES')
	print(2)
	print(s[0], s[1:])


q = int(input())
for I in range(q):
	n = int(input())
	s = input()
	if len(s) == 2 and s[0] == s[1]:
		print('NO')
	elif int(s[0]) > int(s[1:]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


q = int(input())
while q:
	int(input())
	x = input()
	if int(x[1:]) > int(x[0]):
		print('YES\n2')
		print(x[0], x[1:])
	else:
		print('NO')
	q = q - 1


for i in range(int(input())):
	n = int(input())
	s = input()
	if len(s) == 1 or int(s[0]) >= int(s[1:]):
		print('NO')
	else:
		print('YES\n2\n' + s[0], s[1:])


numLines = int(input())
length = []
number = []
for n in range(numLines):
	length.append(int(input()))
	number.append(input())
for (i, l) in enumerate(length):
	if l < 2:
		print('NO')
		continue
	if l == 2:
		if number[i][0] < number[i][1]:
			print('YES')
			print(2)
			num1 = number[i][0]
			num2 = number[i][1]
			print(str(num1) + ' ' + str(num2))
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		num1 = number[i][0]
		num2 = number[i][1:]
		print(str(num1) + ' ' + str(num2))


import math
q = int(input())
for i in range(q):
	n = int(input())
	s = input()
	(d1, d2) = (int(s[:1]), int(s[1:]))
	if d1 < d2:
		print('YES')
		print('2')
		print(s[:1], s[1:], sep=' ')
	else:
		print('NO')


import heapq
n = int(input())
for i in range(n):
	m = int(input())
	s = input()
	if len(s) == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print('2')
		print(f'{s[0]} {s[1:]}')


q = int(input())
L = []
c = 2
for i in range(q):
	n = int(input())
	s = input()
	for i in range(n):
		if n == 1:
			L = L + ['NO']
			break
		if n == 2 and s[0] >= s[1]:
			L = L + ['NO']
			break
		elif i == 0:
			L = L + ['YES']
			L = L + [s[0]] + [s[1:]]
for i in range(len(L)):
	if L[i] == 'NO':
		print('NO')
	elif L[i] == 'YES':
		print('YES')
		print(c)
		print(L[i + 1], L[i + 2])


a = []
for i in range(int(input())):
	input()
	a.append(list(input()))
for i in a:
	if len(i) == 2 and int(i[1]) <= int(i[0]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(i[0], ''.join(i[1:]))


import math
import bisect
st = ''
p = pow(10, 9) + 7

def func(n, s):
	n1 = int(s[0])
	n2 = int(s[1:])
	if n1 >= n2:
		return 'NO'
	return 'YES\n2\n' + s[0] + ' ' + s[1:]
for _ in range(int(input())):
	n = int(input())
	s = input()
	st += str(func(n, s)) + '\n'
print(st)


T = int(input())
for _ in range(T):
	n = int(input())
	A = str(input())
	if len(A) == 2 and A[0] >= A[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(A[0], A[1:])


q = int(input())
for i in range(q):
	n = int(input())
	s = input()
	(a, b) = (int(s[0]), int(s[1:]))
	if a < b:
		print('YES\n2\n' + s[0], s[1:])
	else:
		print('NO')


t = int(input())
for i in range(t):
	n = int(input())
	a = list(input())
	if n == 1:
		print('NO')
	elif n == 2:
		if a[1] > a[0]:
			print('YES')
			print(2)
			print(*a)
		else:
			print('NO')
	else:
		print('YES')
		y = a[0]
		a.pop(0)
		print(2)
		print(y, ''.join(a))


q = int(input())
j = 0
lst = []
while q > 0:
	ans = ''
	n = int(input())
	str = input()
	i = 0
	if n == 2:
		if int(str[1]) > int(str[0]):
			ans = ans + str[0]
			ans += ' '
			ans = ans + str[1]
		else:
			ans = ''
	else:
		ans = ans + str[0]
		ans += ' '
		ans = ans + str[1:n]
	lst.append(ans)
	q -= 1
for ele in lst:
	if ele != '':
		print('YES')
		print(2)
		print(ele)
	else:
		print('NO')


q = int(input())
ans = ''
for i in range(q):
	n = int(input())
	s = input()
	flag = True
	j = 1
	while j < n and flag:
		if int(s[:j]) < int(s[j:]):
			flag = False
			rez = '{0} {1}'.format(s[:j], s[j:])
		else:
			j += 1
	if flag:
		ans += '\nNO'
	else:
		ans += '\nYES\n2\n{}'.format(rez)
print(ans)


n = int(input())
for _ in range(n):
	k = int(input())
	n = input()
	if int(n[:1]) < int(n[1:]):
		print('YES')
		print(2)
		print(n[:1], n[1:])
	else:
		print('NO')


q = int(input())
for _ in range(q):
	n = input()
	s = list(input())
	k = s
	for i in range(len(s)):
		s[i] = ord(s[i]) - ord('0')
	if len(s) == 2:
		if s[0] == s[1]:
			print('NO')
		elif s[0] > s[1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0], s[1], sep=' ')
	else:
		print('YES')
		print(2)
		k = k[1:]
		k = ''.join((str(x) for x in k))
		print(s[0], k, sep=' ')


t = int(input(''))
while t > 0:
	t -= 1
	s = int(input(''))
	n = input('')
	if len(n) == 2:
		if n[0] < n[1]:
			print('YES')
			print('2')
			print(n[0], n[1])
		else:
			print('NO')
	else:
		print('YES')
		print('2')
		print(n[0], end=' ')
		print(n[1:])


import sys
import math

def read_int():
	return int(input().strip())

def read_int_list():
	return list(map(int, input().strip().split()))

def read_string():
	return input().strip()

def read_string_list(delim=' '):
	return input().strip().split(delim)
q = read_int()
for _ in range(q):
	n = read_int()
	s = read_string()
	if n > 2:
		print('YES')
		print(2)
		print(s[0], s[1:])
	else:
		(a, b) = (int(s[0]), int(s[1]))
		if a < b:
			print('YES')
			print(2)
			print(a, b)
		else:
			print('NO')


for t in range(int(input())):
	l = int(input())
	s = input()
	if int(s[0]) < int(s[1:]):
		print('YES')
		print(2)
		print(s[0], s[1:])
	else:
		print('NO')


q = int(input())
for _ in range(q):
	n = int(input())
	s = input()
	res = []
	p = 0
	ps = s[0]
	if len(s) <= 1:
		print('NO')
	elif n == 2:
		if s[0] >= s[1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0], end=' ')
			print(s[1])
	else:
		print('YES')
		print(2)
		print(s[0], end=' ')
		print(s[1:])


q = int(input())
a = []
for i in range(q):
	lenght = int(input())
	s = input()
	a.append(s)
for s in a:
	for k in range(1, len(s)):
		if int(s[:k]) < int(s[k:]):
			print('YES')
			print('2')
			print(s[:k], s[k:])
			break
	else:
		print('NO')


q = int(input())
for qq in range(q):
	n = int(input())
	s = input()
	if n == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print('2')
		print(s[0], s[1:])


def ans(arr, n):
	if n % 2:
		x = n // 2
		print('YES')
		print(2)
		print('{} {}'.format(arr[0:x], arr[x:]))
	elif n == 2 and arr[0] >= arr[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print('{} {}'.format(arr[0], arr[1:]))
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	ans(s, n)


query = int(input())
for x in range(query):
	ans = ''
	length = int(input())
	seq = input()
	if length == 2:
		if seq[0] >= seq[1]:
			print('NO')
			continue
	print('YES')
	print(2)
	print(str(seq[0]) + ' ' + str(seq[1:]))


for _ in range(int(input())):
	n = int(input())
	s = input()
	if len(s) >= 3:
		print('YES')
		print(2)
		print(s[0], s[1:])
	elif s[0] == s[1] or s[0] > s[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1])


a = int(input())
for i in range(a):
	l = int(input())
	n = input()
	if l > 2:
		print('YES')
		print(2)
		print(n[0], n[1:])
	elif l == 2:
		if int(n[1]) > int(n[0]):
			print('YES')
			print(2)
			print(n[0], n[1])
		else:
			print('NO')
	else:
		print('NO')


n = int(input())
for i in range(n):
	m = int(input())
	l = list(input())
	if int(l[0]) < int(''.join(l[1:])):
		print('YES')
		print(2)
		print(l[0], end=' ')
		print(''.join(l[1:]))
	else:
		print('NO')


for _ in range(int(input())):
	n = int(input())
	nn = int(input())
	ann = str(nn)
	if n == 1 or (n == 2 and len(set(ann)) == 1) or nn % 100 == 0:
		print('NO')
	elif n == 2:
		arr = list(map(int, list(ann)))
		if arr[0] >= arr[1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(arr[0], arr[1])
	else:
		print('YES')
		print(2)
		arr = list(ann)
		print(arr[0], ''.join(arr[1:]))


import sys
from atexit import register
from io import FileIO, StringIO
sys.stdin = StringIO(FileIO(0).read().decode())
input = lambda : sys.stdin.readline().rstrip('\r\n')
sys.stdout = StringIO()
register(lambda : FileIO(1, 'w').write(sys.stdout.getvalue().encode()))

def main():
	q = int(input())
	for i in range(q):
		n = int(input())
		s = input()
		if n > 2:
			print('YES')
			print(2)
			print(s[0], s[1:])
		elif s[0] < s[1]:
			print('YES')
			print(2)
			print(s[0], s[1])
		else:
			print('NO')
main()


T = int(input())
for t in range(T):
	n = int(input())
	s = input()
	if n == 2 and int(s[0]) >= int(s[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], end=' ')
		print(s[1:])


from sys import stdin
cases = int(stdin.readline().strip())
for i in range(cases):
	n = int(stdin.readline().strip())
	s = stdin.readline().strip()
	if n > 2 or s[0] < s[1]:
		print('YES')
		print(2)
		print(s[0], s[1:])
	else:
		print('NO')


n = int(input())
for i in range(n):
	k = int(input())
	array = list(input())
	if k > 2:
		print('YES')
		print(2)
		print(*[array[0], ''.join(array[1:])])
	if k == 2:
		if int(array[0]) >= int(array[1]):
			print('NO')
		else:
			print('YES')
			print(2)
			print(*[array[0], array[1]])


t = int(input())
while t:
	t -= 1
	n = int(input())
	s = input()
	if len(s) > 2:
		print('YES\n2')
		print(s[0], s[1:])
	elif int(s[0]) < int(s[1]):
		print('YES\n2')
		print(s[0], s[1])
	else:
		print('NO')


a = int(input())
for i in range(a):
	m = int(input())
	n = input()
	if m == 2:
		if n[0] >= n[1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(n[0], n[1])
	else:
		print('YES')
		print(2)
		print(n[0], n[1:])


n = int(input())
for _ in range(n):
	L = int(input())
	Str = input()
	if L < 2 or int(Str[0]) >= int(Str[1:]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(Str[0], Str[1:])


def solve():
	n = int(input())
	s = input()
	if n == 2:
		if int(s[0]) < int(s[1]):
			print('YES\n2')
			print(s[0], s[1])
		else:
			print('NO')
	else:
		print('YES\n2')
		print(s[0], ''.join(s[1:]))
for _ in range(int(input())):
	solve()


t = int(input())

def func(k, n):
	if k == 2:
		if int(n[0]) < int(n[1]):
			print('YES')
			print(2)
			print(n[0] + ' ' + n[1])
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		print(n[0] + ' ' + n[1:])
res = []
for i in range(t):
	k = int(input())
	n = input()
	res.append((k, n))
for x in res:
	func(x[0], x[1])


import math
import os
import random
import re
import sys
for a0 in range(int(input())):
	n = int(input())
	s = input()
	f = 0
	for i in range(1, len(s)):
		if int(s[:i]) < int(s[i:]):
			print('YES')
			print(2)
			print(s[:i], s[i:])
			f = 1
			break
	if f == 0:
		print('NO')


T = int(input())
for i in range(T):
	k1 = int(input())
	k2 = input()
	if len(k2) > 2:
		print('YES')
		print(2)
		print(k2[0], k2[1:])
	elif len(k2) == 2:
		if k2[0] < k2[1]:
			print('YES')
			print(2)
			print(k2[0], k2[1])
		else:
			print('NO')
	else:
		print('NO')


gi = lambda : list(map(int, input().split()))
for k in range(gi()[0]):
	input()
	s = input()
	if len(s) == 2:
		if int(s[0]) >= int(s[1]):
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0] + ' ' + s[1])
	else:
		print('YES')
		print(2)
		print(s[0] + ' ' + s[1:])


q = int(input())
for x in range(q):
	i = int(input())
	nu = input()
	if i == 2:
		if nu[1] > nu[0]:
			print('YES')
			print('2')
			print(nu[0], nu[1])
		else:
			print('NO')
	else:
		print('YES')
		if len(nu) == 3:
			print('2')
			print(nu[0], nu[1:len(nu)])
		else:
			print('2')
			print(nu[0], nu[1:len(nu)])


def main():
	q = int(input())
	for _ in range(q):
		n = int(input())
		s = input()
		length = len(s)
		if length == 1:
			print('NO')
		elif length == 2 and int(s[0]) >= int(s[1]):
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0], s[1:])
main()


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = int(input())
for tt in range(t):
	n = int(input())
	s = str(input())
	if n > 2:
		print('YES')
		print(2)
		print(s[0], s[1:])
	elif int(s[0]) < int(s[1]):
		print('YES')
		print(2)
		print(s[0], s[1:])
	else:
		print('NO')
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


import sys
from math import *
from copy import copy
q = int(input())
for i in range(q):
	n = int(input())
	s = input()
	if len(s) == 2 and int(s[0]) >= int(s[1]):
		print('NO')
		continue
	print('YES')
	print(2)
	print(s[0], s[1:])


from sys import stdin, stdout
from collections import Counter

def ai():
	return list(map(int, stdin.readline().split()))

def ei():
	return map(int, stdin.readline().split())

def ip():
	return int(stdin.readline().strip())

def op(ans):
	return stdout.write(str(ans) + '\n')
for i in range(ip()):
	n = ip()
	s = input()
	if len(set(s)) == 1 and n == 2:
		print('NO')
	elif int(s[0]) >= int(s[1:]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


n = int(input())
a = list()
for i in range(n):
	k = int(input())
	s = input()
	if k == 2 and int(s[0]) >= int(s[1:]):
		a.append(['NO'])
	else:
		a.append(['YES', 2, s[0], s[1:]])
for elem in a:
	if len(elem) == 1:
		print(*elem)
	else:
		print(elem[0])
		print(elem[1])
		print(elem[2], elem[3])


q = int(input())
while q > 0:
	l = int(input())
	s = list(input())
	if l == 2:
		if s[0] >= s[1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(''.join(s[:1]), ''.join(s[1:]))
	else:
		print('YES')
		print(2)
		print(''.join(s[:1]), ''.join(s[1:]))
	q -= 1


def check(s):
	if len(s) == 2 and int(s[0]) >= int(s[1]):
		return False
	else:
		if int(s[1:]) > int(s[0]):
			s = s[0] + ' ' + s[1:]
		return ('YES', 2, s)
cases = int(input())
for i in range(cases):
	length = int(input())
	s = input()
	result = check(s)
	if result:
		print(result[0] + '\n' + str(result[1]) + '\n' + result[2])
	else:
		print('NO')


for _ in range(int(input())):
	(x, p) = (input(), input())
	print('YES\n2\n{} {}'.format(p[0], p[1:]) if int(p[0]) < int(p[1:]) else 'NO')


for _ in range(int(input())):
	input()
	n = list(input())
	if len(n) < 3:
		if n[0] < n[1]:
			print('YES')
			print(2)
			print(n[0], n[1])
		else:
			print('NO')
	else:
		l = []
		for i in range(1, len(n)):
			l.append(n[i])
		print('YES')
		print(2)
		print(n[0], ''.join(l))


q = int(input())
digitos = 1
lista = []
resultado = []
for i in range(q):
	longitud = int(input())
	numero = input()
	if longitud == 2 and int(numero[0]) >= int(numero[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(numero[0], numero[1:])


for _ in range(int(input())):
	k = int(input())
	n = input()
	if k == 2 and (int(n[0]) == int(n[-1]) or int(n[0]) > int(n[1])):
		print('NO')
	else:
		print('YES')
		print(2)
		print(n[0], n[1:])


itr = int(input())
for _ in range(itr):
	x = int(input())
	seq = input()
	x1 = int(seq[0])
	x2 = int(seq[1:])
	if x2 <= x1:
		print('NO')
	else:
		print('YES')
		print('2')
		print(seq[0] + ' ' + seq[1:])


def solve(n, s):
	if n == 2:
		if s[0] >= s[1]:
			print('NO')
		else:
			print('YES\n2\n%s %s' % (s[0], s[1]))
	else:
		print('YES\n2\n%s %s' % (s[0], s[1:]))
q = int(input())
for _q in range(0, q):
	n = int(input())
	s = input()
	solve(n, s)


for i in range(int(input())):
	length = int(input())
	number = str(input())
	if length > 2:
		print('YES')
		print(2)
		print(number[0], number[1:])
	elif length == 2:
		if int(number[0]) < int(number[1]):
			print('YES')
			print(2)
			print(number[0], number[1])
		else:
			print('NO')


import re, math, decimal, bisect, collections

def read():
	return input().strip()

def iread():
	return int(input().strip())

def viread():
	return [int(_) for _ in input().strip().split()]
for i in range(iread()):
	n = iread()
	s = read()
	if n == 2:
		if s[0] < s[1]:
			print('YES')
			print('2')
			print('{} {}'.format(s[0], s[1]))
		else:
			print('NO')
	else:
		print('YES')
		print('2')
		print('{} {}'.format(s[0], s[1:]))


for _ in range(int(input())):
	(n, ls) = (int(input()), list(input()))
	if n > 2 or ls[0] < ls[1]:
		print('YES\n2')
		print(ls[0], ''.join(ls[1:]))
	else:
		print('NO')


import math
import bisect
import itertools
import sys
I = lambda : sys.stdin.readline()
mod = 10 ** 9 + 7

def mindiff(a):
	b = a[:]
	b.sort()
	m = 10000000000
	for i in range(len(b) - 1):
		if b[i + 1] - b[i] < m:
			m = b[i + 1] - b[i]
	return m

def lcm(a, b):
	return a * b // math.gcd(a, b)

def merge(a, b):
	i = 0
	j = 0
	c = 0
	ans = []
	while i < len(a) and j < len(b):
		if a[i] < b[j]:
			ans.append(a[i])
			i += 1
		else:
			ans.append(b[j])
			c += len(a) - i
			j += 1
	ans += a[i:]
	ans += b[j:]
	return (ans, c)

def mergesort(a):
	if len(a) == 1:
		return (a, 0)
	mid = len(a) // 2
	(left, left_inversion) = mergesort(a[:mid])
	(right, right_inversion) = mergesort(a[mid:])
	(m, c) = merge(left, right)
	c += left_inversion + right_inversion
	return (m, c)

def is_prime(num):
	if num == 1:
		return False
	if num == 2:
		return True
	if num == 3:
		return True
	if num % 2 == 0:
		return False
	if num % 3 == 0:
		return False
	t = 5
	a = 2
	while t <= int(math.sqrt(num)):
		if num % t == 0:
			return False
		t += a
		a = 6 - a
	return True

def ceil(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1

def binsearch(arr, b, low, high):
	if low == high:
		return low
	if arr[math.ceil((low + high) / 2)] < b:
		return binsearch(arr, b, low, math.ceil((low + high) / 2) - 1)
	else:
		return binsearch(arr, b, math.ceil((low + high) / 2), high)

def ncr1(n, r):
	s = 1
	for i in range(min(n - r, r)):
		s *= n - i
		s %= mod
		s *= pow(i + 1, mod - 2, mod)
		s %= mod
	return s

def calc(n, m, r):
	s = 0
	for i in range(0, r + 1, 2):
		s += ncr1(n, i) * ncr1(m, i)
		s %= mod
	return s

def modu(a, n):
	if a % n == 0:
		return n
	return a % n
for _ in range(int(input())):
	n = int(input())
	s = input()
	if n == 2 and int(s[0]) >= int(s[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


q = int(input())
for i in range(q):
	_ = input()
	s = input()
	if len(s) == 1 or (len(s) == 2 and s[0] >= s[1]):
		print('NO')
		continue
	print('YES\n2')
	print(s[0], s[1:])


R = lambda : map(int, input().split())
for _ in range(int(input())):
	(n,) = R()
	s = input()
	print('NO' if s[0] >= s[1] and n == 2 else 'YES\n2\n' + s[0] + ' ' + s[1:])


def solve(s):
	if len(s) == 1 or (len(s) == 2 and ord(s[0]) >= ord(s[1])):
		print('NO')
		return
	print('YES\n2')
	if len(s) >= 3:
		print(s[0], s[1:])
		return
	print(s[0], s[1])
q = int(input())
for i in range(q):
	n = int(input())
	s = str(input())
	solve(s)


def binNumber(n, size):
	return bin(n)[2:].zfill(size)

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)
q = int(input())
for _ in range(q):
	n = int(input())
	s = str(input())
	if n is 2:
		if s[0] >= s[1]:
			print('NO')
			continue
	print('YES')
	print(2)
	print(s[0], end=' ')
	print(s[1:])


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def main():
	for tc in range(int(input())):
		n = int(input())
		s = input().strip()
		flag = 0
		i = 1
		while i < n:
			if int(s[:i]) < int(s[i:]):
				print('YES')
				print(2)
				print(s[:i], s[i:])
				flag = 1
				break
			i += 1
		if flag == 1:
			continue
		print('NO')
main()


q = int(input())
for _ in range(q):
	n = int(input())
	s = input()
	if n >= 3:
		print('YES')
		print(2)
		print('{} {}'.format(s[0], s[1:]))
	elif int(s[1]) > int(s[0]):
		print('YES')
		print(2)
		print('{} {}'.format(s[0], s[1]))
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	a = list(input())
	if n == 2 and ord(a[0]) >= ord(a[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(a[0], ''.join(a[1:]))


def inp_n():
	return int(input())

def inp_list():
	return list(map(int, input().split()))

def inp_mul_num():
	return map(int, input().split())

def is_odd(n):
	if n & 1:
		return True
	return False
for _ in range(inp_n()):
	n = inp_n()
	v = input()
	if len(v) == 2:
		if v[0] >= v[1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(v[0], v[1])
	else:
		print('YES')
		print(2)
		print(v[0], v[1:])


t = int(input())
for _ in range(t):
	n = int(input())
	nu = list(input())
	if n == 2 and int(nu[1]) <= int(nu[0]):
		print('NO')
		continue
	print('YES')
	print(2)
	print(nu[0], ''.join(nu[1:]))


n = int(input())
for i in range(n):
	l = int(input())
	num = input()
	k = 1
	while k < l:
		lsTempo = int(num[0:k])
		res = False
		if int(lsTempo) < int(num[k:l]):
			res = True
			break
		k += 1
	if res:
		print('YES')
		print(2)
		print(num[0:k], end=' ')
		print(num[k:l])
	else:
		print('NO')


for _ in [0] * int(input()):
	n = int(input())
	a = input()
	print(['NO', 'YES\n2\n' + a[0] + ' ' + a[1:]][a[0] < a[1] or n > 2])


q = int(input())
a = []
for i in range(q):
	n = int(input())
	s = input()
	if n == 2 and s[0] >= s[1]:
		a.append('NO')
	else:
		a.append('YES')
		a.append(2)
		a.append(str(s[0]) + ' ' + str(s[1:]))
for x in a:
	print(x)


q = int(input())
ns = []
ss = []
for i in range(q):
	n = int(input())
	ns.append(n)
	s = int(input())
	ss.append(s)
for (n, s) in zip(ns, ss):
	use = str(s)
	if len(use) == 2 and int(use[0]) >= int(use[1]):
		print('NO')
		continue
	print('YES')
	print(2)
	print(use[0], use[1:])


for q in range(int(input())):
	n = int(input())
	s = list(input())
	if len(s) == 2:
		if int(s[0]) >= int(s[1]):
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0], s[1])
		continue
	second = ''.join((str(x) for x in s[1:n]))
	print('YES')
	print(2)
	print(s[0], second)


for _ in range(int(input())):
	n = int(input())
	arr = input()
	if n == 2:
		if int(arr[0]) >= int(arr[1]):
			print('NO')
		else:
			print('YES')
			print(2)
			print(arr[0], arr[1])
	else:
		print('YES')
		print(2)
		print(arr[0], arr[1:])


q = int(input())

def functie():
	n = int(input())
	s = input()
	if len(s) >= 3 or s[0] < s[1]:
		print('YES')
		print('2')
		print(s[0], s[1:len(s)])
	else:
		print('NO')
for i in range(q):
	functie()


import collections, atexit, math, sys, bisect
sys.setrecursionlimit(1000000)

def getIntList():
	return list(map(int, input().split()))
try:
	import numpy

	def dprint(*args, **kwargs):
		print(*args, file=sys.stderr)
	dprint('debug mode')
except Exception:

	def dprint(*args, **kwargs):
		pass
inId = 0
outId = 0
if inId > 0:
	dprint('use input', inId)
	try:
		f = open('input' + str(inId) + '.txt', 'r')
		sys.stdin = f
	except Exception:
		dprint('invalid input file')
if outId > 0:
	dprint('use output', outId)
	try:
		f = open('stdout' + str(outId) + '.txt', 'w')
		sys.stdout = f
	except Exception:
		dprint('invalid output file')
	atexit.register(lambda : sys.stdout.close())
(N,) = getIntList()
for _ in range(N):
	g = input()
	s = input()
	if len(s) == 2 and s[0] >= s[1]:
		print('NO')
		continue
	print('YES')
	print(2)
	print(s[0], s[1:])


q = int(input())
for _ in range(q):
	n = int(input())
	s = input()
	if n >= 3 or (n == 2 and int(s[0] < s[1])):
		print('YES')
		print(2)
		print(s[0], s[1:])
	else:
		print('NO')


for _ in range(int(input())):
	sz = int(input())
	s = input()
	if sz == 2:
		if s[0] >= s[-1]:
			print('NO')
			continue
	if sz == 1:
		print('NO')
		continue
	print('YES', '2', sep='\n')
	print(s[0], s[1:])


from sys import stdin
import math
q = int(stdin.readline().strip())
for _ in range(q):
	n = int(stdin.readline().strip())
	arr = list(stdin.readline().strip())
	for i in range(n):
		arr[i] = int(arr[i])
	if len(arr) == 1:
		print('NO')
	elif arr[0] < arr[1]:
		print('YES')
		print(2)
		print(arr[0], end=' ')
		for i in range(1, n):
			print(arr[i], end='')
		print()
	elif n - 1 >= 2:
		print('YES')
		print(2)
		print(arr[0], end=' ')
		for i in range(1, n):
			print(arr[i], end='')
		print()
	else:
		print('NO')


t = int(input())
table = [i * (i + 1) for i in range(1, 301)]
while t:
	p = int(input())
	s = input()
	if p == 2:
		if int(s[0]) < int(s[1]):
			print('YES')
			print(2)
			print(s[0], s[1])
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])
	t -= 1


Q = int(input())
for q in range(Q):
	ni = int(input())
	s = input()
	if len(s) == 2 and int(s[0]) >= int(s[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(f'{s[0]} {s[1:]}')


q = int(input())
for i in range(q):
	n = input()
	seq = input()
	q = int(q)
	n = int(n)
	ln = len(seq)
	if ln == 2 and int(seq[0]) >= int(seq[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(seq[0], seq[1:])


for i in range(int(input())):
	sl_s = int(input())
	ss = input()
	if sl_s == 2 and ss[0] >= ss[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(ss[0], ss[1:])


n = int(input())
b = [int(input()) for i in range(n * 2)]
a = []
for i in range(1, n * 2 + 1, 2):
	a.append(b[i])
for i in a:
	otv = 0
	for_otv = ''
	for j in range(len(str(i)) - 1):
		if int(str(i)[:j + 1]) < int(str(i)[j + 1:]):
			otv += 1
			for_otv = str(i)[:j + 1] + ' ' + str(i)[j + 1:]
			break
	if otv != 0:
		print('YES')
		print(2)
		print(for_otv)
	else:
		print('NO')


from math import *
from copy import *
from string import *
from sys import stdin
from itertools import *
from collections import Counter
T = int(input())
for _ in range(T):
	N = int(stdin.readline())
	s = input()
	L = []
	a = int(s[0])
	b = int(s[1:])
	if len(s) == 2 and s[0] == s[1] or b == 0 or a > b:
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


N = int(input())
for i in range(N):
	n = input()
	S = input()
	if len(S) > 2:
		print('YES')
		print(2)
		print(S[:1], end=' ')
		print(S[1:])
	elif S[0] < S[1]:
		print('YES')
		print(2)
		print(S[:1], end=' ')
		print(S[1:])
	else:
		print('NO')


def main():
	q = int(input())
	for i in range(q):
		n = int(input())
		digs = input()
		if len(digs) == 2:
			if int(digs[0]) >= int(digs[1]):
				print('NO')
				continue
		print('YES')
		print(2)
		print(digs[0], digs[1:])
main()


q = int(input())
a = [input() for i in range(2 * q)]
for i in range(q):
	n = int(a[2 * i])
	s = a[2 * i + 1]
	if n >= 3:
		print('YES')
		print(2)
		print(s[0], end=' ')
		for j in range(1, n):
			print(s[j], end='')
		print()
	elif int(s[0]) < int(s[1]):
		print('YES')
		print(2)
		print(s[0], s[1])
	else:
		print('NO')


s = int(input())
for i in range(s):
	s1 = int(input())
	s2 = input()
	if s1 == 2:
		ans1 = int(s2) // 10
		ans2 = int(s2) % 10
		if ans1 >= ans2:
			print('NO')
		else:
			print('YES')
			print(2)
			print(ans1, ans2)
	if s1 > 2:
		ans1 = s2[0]
		ans2 = s2[1:s1 + 1]
		print('YES')
		print(2)
		print(ans1, ans2)


cases = int(input())
while cases:
	cases -= 1
	num = int(input())
	s = input()
	if num == 2 and int(s[0]) >= int(s[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


for i in range(int(input())):
	n = int(input())
	s = input()
	a = s[0]
	b = s[1:]
	ans = 'YES'
	if len(b) == 1 and a >= b[0]:
		ans = 'NO'
	print(ans)
	if ans == 'YES':
		print(2)
		print(a, b)


q = int(input())
ans = []
for i in range(q):
	a = int(input())
	s = input()
	ans.append((a, s))
for tpl in ans:
	(k, s) = tpl
	if k < 2:
		print('NO')
	elif k == 2:
		if int(s[0]) >= int(s[1]):
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0], s[1])
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	s = input()
	if n == 2:
		for i in range(0, n - 1):
			if s[i] < s[i + 1]:
				print('YES')
				print('2')
				print(s[0:1], end=' ')
				print(s[1:])
				break
		else:
			print('NO')
	else:
		print('YES')
		print('2')
		print(s[0:1], end=' ')
		print(s[1:])


nQ = int(input())
for q in range(nQ):
	nD = int(input())
	ds = input()
	if nD >= 3:
		print('YES')
		print(2)
		print(ds[0], ds[1:])
	elif nD == 2 and int(ds[0]) < int(ds[1]):
		print('YES')
		print(2)
		print(ds[0], ds[1])
	else:
		print('NO')


import sys
try:
	sys.stdin = open('io/test.in', 'r')
except:
	pass

def Read(f=int):
	return [f(x) for x in input().split()]

def FloatsToString(arr):
	return ' '.join(('{:.10f}'.format(x) for x in arr))
q = int(input())
for i in range(q):
	n = int(input())
	s = input()
	if n == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


for t in range(int(input())):
	(lambda N, S: print('NO') if N == 1 or int(S[0]) >= int(S[1:]) else [print('YES\n2'), print(S[0], S[1:])])(int(input()), input())


from sys import stdin, stdout
from collections import defaultdict, Counter
import math
I = stdin.readline
P = stdout.write
q = int(I())
for _ in range(q):
	n = int(I())
	s = I().rstrip()
	if n == 1:
		print('NO')
	elif n == 2:
		if int(s[0]) >= int(s[1]):
			print('NO')
		else:
			print('YES')
			print('2')
			print(s[0], s[1])
	else:
		print('YES')
		print(2)
		print(s[0], s[1:])


from sys import stdin
read = stdin.readline
q = int(read())
for _q in range(q):
	n = int(read())
	s = read()[:-1]
	if n <= 2:
		if s[:1] < s[1:]:
			print('YES')
			print(2)
			print(s[0] + ' ' + s[1])
		else:
			print('NO')
		continue
	print('YES')
	print(2)
	print(s[0] + ' ' + s[1:])


for _ in range(int(input())):
	j = int(input())
	s = input()
	if len(s) != 2:
		print('YES')
		print(2)
		print(s[0], s[1:])
	elif int(s[0]) >= int(s[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], s[1])


n = int(input())
while n > 0:
	length = int(input())
	s = input()
	a = s[0]
	s = s[len(a):len(s) + 1]
	l = []
	l.append(a)
	if len(a) > len(s) or (len(a) == len(s) and a >= s):
		print('NO')
	else:
		print('YES')
		print(2)
		print(a + ' ' + s)
	n -= 1


q = int(input())
for _ in range(q):
	n = int(input())
	s = input()
	if int(s[0]) < int(s[1:]):
		print('YES')
		print(2)
		print(' '.join([s[0], s[1:]]))
		continue
	print('NO')


def find_next_partition(n):
	ns = str(n)
	for i in range(len(ns) - 1):
		one = ns[:i + 1]
		two = ns[i + 1:]
		print(one, two, 'first')
		if int(one) < int(two) and one != two:
			return (one, two)
nb_test = int(input())
for _ in range(nb_test):
	lens = int(input())
	n = int(input())
	ns = str(n)
	ans = 'NO'
	for i in range(len(ns) - 1):
		one = ns[:i + 1]
		two = ns[i + 1:]
		if int(one) < int(two) and one != two:
			ans = 'YES'
			break
	print(ans)
	if ans == 'YES':
		print('2')
		print(one, two)


tc = int(input())
while tc != 0:
	tc -= 1
	n = int(input())
	s = str(input())
	if n == 1:
		print('NO')
	elif n == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print('2')
		print(s[0], s[1:])


n = input().strip()
n = int(n)
while n > 0:
	c = int(input())
	s = input().strip()
	s = list(s)
	if len(s) < 2:
		print('NO')
	else:
		a = int(s[0])
		b = int(s[1])
		if len(s) == 2:
			if a < b:
				print('YES')
				print('2')
				print(a, end=' ')
				print(b)
			else:
				print('NO')
		else:
			print('YES')
			print('2')
			print(s[0], end=' ')
			s = s[1:]
			s = ''.join(s)
			print(s)
	n = n - 1


tc = int(input())
for i in range(tc):
	n = int(input())
	ip = input()
	if len(ip) == 2 and int(ip[0]) >= int(ip[1]):
		print('NO')
	else:
		print('YES')
		n = 2
		print(n)
		print(ip[0], ip[1:])


import math
import sys
import bisect
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	if len(s) > 2:
		print('YES')
		print(2)
		print(s[0], s[1:])
	elif len(s) == 2:
		if int(s[0]) >= int(s[1]):
			print('NO')
		else:
			print('YES')
			print(2)
			print(s[0], s[1])
	else:
		print('NO')


n = int(input())
mas = []
for i in range(n):
	input()
	mas.append(input())
for i in mas:
	if len(i) <= 1:
		print('NO')
		continue
	if len(i) == 2:
		if int(i[0]) >= int(i[1]):
			print('NO')
		else:
			print('YES')
			print('2')
			print(i[0], i[1])
		continue
	print('YES')
	print('2')
	print(i[0], i[1:])


for _ in range(int(input())):
	N = int(input())
	s = input()
	l = list(s)
	if N == 2 and l[0] >= l[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(l[0], ''.join(l[1:]))


import sys
q = int(sys.stdin.readline().strip())
for i in range(0, q):
	n = int(sys.stdin.readline().strip())
	s = sys.stdin.readline().strip()
	if n < 2:
		print('NO')
	elif n == 2 and int(s[0]) >= int(s[1]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0] + ' ' + s[1:])


n = int(input())
for i in range(n):
	t = int(input())
	x = input()
	if len(x) > 2:
		print('YES')
		print(2)
		print(x[:1] + ' ' + x[1:])
	elif int(x[1]) > int(x[0]):
		print('YES')
		print(2)
		print(x[:1] + ' ' + x[1:])
	else:
		print('NO')


for _ in ' ' * int(input()):
	a = int(input())
	b = input()
	if a == 2:
		if b[0] < b[1]:
			print('YES')
			print(2)
			print(b[0], b[1])
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		print(b[0], b[1:])


for i in range(int(input())):
	input()
	s = input()
	print('YES\n2\n' + s[:1] + ' ' + s[1:] if int(s[:1]) < int(s[1:]) else 'NO')


a = int(input())
for i in range(a):
	b = int(input())
	c = input()
	l = len(c)
	if b == 2:
		if c[0] >= c[1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(c[0], c[1])
	else:
		print('YES')
		print(2)
		print(c[0], c[1:l])


amount = int(input())
for i in range(amount):
	_ = int(input())
	string = input()
	if len(string) > 2:
		print('YES')
		print(2)
		print(string[0], end=' ')
		print(string[1:])
	elif int(string[0]) < int(string[1]):
		print('YES')
		print(2)
		print(string[0], end=' ')
		print(string[1])
	else:
		print('NO')