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

Source: codeforces | Difficulty: EASY
Tags: String algorithms

Greedy algorithms


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:])


i = int(input())
k = 0
while k < i:
	l = int(input())
	p = input()
	if l == 1:
		print('NO')
	if l == 2:
		if p[0] == p[1] or p[0] > p[1]:
			print('NO')
		else:
			print('YES')
			print('2')
			print(p[0], p[1])
	elif l == 3 or l == 4 or l == 5:
		print('YES')
		print('2')
		print(p[0], p[1:])
	else:
		print('YES')
		print('3')
		print(p[0], p[1:3], p[3:])
	k = k + 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())
o = 0
v = 0
while o < q:
	v = int(input())
	s = input()
	n1 = int(s[0])
	n2 = int(s[1:len(s)])
	if n1 >= n2:
		print('NO')
	else:
		print('YES')
		print(2)
		print(n1, n2)
	o += 1


q = int(input())
for i in range(q):
	n = int(input())
	s = input()
	if int(s[0]) < int(s[1:]):
		print('YES')
		print(2)
		print(int(s[0]), int(s[1:]))
	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:])


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


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')


num_q = input()
num_q = int(num_q)
ans = []
while num_q > 0:
	digs = input()
	digs = int(digs)
	query = input()
	query = int(query)
	div = 10 ** (digs - 1)
	first = query // div
	rest = query % div
	if first < rest:
		ans.append('YES')
		ans.append('2')
		line = str(first) + ' ' + str(rest)
		ans.append(line)
	else:
		ans.append('NO')
	num_q = num_q - 1
for i in ans:
	print(str(i))


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)


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


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:])


T = int(input())
for kase in range(T):
	n = int(input())
	s = input()
	a = int(s[0])
	b = int(s[1:n])
	if a < b:
		print('YES\n2\n%d %d' % (a, b))
	else:
		print('NO')


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)


from sys import stdin, stdout
from math import *

def main():
	q = int(stdin.readline())
	for _ in range(q):
		n = int(stdin.readline())
		s = stdin.readline().rstrip('\n')
		p1 = int(s[0])
		p2 = int(s[1:])
		if p1 >= p2:
			stdout.write('NO\n')
		else:
			stdout.write('YES\n2\n%s %s\n' % (str(p1), str(p2)))
	return 0
main()


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')


n = int(input())

def solve(s):
	res = []
	prev = 0
	curr = '0'
	for el in s:
		curr += el
		if int(curr) > prev:
			res.append(int(curr))
			prev = int(curr)
			curr = ''
	res[-1] = int(str(res[-1]) + curr)
	return res
for _ in range(n):
	input()
	s = input()
	res = solve(s)
	if len(res) == 1:
		print('NO')
	else:
		print('YES')
		print(len(res))
		for el in res:
			print(el, end=' ')
		print()


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')


t = int(input())
while t != 0:
	n = int(input())
	s = int(input())
	if n == 2:
		div = s // 10
		rem = s % 10
		if rem > div:
			k = 2
			print('YES')
			print(k)
			print(div, rem)
		else:
			print('NO')
	else:
		div = s // pow(10, n - 1)
		rem = s % pow(10, n - 1)
		k = 2
		print('YES')
		print(k)
		print(div, rem)
	t = t - 1


t = int(input())
for i in range(t):
	a = int(input())
	b = input()
	c = b[:1]
	d = b[1:]
	e = d.lstrip('0')
	if int(e) > int(c):
		print('YES')
		print('\n')
		print(2)
		print(c + ' ' + e)
	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


def solve(n, s):
	for i in range(int(n / 2) + 1):
		try:
			left = int(s[0:i + 1])
			right = int(s[i + 1:])
			if left < right:
				print('YES')
				print(2)
				print('{} {}'.format(left, right))
				return
		except:
			continue
	print('NO')
q = int(input())
for _ in range(q):
	(n, s) = (int(input()), input().strip())
	solve(n, s)


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()
	s1 = s[:n // 2]
	s2 = s[n // 2:]
	if int(s1) < int(s2):
		print('YES')
		print(2)
		print(s1, s2)
	else:
		i = n // 2 - 1
		ct = 0
		while i > 0:
			s1 = s[:i]
			s2 = s[i:]
			if int(s1) < int(s2):
				print('YES')
				print(2)
				print(s1, s2)
				ct += 1
				break
			i -= 1
		if ct == 0:
			print('NO')


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')


from math import *
from itertools import *
from collections import *
from functools import reduce
Q = q = quit
inf = float('inf')

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

def input_floats():
	return list(map(float, input().split()))

def input_strings():
	return input().split()
queries = []
q = int(input())
for i in range(q):
	n = int(input())
	s = list(input())
	queries.append(s)
for s in queries:
	i = len(s) - 1
	while i > 0:
		if int(s[i - 1]) >= int(s[i]):
			if i == len(s) - 1:
				s[i] = s[i - 1] + s[i]
				del s[i - 1]
				i -= 1
			else:
				s[i + 1] = s[i] + s[i + 1]
				del s[i]
				i = len(s) - 1
		else:
			i -= 1
	if len(s) > 1:
		print('YES')
		print(len(s))
		print(*s)
	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


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


def main():
	q = int(input())
	for i in range(q):
		input()
		s = input().strip()
		if len(s) < 2:
			print('NO')
			continue
		a1 = s[:1]
		a2 = s[1:]
		a = [int(a1), int(a2)]
		if sorted(a) == a and len(set(a)) == len(a):
			print('YES')
			print(len(a))
			print(' '.join((str(x) for x in a)))
		else:
			print('NO')
main()


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')


for _ in range(int(input())):
	n = int(input())
	s = input()
	x = []
	if n == 1:
		print('NO')
	elif n == 2:
		if s[0] >= s[1]:
			print('NO')
		else:
			print('YES')
			print('2')
			print(s[0], s[1])
	else:
		c = 1
		x.append(s[0])
		t = 0
		i = 1
		while i + c <= n - 1:
			if int(s[i:i + c]) > int(x[t]):
				x.append(s[i:i + c])
				t = t + 1
				i = i + c
			else:
				c = c + 1
		x.append(s[i:i + c])
		if int(x[len(x) - 2]) >= int(x[len(x) - 1]):
			x[len(x) - 2] = x[len(x) - 2] + x[len(x) - 1]
			x.pop(len(x) - 1)
		print('YES')
		print(len(x))
		print(*x)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x) + '\n')
