← Home

```go
package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	var q int
	fmt.Fscan(reader, &q)

	for ; q > 0; q-- {
		var n int
		fmt.Fscan(reader, &n)
		var s string
		fmt.Fscan(reader, &s)

		// Simple approach: try to split into two parts s[0:i] and s[i:n]
		// where s[0:i] < s[i:n] numerically
		// For numerical comparison of strings (no leading zeros since digits 1-9):
		// shorter string is smaller, or if same length, lexicographic comparison works

		found := false
		for i := 1; i < n; i++ {
			left := s[0:i]
			right := s[i:n]
			if compareNumStr(left, right) < 0 {
				fmt.Fprintln(writer, "YES")
				fmt.Fprintln(writer, 2)
				fmt.Fprintf(writer, "%s %s\n", left, right)
				found = true
				break
			}
		}
		if !found {
			fmt.Fprintln(writer, "NO")
		}
	}
}

// compareNumStr compares two numeric strings (no leading zeros)
// returns -1, 0, or 1
func compareNumStr(a, b string) int {
	if len(a) != len(b) {
		if len(a) < len(b) {
			return -1
		}
		return 1
	}
	if a < b {
		return -1
	} else if a > b {
		return 1
	}
	return 0
}
```