for _ in range(get_int()):
	n = get_int()
	s = get_string()
	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:])


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')


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


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:])


def solve(length, sequence):
	if length % 2:
		print('YES', 2, sep='\n')
		print(sequence[:length // 2], sequence[length // 2:])
	elif length == 2:
		if sequence[0] < sequence[1]:
			print('YES', 2, sep='\n')
			print(sequence[0], sequence[1])
		else:
			print('NO')
	else:
		print('YES', 2, sep='\n')
		print(sequence[:length // 2 - 1], sequence[length // 2 - 1:])
n = int(input())
for i in range(n):
	solve(int(input()), input())


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()


tc = int(input())
for i in range(0, tc):
	num = int(input())
	q = input()
	tf = False
	for j in range(1, num):
		if int(q[:j]) < int(q[j:]):
			tf = True
			ans = j
		else:
			continue
	if tf:
		print('YES\n2')
		print(q[:ans], ' ', q[ans:])
	else:
		print('NO')


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')


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


list_int_input = lambda inp: list(map(int, inp.split()))
int_input = lambda inp: int(inp)
string_to_list_input = lambda inp: list(inp)
q = int_input(input())
while q > 0:
	q -= 1
	n = int_input(input())
	s = list(map(int, string_to_list_input(input())))
	i = 0
	a = []
	while i < n:
		if not a:
			a.append(s[i])
			i += 1
		else:
			j = i
			num = 0
			while j < n and num <= a[-1]:
				num = 10 * num + s[j]
				j += 1
			if num <= a[-1]:
				a[-1] = int(str(a[-1]) + str(num))
			else:
				a.append(num)
			i = j
	if len(a) <= 1:
		print('NO')
	else:
		print('YES')
		print(len(a))
		a = list(map(str, a))
		print(' '.join(a))


n = int(input())
x = []
y = []
for i in range(n):
	x.append(int(input()))
	y.append(input())
for i in y:
	a = int(i[0])
	b = int(i[1:])
	if a < b:
		print('YES')
		print('2')
		print(a, b)
	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()


t = int(input())
while t > 0:
	n = int(input())
	s = input()
	l = list(s)
	p = n // 2
	if n == 2:
		if int(s[0:p]) < int(s[p:]):
			print('YES')
			print(2)
			print(s[0:p], s[p:])
		else:
			print('NO')
	elif int(s[0:p]) < int(s[p:]):
		print('YES')
		print(2)
		print(s[0:p], s[p:])
	elif int(s[0:p - 1]) < int(s[p - 1:]):
		print('YES')
		print(2)
		print(s[0:p - 1], s[p - 1:])
	else:
		print('No')
	t -= 1


q = int(input())
while q:
	n = int(input())
	s = input()
	ans = []
	i = 0
	j = 1
	while i < n:
		if i + j <= n:
			ans.append(s[i:i + j])
			i += j
			j += 1
		else:
			ans[-1] += s[i:n]
			break
	if n == 1:
		print('NO')
	elif len(ans) == 1:
		if int(ans[0][0]) >= int(ans[0][1]):
			print('NO')
		else:
			print('YES')
			print(2)
			print(ans[0][0], ans[0][1])
	else:
		print('YES')
		print(len(ans))
		print(*ans)
	q -= 1


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


import sys
stdin = sys.stdin
q = int(stdin.readline())
for _ in range(q):
	n = int(stdin.readline())
	arr = list(stdin.readline())
	out = ''
	if n > 2:
		out = arr[0] + ' ' + ''.join(arr[1:])
	elif int(arr[0]) >= int(arr[1]):
		print('NO')
		continue
	else:
		out = arr[0] + ' ' + arr[1]
	print('YES')
	print('2')
	print(out)


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())
while q:
	n = int(input())
	s = input()
	if n == 1:
		print('NO')
	else:
		a = int(s[0])
		b = int(s[1:])
		if a < b:
			print('YES')
			print(2)
			print(a, end=' ')
			print(b)
		else:
			print('NO')
	q -= 1


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)


for _ in [0] * int(input()):
	input()
	s = input()
	(x, y) = (int(s[0]), int(s[1:]))
	print(('NO', f'YES 2 {x} {y}')[x < y])


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])


from sys import stdin
from math import sqrt
trim = lambda s: s[:-1] if s[-1] == '\n' else s
q = int(stdin.readline())
for i in range(0, q):
	n = int(stdin.readline())
	s = trim(stdin.readline())
	if len(s) % 2 == 1:
		print('YES')
		print(2)
		print(s[:(n - 1) // 2] + ' ' + s[(n - 1) // 2:])
	elif len(s) != 2:
		print('YES')
		print(2)
		print(s[:(n - 2) // 2] + ' ' + s[(n - 2) // 2:])
	elif s[0] < s[1]:
		print('YES')
		print(2)
		print(s[0] + ' ' + s[1])
	else:
		print('NO')


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:])


t = int(input())
while t:
	n = int(input())
	a = input()
	i = 1
	j = n - 1
	k = 1
	while i <= j:
		x = int(a[:i])
		y = int(a[i:])
		if x < y and k:
			k = 0
			print('YES')
			print('2')
			print(x, y)
			break
		i = i + 1
		j = j - 1
		if k:
			print('NO')
	t = t - 1


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import random
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

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

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	aa = [[I(), S()] for _ in range(n)]
	rr = []
	for (n, s) in aa:
		t = int(s[0])
		u = int(s[1:])
		if u <= t:
			rr.append('NO')
		else:
			rr.append('YES\n2\n{} {}'.format(t, u))
	return '\n'.join(rr)
print(main())


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='')


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


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))])


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


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')


for i in range(int(input())):
	a = int(input())
	b = input()
	c = [int(b[0])]
	d = 0
	e = 1
	f = ''
	while e < len(b):
		f = f + b[e]
		if int(f) > c[d]:
			c.append(int(f))
			d += 1
			f = ''
		e += 1
		if e == len(b) and f != '' and (len(c) >= 2):
			c[-1] = int(str(c[-1]) + f)
			print('YES')
			print(len(c))
			for i in c:
				print(i, end=' ')
			print()
		elif e == len(b) and f != '' and (len(c) < 2):
			print('NO')
		elif e == len(b) and f == '' and (len(c) >= 2):
			c[-1] = int(str(c[-1]) + f)
			print('YES')
			print(len(c))
			for i in c:
				print(i, end=' ')
			print()


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()


import copy
import fractions
import itertools
import string
import sys

def powmod(x, p, m):
	if p <= 0:
		return 1
	if p <= 1:
		return x % m
	return powmod(x * x % m, p // 2, m) * (x % m) ** (p % 2) % m

def to_basex(num, x):
	while num > 0:
		yield (num % x)
		num //= x

def from_basex(it, x):
	ret = 0
	p = 1
	for d in it:
		ret += d * p
		p *= x
	return ret

def core():
	n = int(input())
	for _ in range(n):
		_ = input()
		s = input()
		ans = []
		last = 0
		end_last = 0
		for end in range(1, len(s) + 1):
			x = int(s[end_last:end])
			if x > last:
				ans.append(x)
				last = x
				end_last = end
		if end_last < len(s):
			ans[-1] = int(str(ans[-1]) + s[end_last:])
		if len(ans) > 1:
			print('YES')
			print(len(ans))
			print(*ans)
		else:
			print('NO')
core()


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 [0] * int(input()):
	input()
	s = input()
	(x, y) = (int(s[0]), int(s[1:]))
	print(('NO', f'YES \n2 \n{x} {y}')[x < y])


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])


q = int(input())
for i in range(q):
	n = int(input())
	a = int(input())
	if n == 2:
		if a % 10 > a // 10:
			print('YES')
			print(2)
			print(a // 10, a % 10)
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		print(a // 10 ** (n - 1), a % 10 ** (n - 1))


from sys import stdin, stdout
input = stdin.readline
mapin = lambda : map(int, input().split())
listin = lambda : list(mapin())
for _ in range(int(input())):
	n = int(input())
	l = input()
	if int(l[0]) < int(l[1:]):
		print('YES')
		print(2)
		print(l[0], l[1:])
	else:
		print('NO')


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


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:])


import sys, re
from collections import deque, defaultdict, Counter
from math import sqrt, hypot, factorial, pi, sin, cos, radians
from heapq import heappop, heappush, heapify, heappushpop
from bisect import bisect_left, bisect_right
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from functools import reduce, partial
from fractions import Fraction
from string import ascii_lowercase, ascii_uppercase, digits

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

def ceil(a, b=1):
	return int(-(-a // b))

def round(x):
	return int((x * 2 + 1) // 2)

def INT():
	return int(input())

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

def LIST():
	return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7
Q = INT()
for _ in range(Q):
	N = INT()
	l = input()
	a = int(l[0])
	b = int(l[1:])
	if a < b:
		print('YES')
		print(2)
		print(a, b)
	else:
		print('NO')


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='')


q = int(input())
for _ in range(q):
	n = int(input())
	seq = list(input())
	n1 = int(seq[0])
	n2 = ''
	n2 = n2.join((i for i in seq[1:]))
	n2 = int(n2)
	if n2 > n1:
		print('YES')
		print(2)
		print(n1, n2)
	else:
		print('NO')


for i in range(int(input())):
	n = int(input())
	s = list(input())
	if n == 2:
		if s[0] < s[1]:
			print('YES')
			print(2)
			print(s[0], s[1])
		else:
			print('NO')
	elif n % 2 == 1:
		print('YES')
		print(2)
		print(''.join(s[:n // 2]), ''.join(s[n // 2:]))
	else:
		print('YES')
		print(2)
		print(''.join(s[:n // 2 - 1]), ''.join(s[n // 2 - 1:]))


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


t = int(input())
n = []
s = []
for i in range(t):
	n.append(int(input()))
	s.append(input())
for j in range(t):
	c = s[j]
	if n[j] == 1:
		print('NO')
	if n[j] == 2:
		if int(c[0]) < int(c[1]):
			print('YES')
			print(2)
			print(int(c[0]), int(c[1]))
		else:
			print('NO')
	if n[j] == 3:
		lc = c[0]
		rc = c[1:3]
		print('YES')
		print(2)
		print(int(lc), int(rc))
	if n[j] > 3:
		lc = c[0:int(n[j] / 2) - 1]
		rc = c[int(n[j] / 2) - 1:n[j]]
		print('YES')
		print(2)
		print(int(lc), int(rc))


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:])


from math import *
sInt = lambda : int(input())
mInt = lambda : map(int, input().split())
lInt = lambda : list(map(int, input().split()))
t = sInt()
for _ in range(t):
	n = sInt()
	s = input()
	if n == 2 and s[0] >= s[1]:
		print('NO')
	else:
		print('YES')
		print(2)
		print(int(s[0]), int(s[1:]))


n = int(input())

def solution(s):
	(parts, left, right, current_length) = ([], 0, 1, 1)
	while True:
		if right >= len(s) - 1:
			if len(s) == 2:
				parts = [int(s[0]), int(s[1])]
			elif len(parts) >= 2:
				parts[-1] = int(str(parts[-1]) + str(s[left:]))
			else:
				parts.append(int(s[left:]))
			break
		current_part = s[left:right]
		if current_part != '':
			parts.append(int(current_part))
			if len(parts) >= 2:
				if parts[-1] <= parts[-2]:
					parts[-2] = int(str(parts[-2]) + str(parts[-1]))
					parts.pop(-1)
		(left, current_length) = (right, current_length + 1)
		right = left + current_length
		if left > len(s) - 1:
			break
		if left == len(s) - 1:
			parts[-1] = int(str(parts[-1]) + str(s[-1]))
	if len(parts) == 2 and parts[0] >= parts[1]:
		return print('NO')
	print('YES')
	print(len(parts))
	print(*parts)
for _ in range(n):
	length = input()
	s = input()
	solution(s)


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')


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


import re, math, decimal, bisect

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

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

def viread():
	return [int(_) for _ in input().strip().split()]
for q in range(iread()):
	n = iread()
	seq = read()
	a = int(seq[0])
	b = int(seq[1:])
	if a < b:
		print('YES')
		print(2)
		print(a, b)
	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')


r = int(input())
for i in range(r):
	x = input()
	y = input()
	if int(y[0]) < int(y[1:]):
		print('YES')
		print(2)
		print(int(y[0]), int(y[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 = int(input())
	s = input()
	a = int(s[:1])
	b = int(s[1:])
	if a < b:
		print('YES')
		print(2)
		print(a, b)
	else:
		print('NO')


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()


def main():
	a = int(input())
	for i in range(a):
		b = input()
		s = input()
		k = len(s)
		if k == 2:
			if s[0] == s[1] or s[0] > s[1]:
				print('NO')
			else:
				print('YES')
				print('2')
				print(s[0], '', s[1])
		else:
			print('YES')
			print('2')
			print(s[0], '', s[1:k])
main()


def output1(seq):
	l = len(seq)
	l_final = []
	s1 = ''
	if l is 1 or l is 0:
		print('NO')
		return
	if l is 2:
		if int(seq[0]) >= int(seq[1]):
			print('NO')
			return
		else:
			print('YES\n')
			print(2)
			print(seq[0] + ' ' + seq[1])
	else:
		print('YES')
		print(2)
		print(seq[0] + ' ' + seq[1:l])
max1 = input()
for i in range(0, int(max1)):
	index = input()
	seq = input()
	output1(seq)


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


n = int(input())

def solution(s):
	parts = [int(s[0]), int(s[1:])]
	if parts[1] <= parts[0]:
		return print('NO')
	print('YES')
	print(len(parts))
	print(*parts)
for _ in range(n):
	length = input()
	s = input()
	solution(s)


def main():
	n = int(input())
	cNum = []
	nums = []
	res = []
	for i in range(n):
		cNum = int(input())
		tmp = input()
		x = int(tmp[0])
		if cNum == 2 and x >= int(tmp[1]):
			print('NO')
		else:
			print('YES')
			print(2)
			print(x, ' ', tmp[1:])
main()


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	f = int(s[0])
	l = int(s[1:])
	if f >= l:
		print('NO')
	else:
		print('YES')
		print(2)
		print(f, l)


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:]))


from sys import stdin
t = int(input())
for _ in range(t):
	n = int(input())
	string = stdin.readline()
	if n == 1 or (n == 2 and string[1] <= string[0]):
		print('NO')
	else:
		print('YES')
		print(2)
		print(string[0], string[1:])


q = int(input())
for i in range(q):
	n = int(input())
	s = input()
	if n >= 3:
		print('YES')
		print(2)
		print(s[0], ' ', end='')
		for i in range(1, n):
			print(s[i], end='')
		print()
	elif s[0] == s[1] or s[0] > s[1]:
		print('NO')
	else:
		print('YES\n2\n%c %c' % (s[0], s[1]))


for _ in range(int(input())):
	n = int(input())
	num = [int(i) for i in list(input())]
	(arr, pos) = ([], 0)
	crnt = num[pos]
	pos += 1
	nxt = num[pos]
	while pos != n:
		if nxt > crnt:
			arr.append(crnt)
			arr.append(nxt)
			pos += 1
			if pos > n - 1:
				break
			crnt = nxt
			nxt = num[pos]
		elif pos < n - 1:
			pos += 1
			nxt = nxt * 10 + num[pos]
		elif pos == n - 1:
			try:
				arr.remove(crnt)
				arr.append(crnt * 10 ** len(str(nxt)) + nxt)
			except:
				pass
			break
	arr = list(set(arr))
	arr.sort()
	if len(arr) > 1:
		print('YES')
		print(len(arr))
		print(*arr)
	else:
		print('NO')


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()


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


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


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


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	arr = input().strip()
	last = []
	ss = ''
	for i in range(0, len(arr)):
		ss += arr[i]
		if i + 1 == len(arr):
			break
		if int(ss) < int(arr[i + 1:]):
			last.append(ss)
			last.append(arr[i + 1:])
			break
	if len(last) < 2:
		print('NO')
	else:
		print('YES')
		print(len(last))
		for i in last:
			print(int(i), end=' ')
		print(' ')


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


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:])


q = int(input())
i = 0
while i < q:
	i = i + 1
	n = int(input())
	s = input()
	if n == 2 and int(s[0]) >= int(s[1]):
		print('NO')
		continue
	a = n // 2
	print('YES')
	print('2')
	if int(s[:a]) < int(s[a:]):
		print(s[:a], s[a:])
	else:
		print(s[:a - 1], s[a - 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))


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


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')


from sys import stdin

def readLine():
	return stdin.readline().strip()

def readInt():
	return int(readLine())

def readInts():
	return list(map(int, readLine().split()))

def isSolution(l):
	n = len(l)
	if n < 2:
		return False
	for i in range(1, n):
		if l[i - 1] >= l[i]:
			return False
	return True

def divide(N, S):
	m = N // 2
	for k in range(1, m + 1):
		prev = int(S[:k])
		res = [prev]
		(i, last, taken) = (k, k, '')
		while i < N:
			while i < N:
				taken += S[i]
				i += 1
				val = int(taken)
				if val > prev:
					prev = val
					res.append(prev)
					taken = ''
					last = i
					break
		if last < N:
			res[-1] = int(str(res[-1]) + S[last:])
		if isSolution(res):
			return (True, res)
	return (False, None)

def main():
	Q = readInt()
	for i in range(Q):
		N = readInt()
		S = readLine()
		t = divide(N, S)
		if t[0]:
			print('YES')
			print(len(t[1]))
			print(' '.join(map(str, t[1])))
		else:
			print('NO')
main()


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])


import math
quer = int(input())
leng = []
digs = []
for x in range(quer):
	leng.append(input())
	digs.append(input())
for item in digs:
	if len(item) == 2:
		if item[0] >= item[1]:
			print('NO')
		else:
			print('YES')
			print(2)
			print(item[0])
			print(item[1:])
	else:
		print('YES')
		print(2)
		print(item[0])
		print(item[1:])


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)


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


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')


q = int(input())
i = 0
while i < q:
	n = int(input())
	s = input()
	if n == 2 and s[0] >= s[1] or n == 1:
		print('NO')
	else:
		print('YES')
		print(2)
		print(s[0], end=' ')
		j = 1
		while j < n:
			print(s[j], end='')
			j = j + 1
		print('\n')
	i += 1


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')


n = int(input())
a = []
for i in range(n):
	an1 = int(input())
	a1 = int(input())
	a1 = list(str(a1))
	a1 = [int(item) for item in a1]
	a.append(a1)
ans1 = [''] * n
for i in range(n):
	s = int(''.join(map(str, a[i][1:len(a[i])])))
	if int(a[i][0]) < int(s):
		print('YES')
		print(2)
		print(a[i][0], s)
	else:
		print('NO')


a = int(input())
t = []
for i in range(a):
	b = int(input())
	c = int(input())
	for f in range(1, b):
		g = c // 10 ** f
		g1 = c % 10 ** f
		if g < g1:
			t.append(g)
			t.append(g1)
			break
	if len(t) > 0:
		e = []
		q = map(str, t)
		print('YES')
		print(len(t))
		print(' '.join(q))
		t = e[:]
	else:
		print('NO')


import math, sys
from sys import stdin, stdout
from collections import Counter, defaultdict, deque
input = stdin.readline
I = lambda : int(input())
li = lambda : list(map(int, input().split()))

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


for queryNum in range(int(input())):
	size = input()
	seqStr = input()
	seq1 = seqStr[:1]
	seq2 = seqStr[1:]
	print(f'YES\n2\n{seq1} {seq2}' if int(seq1) < int(seq2[:2]) else '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')


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	a = int(s[:1])
	b = int(s[1:])
	if a < b:
		print('YES')
		print(2)
		print(a, b)
	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]])


import sys
q = int(input())
for _ in range(q):
	n = int(input())
	s = input().strip()
	a = int(s[0])
	b = int(s[1:])
	if a < b:
		print('YES')
		print(2)
		print(a, b)
	else:
		print('NO')


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')


def check(cur, present):
	n = len(cur)
	m = len(present)
	if n > m:
		return True
	if m > n:
		return False
	if cur == present:
		return False
	for i in range(0, n):
		if int(cur[i]) > int(present[i]):
			return True
		if int(cur[i]) < int(present[i]):
			return False
	return False

def solve(s, n):
	ans = []
	present = ''
	cur = ''
	for ch in s:
		cur += ch
		if check(cur, present):
			ans.append(cur)
			present = cur
			cur = ''
	if cur != '' and check(cur, present) == False:
		ans[len(ans) - 1] = ans[len(ans) - 1] + cur
	print('YES')
	print(len(ans))
	for ch in ans:
		print(ch, end=' ')
t = int(input())
while t > 0:
	n = int(input())
	s = str(input())
	if n == 2:
		if int(s[0]) < int(s[1]):
			print('YES')
			print(2, s[0] + ' ' + s[1])
		else:
			print('NO')
	else:
		solve(s, n)
		print()
	t = t - 1


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:])


q = int(input())

def divide(string, start, end, answer):
	if start == end:
		answer.append(string)
	else:
		div = 1
		left = string[start:div]
		right = string[div:]
		if len(answer) == 0:
			while div <= end and int(left) >= int(right):
				div += 1
				left = string[start:div]
				right = string[div:]
		else:
			while div <= end and (int(left) >= int(right) or int(left) <= int(answer[len(answer) - 1])):
				div += 1
				left = string[start:div]
				right = string[div:]
		if div > end:
			return 0
		else:
			answer.append(left)
			if len(right) == 2:
				if int(right[0]) < int(right[1]) and int(right[0]) > int(answer[len(answer) - 1]):
					answer.append(int(right[0]))
					answer.append(int(right[1]))
				else:
					answer.append(int(right))
			elif divide(right, 0, len(right) - 1, answer) == 0:
				answer.append(right)
			return 1

def solution():
	n = int(input())
	string = input()
	answer = []
	if divide(string, 0, len(string) - 1, answer) == 0:
		print('NO')
	else:
		print('YES')
		print(len(answer))
		for i in answer:
			print(i, end=' ')
		print('')
	return
while q > 0:
	solution()
	q -= 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:])


q = int(input().split()[0])
for _ in range(q):
	n = int(input().split()[0])
	dig = input().split()[0]
	if n > 2:
		print('YES', '\n2', f'\n{dig[0]}', dig[1:])
	elif dig[0] < dig[1]:
		print('YES', '\n2', f'\n{dig[0]} {dig[1]}')
	else:
		print('NO')


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')


q = int(input())
for _ in range(q):
	n = int(input())
	s = int(input())
	st = str(s)
	r = int(st[0])
	u = int(st[1:])
	if r < u:
		print('YES')
		print(2)
		print(r, u)
	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()


from itertools import combinations
from sys import stdin, stdout

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

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline()
q = intIn()
for i in range(q):
	n = intIn()
	s = stringIn()
	if n == 2:
		(s1, s2) = (int(s[0]), int(s[1]))
		if s1 < s2:
			print('YES')
			print(2)
			print(s1, s2)
		else:
			print('NO')
	else:
		print('YES')
		print(2)
		print(int(s[0]), int(s[1:]))


q = int(input())
while q != 0:
	n = int(input())
	str1 = input()
	list1 = list(str1)
	m = len(list1) / 2
	m = int(m)
	if len(list1) <= 1:
		print('NO')
	elif len(list1) == 2:
		if str1[0] < str1[1]:
			print('YES')
			print('2')
			print(str1[0], str1[1])
		else:
			print('NO')
	elif len(list1) == 3:
		print('YES')
		print('2')
		print(str1[0], str1[1:])
	elif len(list1) > 3:
		if len(list1) % 2 == 0:
			print('YES')
			print('2')
			print(str1[:m - 1], str1[m - 1:])
		else:
			print('YES')
			print('2')
			print(str1[:m - 1], str1[m - 1:])
	q = q - 1


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))


n = int(input())
numbers = []
for i in range(n):
	tem_n = input()
	numbers.append(input())

def rec_get_next(smaller, bigger):
	if bigger == '':
		return []
	active_index = 1
	length = len(bigger)
	while active_index < length + 1:
		tem_num = int(bigger[0:active_index])
		if tem_num > smaller:
			ans = rec_get_next(tem_num, bigger[active_index:])
			if ans == -1:
				active_index += 1
			else:
				ans.append(tem_num)
				return ans
		else:
			active_index += 1
	return -1
for number in numbers:
	result = rec_get_next(0, number)
	length = len(result)
	if length < 2:
		print('NO')
	else:
		print('YES')
		print(length)
		res = ''
		for i in reversed(result):
			res += str(i) + ' '
		print(res)


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:])


t = int(input())
while t:
	n = int(input())
	s = input()
	a = int(s[0])
	b = int(s[1:])
	if a < b:
		print('YES')
		print(2)
		print(a, b)
	else:
		print('NO')
	t -= 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:])


que = int(input())
for i in range(que):
	Ni = int(input())
	string = input()
	if Ni == 2:
		if int(string[0]) == int(string[1]):
			print('NO')
			continue
		elif int(string[0]) > int(string[1]):
			print('NO')
			continue
	print('YES')
	print(2)
	print(string[0], ' ', string[1:])


n = int(input())
for i in range(0, n):
	p = int(input())
	s = input().rstrip()
	x = list(s)
	if len(x) == 1:
		print('NO')
	else:
		f = x[0:1]
		F = x[1:len(x)]
		c = int(''.join(f))
		C = int(''.join(F))
		if C > c:
			print('YES')
			print(2)
			print(c, C)
		else:
			print('NO')


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)


n = int(input())
for i in range(n):
	len_str = int(input())
	str = input()
	pre = int(str[0])
	next = int(str[1:])
	if pre < next:
		print('YES\n2\n%d %d' % (pre, next))
	else:
		print('NO')


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:])


def chPathToThis(f=None):
	import os
	f = __file__ if f is None else f
	os.chdir(os.path.dirname(f))
fle = None

def input():
	global fle

	def inner():
		if fle is None:
			from sys import stdin
			for line in stdin:
				yield line
			raise EOFError
		else:
			for line in fle:
				yield line.replace('\r', '').replace('\n', '')
			raise EOFError
	o = inner()
	return next(o)

def main():
	T = int(input())
	for cas in range(T):
		n = int(input())
		s = input()
		if n == 2 and ord(s[0]) >= ord(s[1]):
			print('NO')
			continue
		print('YES')
		print(2)
		print(s[0], s[1:])
try:
	import time, numpy
	chPathToThis(__file__)
	(begin, fle) = (time.clock(), open('pytest.txt'))
	main()
	fle.close()
	print(time.clock() - begin)
except ImportError:
	main()


q = int(input())
for i in range(q):
	n = int(input())
	k = int(input())
	ans1 = k // 10 ** (n - 1)
	ans2 = k % 10 ** (n - 1)
	if ans1 < ans2:
		print('YES')
		print(2)
		print(ans1, ans2)
	else:
		print('NO')


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:]))


NumC = list(map(int, input().split()))
SizeNums = list()
Nums = list()
for a in range(NumC[0]):
	SizeNums.append(int(input()))
	Nums.append(input())
for a in range(NumC[0]):
	PartA = int(Nums[a][0])
	PartB = int(Nums[a][1:])
	if PartA < PartB:
		print('YES')
		print('2')
		print(PartA, PartB)
	else:
		print('NO')


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')


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


for _ in range(0, int(input())):
	n = int(input())
	l = input()
	f = 0
	for i in range(1, n):
		l1 = int(l[:i])
		l2 = int(l[i:])
		if l1 < l2:
			print('YES')
			print(2)
			print(l1, l2)
			f = 89
			break
	if f == 0:
		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])


from random import randint
array = []
count = int(input())
while count > 0:
	lib = {}
	num = int(input())
	lib['count'] = num
	number = input()
	lib['number'] = number
	lib['isSplit'] = ''
	lib['splitCount'] = 0
	lib['splitNumber'] = ''
	array.append(lib)
	count -= 1
for i in range(len(array)):
	num = array[i]['number']
	count = array[i]['count']
	if count == 1:
		array[i]['isSplit'] = 'NO'
		continue
	if count == 2 and num[0] == num[1]:
		array[i]['isSplit'] = 'NO'
		continue
	elif count == 2 and num[0] != num[1]:
		if int(num[0]) > int(num[1]):
			array[i]['isSplit'] = 'NO'
			continue
		array[i]['isSplit'] = 'YES'
		array[i]['splitNumber'] = num[0] + ' ' + num[1]
		continue
	index = 0
	while True:
		num1 = int(num[:int(count / 2 - index)])
		num2 = int(num[int(count / 2 - index):])
		if num1 < num2:
			array[i]['isSplit'] = 'YES'
			array[i]['splitNumber'] = num[:int(count / 2 - index)] + ' ' + num[int(count / 2 - index):]
			break
		index += 1
for item in array:
	print(item['isSplit'])
	if item['isSplit'] == 'NO':
		continue
	print(2)
	print(item['splitNumber'])


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	if n == 2:
		s = int(s)
		if s % 10 > s // 10:
			print('YES')
			print(2)
			print(s // 10, s % 10)
		else:
			print('NO')
	else:
		f_half = n // 2
		if n % 2 == 0:
			f_half -= 1
		f_s = int(s[:f_half])
		s_s = int(s[f_half:])
		print('YES')
		print(2)
		print(f_s, s_s)


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)


n = int(input())
z = []
for i in range(n):
	y = int(input())
	x = str(input())
	a = int(x[0])
	b = x[1:len(x)]
	b = int(b)
	if a < b:
		print('YES')
		print(2)
		print(a, b)
	else:
		print('NO')


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:])


t = int(input())
for i in range(t):
	n = int(input())
	s = input()
	j = 1
	while j < n and s[j] == '0':
		j += 1
	if j == n:
		print('NO')
	else:
		a = int(s[:j])
		b = int(s[j:])
		if a < b:
			print('YES')
			print(2)
			print(a, b)
		else:
			print('NO')


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()


q = int(input())
for i in range(q):
	nd = int(input())
	n = int(input())
	if nd == 1:
		print('NO')
	elif nd == 2 and n % 10 <= (n - n % 10) // 10:
		print('NO')
	else:
		print('YES')
		print(2)
		print(int(str(n)[0]), end=' ')
		print(int(str(n)[1:len(str(n))]), sep=' ')


def solve(start, last):
	cur = 0
	if start == len(s):
		if len(div) > 1:
			print('YES')
			print(len(div))
			print(' '.join(div))
			return True
		else:
			return False
	for i in range(start, len(s)):
		cur = cur * 10 + int(s[i])
		if cur > last:
			div.append(str(cur))
			if solve(i + 1, cur):
				return True
			div.pop()
n = int(input())
for _ in range(n):
	(l, s) = (int(input()), input())
	div = []
	if not solve(0, 0):
		print('NO')


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:])


t = int(input())
r = []
for jjj in range(0, t):
	n = int(input())
	s = input()
	p = []
	f = []
	q = [2]
	if n == 2:
		if int(s[0]) < int(s[1]):
			p.append(s[0])
			p.append(s[1])
			f.append('YES')
			r.append(f)
			r.append(q)
			r.append(p)
		else:
			p.append('NO')
			r.append(p)
	else:
		f.append('YES')
		p.append(s[0])
		p.append(s[1:n])
		r.append(f)
		r.append(q)
		r.append(p)
for i in r:
	for j in i:
		print(j, end=' ')
	print()


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())
list = []
len = []
string = ''
parts = 2
for i in range(q):
	len.append(int(input()))
	list.append(input())
for i in range(q):
	string = list[i]
	if len[i] < 2:
		print('NO')
	elif len[i] == 2:
		if int(string[0]) < int(string[1]):
			print('YES')
			print(parts)
			print(str(string[0]) + ' ' + str(string[1]))
		else:
			print('NO')
	else:
		print('YES')
		print(parts)
		if len[i] % 2 == 0:
			print(str(string[:int((len[i] - 1) / 2)]) + ' ' + str(string[int((len[i] - 1) / 2):]))
		else:
			print(str(string[:int(len[i] / 2)]) + ' ' + str(string[int(len[i] / 2):]))


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


n = int(input())
for _ in range(n):
	ln = int(input())
	num = input()
	num1 = int(num[:1])
	num2 = int(num[1:])
	if num1 < num2:
		print('YES\n2\n', end='')
		print(num1, num2)
	else:
		print('NO')


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:])


q = int(input())
entrada = []
num = []
for i in range(q):
	num.append(int(input()))
	entrada.append(input())
for i in range(q):
	temp = entrada[i]
	if num[i] == 2 and int(temp[0]) >= int(temp[1]):
		print('NO')
	else:
		print('YES')
		print('2')
		result = ''
		for j in range(1, num[i]):
			result = result + temp[j]
		print(temp[0], ' ', result)


q = int(input())
for query in range(q):
	n = int(input())
	s = input()
	if n == 2:
		if s[0] >= s[1]:
			ans = [['NO']]
		else:
			ans = [['YES'], '2', [s[0], s[1]]]
	else:
		ans = [['YES'], '2', [s[:-(n // 2 + 1)], s[-(n // 2 + 1):]]]
	for item in ans:
		print(' '.join(item))


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 sys import stdin

def main():
	Q = int(input())
	for _ in range(Q):
		n = int(input())
		s = int(input())
		for i in range(1, n):
			(div_, mod_) = divmod(s, 10 ** i)
			if div_ < mod_:
				print('YES')
				print(2)
				print(div_, mod_)
				break
		else:
			print('NO')
input = lambda : stdin.readline()
main()


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:])


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


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 f():
	n = int(input())
	for _ in range(n):
		extra = int(input())
		string = list(input())
		l = len(string)
		if l == 2:
			if string[0] >= string[1]:
				print('NO')
			else:
				print('YES\n2')
				print(string[0], string[1])
		else:
			a = int(string[0])
			sub = string[1:]
			string2 = ''.join(sub)
			b = int(string2)
			if a < b:
				print('YES\n2')
				print(a, b)
			else:
				print('NO')
f()


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		s = input()
		last = int(s[0])
		now = 0
		ans = []
		ans.append(last)
		for i in range(1, n):
			now = now * 10 + int(s[i])
			if now > last:
				last = now
				now = 0
				ans.append(last)
		p = 1
		while p <= now:
			p *= 10
		ans[-1] = ans[-1] * p + now
		if len(ans) > 1:
			print('YES')
			print(len(ans))
			for v in ans:
				print(v, end=' ')
			print()
		else:
			print('NO')
main()


q = int(input())
for i in range(q):
	n = int(input())
	s = input()
	if len(s) == 1 or (len(s) == 2 and s[0] >= s[1]):
		print('NO')
	else:
		print('YES')
		ans = [s[0]]
		l = 1
		r = 2
		while r <= len(s):
			while int(s[l:r]) <= int(ans[-1]) and r <= len(s):
				r += 1
			if int(s[l:r]) <= int(ans[-1]):
				ans[-1] = ans[-1] + s[l:r]
			else:
				ans.append(s[l:r])
			l = r
			r = r + 1
		print(len(ans))
		print(*ans)


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:])


q = int(input())
for case in range(q):
	n = int(input())
	s = input()
	if n == 2:
		if int(s[0]) < int(s[1]):
			print('YES')
			print(2)
			print(s[0], s[1])
		else:
			print('NO')
		continue
	if n == 3:
		print('YES')
		print(2)
		print(s[0], s[1:])
		continue
	print('YES')
	print(2)
	print(s[0:int(n / 2) - 1], s[int(n / 2) - 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:])


import sys
q = int(input())
(n, s) = ([], [])
for i in range(q):
	n.append(int(input()))
	s.append(int(input()))
for i in range(q):
	if n[i] == 2 and s[i] // 10 >= s[i] % 10:
		print('NO')
	else:
		k = s[i] % pow(10, n[i] - 1)
		print('YES')
		print(2)
		print(str(s[i] - k)[0], k)


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])


from collections import defaultdict, deque
t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	a = int(s[:1])
	b = int(s[1:])
	if a >= b:
		print('NO')
	else:
		print('YES')
		print(2)
		print(a, b)


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


q = int(input())
for query in range(0, q):
	n = int(input())
	S = input()
	if n == 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)
		if n % 2 == 0:
			print(S[:(n - 2) // 2], S[(n - 2) // 2:])
		else:
			print(S[:(n - 1) // 2], S[(n - 1) // 2:])


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
	n1 = nu[:n // 2]
	n2 = nu[n // 2:]
	no1 = int(''.join(n1))
	no2 = int(''.join(n2))
	print('YES')
	print(2)
	if no2 > no1:
		print(no1, no2)
	else:
		n2.insert(0, n1.pop())
		print(''.join(n1), ''.join(n2))


def main():
	q = int(input())
	for i in range(q):
		resultado = []
		t = int(input())
		numero = list(input())
		i = 1
		resultado.append(numero[0])
		a = numero[i]
		while i < len(numero):
			if int(a) > int(resultado[-1]):
				resultado.append(a)
				i += 1
				if i < len(numero):
					a = numero[i]
			else:
				i += 1
				if i == len(numero):
					resultado[-1] = resultado[-1] + a
				elif i < len(numero):
					a += numero[i]
		if len(resultado) == 1:
			print('NO')
		else:
			print('YES')
			print(len(resultado))
			print(*resultado)
main()


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:])


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

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

def li():
	return list(mi())
for q in range(ii()):
	n = ii()
	s = input().strip()
	(a, b) = (int(s[0]), int(s[1:]))
	if a >= b:
		print('NO')
	else:
		print('YES')
		print(2)
		print(a, b)


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')


count = int(input())
for i in range(count):
	len = int(input())
	seq = input()
	out = ''
	currentNumberStr = ''
	lastNumber = 0
	countOfSegments = 0
	for d in seq:
		currentNumberStr = currentNumberStr + d
		currentNumber = int(currentNumberStr)
		if not out:
			lastNumber = int(d)
			out = d
			countOfSegments = 1
			currentNumberStr = ''
		elif lastNumber < currentNumber:
			lastNumber = currentNumber
			out = out + ' ' + currentNumberStr
			countOfSegments += 1
			currentNumberStr = ''
	if currentNumberStr:
		out = out + currentNumberStr
	if ' ' not in out:
		print('NO')
	else:
		print('YES')
		print(countOfSegments)
		print(out)


q = int(input())
for k in range(q):
	n = int(input())
	s = input()
	if s[0] < s[1] or len(s) > 2:
		print('YES')
		print('2')
		print(s[0], end=' ')
		for j in range(1, n):
			print(s[j], end='')
		print()
	else:
		print()
		print('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])


q = input()
num = []
for i in range(int(q)):
	input()
	a = input()
	num.append(a)
	f = int(a[:1])
	m = int(a[1:])
	if f < m:
		print('YES\n2\n{0} {1}'.format(f, m))
	else:
		print('NO')


TN = int(input())

def solution():
	n = int(input())
	s = list(input())
	if n == 2:
		if s[0] < s[1]:
			print('YES')
			print(2)
			print(s[0], s[1])
		else:
			print('NO')
	elif n % 2 == 1:
		print('YES')
		print(2)
		print(''.join(s[:n // 2]), ''.join(s[n // 2:]))
	else:
		print('YES')
		print(2)
		print(''.join(s[:n // 2 - 1]), ''.join(s[n // 2 - 1:]))
while TN != 0:
	solution()
	TN -= 1


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')