Theofanis has a string $$$s_1 s_2 \dots s_n$$$ and a character $$$c$$$. He wants to make all characters of the string equal to $$$c$$$ using the minimum number of operations.In one operation he can choose a number $$$x$$$ ($$$1 \le x \le n$$$) and for every position $$$i$$$, where $$$i$$$ is not divisible by $$$x$$$, replace $$$s_i$$$ with $$$c$$$. Find the minimum number of operations required to make all the characters equal to $$$c$$$ and the $$$x$$$-s that he should use in his operations.

The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The first line of each test case contains the integer $$$n$$$ ($$$3 \le n \le 3 \cdot 10^5$$$) and a lowercase Latin letter $$$c$$$ — the length of the string $$$s$$$ and the character the resulting string should consist of. The second line of each test case contains a string $$$s$$$ of lowercase Latin letters — the initial string. It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$3 \cdot 10^5$$$.

For each test case, firstly print one integer $$$m$$$ — the minimum number of operations required to make all the characters equal to $$$c$$$. Next, print $$$m$$$ integers $$$x_1, x_2, \dots, x_m$$$ ($$$1 \le x_j \le n$$$) — the $$$x$$$-s that should be used in the order they are given. It can be proved that under given constraints, an answer always exists. If there are multiple answers, print any.

NoteLet's describe what happens in the third test case:   $$$x_1 = 2$$$: we choose all positions that are not divisible by $$$2$$$ and replace them, i. e. bzyx $$$\rightarrow$$$ bzbx;  $$$x_2 = 3$$$: we choose all positions that are not divisible by $$$3$$$ and replace them, i. e. bzbx $$$\rightarrow$$$ bbbb.

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	const maxCapacity = 4096 * 1024
	buf := make([]byte, maxCapacity)
	scanner.Buffer(buf, maxCapacity)
	var (
		t int
	)
	scanner.Scan()
	t, _ = strconv.Atoi(scanner.Text())
	for i := 0; i < t; i++ {
		flag := false
		scanner.Scan()
		n, _ := strconv.Atoi(scanner.Text()[:strings.Index(scanner.Text(), " ")])
		b := scanner.Text()[strings.Index(scanner.Text(), " ")+1:]
		scanner.Scan()
		l := scanner.Text()
		if strings.Count(l, b) == n {
			fmt.Println(0)
		} else {
			for i := len(l) / 2; i < len(l); i++ {
				if string(l[i]) == b {
					flag = true
					fmt.Println("1")
					fmt.Println(i + 1)
					break
				}
			}
			if !flag {
				fmt.Println("2")
				fmt.Println(len(l), len(l)-1)
			}
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"time"
)

// var m []int
// err = json.Unmarshal([]byte(r.FormValue("example")), &m)

// for i := 0; i < len(m); i++ {
// 	fmt.Println(m[i])
// }

// sort.Slice(arr, func(i, j int) bool {
// 	return arr[i] > arr[j]
// })

func MIN(x, y int64) int64 {
	if x > y {
		return y
	} else {
		return x
	}
}

func MINN(x, y int) int {
	if x > y {
		return y
	} else {
		return x
	}
}

func MKO(x, y int64) int64 {
	if x < y {
		return 0
	} else {
		return x - y + 1
	}
}

func MAX(x, y int64) int64 {
	if x > y {
		return x
	} else {
		return y
	}
}

func MAXX(x, y int) int {
	if x > y {
		return x
	} else {
		return y
	}
}

func LCM(x, y int) int {
	if x >= y {
		initial := x
		for i := 1; i < y+2; i++ {
			if initial%y == 0 {
				break
			} else {
				initial = initial + x
			}

		}
		return initial
	} else {
		initial := y
		for i := 1; i < x+2; i++ {
			if initial%x == 0 {
				break
			} else {
				initial = initial + y
			}

		}
		return initial
	}
}

func GCD(x, y int64) int64 {
	if x*y == 0 {
		return MAX(x, y)
	} else {
		var l, q int64
		l = MAX(x, y)
		q = MIN(x, y)
		var m int64
		for l*q > 0 {
			a := l % q
			b := l - a
			cc := int64(b / q)
			remain := l - cc*q
			l = MAX(remain, q)
			q = MIN(remain, q)
			if l*q == 0 {
				m = l + q
				break
			}

		}
		return m
	}
}

func IsItPrime(x int) bool {
	if x < 10 {
		if x == 2 || x == 3 || x == 5 || x == 7 {
			return true
		} else {
			return false
		}
	} else {
		j := 0
		k := math.Sqrt(float64(x))
		for m := 3; m <= int(k); {
			if x%m == 0 {
				j = 1
				break
			}
			m = m + 2
		}
		if j == 1 {
			return false
		} else {
			return true
		}
	}
}

func PrimeFactorization(n int) (pfs map[int]int) {
	pfs = make(map[int]int)

	// Get the number of 2s that divide n
	for n%2 == 0 {
		if _, ok := pfs[2]; ok {
			pfs[2] += 1
		} else {
			pfs[2] = 1
		}
		n = n / 2
	}

	// n must be odd at this point. so we can skip one element
	// (note i = i + 2)
	for i := 3; i*i <= n; i = i + 2 {
		// while i divides n, append i and divide n
		for n%i == 0 {
			if _, ok := pfs[i]; ok {
				pfs[i] += 1
			} else {
				pfs[i] = 1
			}
			n = n / i
		}
	}

	// This condition is to handle the case when n is a prime number
	// greater than 2
	if n > 2 {
		pfs[n] = 1
	}

	return
}

func NumberOfDivisors(n int) int {
	pfs := PrimeFactorization(n)

	num := 1
	for _, exponents := range pfs {
		num *= (exponents + 1)
	}

	return num
}

func KthPrime(x int) (y int) {
	if x == 1 {
		y = 2
	}
	if x == 2 {
		y = 3
	}
	if x > 2 {
		var sum int = 2
		begin := 5
		for sum < x+1 {
			if IsItPrime(begin) == true {
				sum++
			}
			if sum == x {
				y = begin
				break
			} else {
				if begin%6 == 1 {
					begin = begin + 4
				} else {
					begin = begin + 2
				}
			}
		}
	}
	return
}

func MODULE(x, y int) int {
	if x > y {
		return x - y
	} else {
		return y - x
	}
}

func BITAND(x, y int64) int64 {
	var ans int64
	begin := x
	sec := y
	var count int64 = 1
	for 1 == 1 {
		if (begin%2)*(sec%2) == 1 {
			ans = ans + count
			count = count * 2
			begin = int64(begin / 2)
			sec = int64(sec / 2)
			if begin*sec == 0 {
				break
			}

		} else {
			count = count * 2
			begin = int64(begin / 2)
			sec = int64(sec / 2)
			if begin*sec == 0 {
				break
			}
		}
	}
	return ans
}

func Sum(n, m int) int {
	var ans int

	if n == 1 {
		return 0
	} else {
		for i := 2; i < n; i++ {
			ans = (ans + Sum(i, m)) % m
		}
		for j := 2; j < n+1; j++ {
			ans = (ans + Sum(n/j, m)) % m
		}
		return ans
	}
}

func ChangeStringToDate(x string) (t time.Time, err error) {
	t, err = time.Parse("2006-01-02", x)
	return
}

func DiffrenceBetweenTwoDates(first, second time.Time) int64 {
	date := first
	date2 := second
	k := date.Unix() - date2.Unix()
	return k
}

var t int

func main() {
	var input io.Reader = bufio.NewReader(os.Stdin)
	fmt.Fscan(input, &t)

	for o := 0; o < t; o++ {
		var n int
		var c string

		fmt.Fscan(input, &n, &c)

		STRING := make([]byte, 0)
		fmt.Fscan(input, &STRING)

		ARR := make([]int, 0)
		BRR := make([]int, 0)
		for i := 0; i < n; i++ {
			if string(STRING[i]) != c {
				ARR = append(ARR, i+1)
			} else {
				BRR = append(BRR, i+1)
			}
		}

		q := len(ARR)
		sec := len(BRR)

		if q == 0 {
			fmt.Println(0)
		} else {
			qqq := 0
			for i := sec - 1; i >= 0; i-- {
				init := 0
				for j := q - 1; j >= 0; j-- {
					if ARR[j] < BRR[i] {
						break
					} else {
						if ARR[j]%BRR[i] == 0 {
							init = 1
							break
						}
					}
				}
				if init == 0 {
					qqq = BRR[i]
					break
				}

			}
			if qqq > 0 {
				fmt.Println(1)
				fmt.Println(qqq)
			} else {
				fmt.Println(2)
				fmt.Println(ARR[q-1])
				if ARR[q-1] > 2 {
					fmt.Println(ARR[q-1] - 1)
				} else {
					fmt.Println(n)
				}

			}

		}
	}

}

package main

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

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

	var T int
	fmt.Fscan(in, &T)

	for t := 0; t < T; t++ {
		var n int
		var s2 string
		var s string
		fmt.Fscan(in, &n, &s2, &s)

		ch := rune(s2[0])
		var a int
		m := make([]bool, n+1)
		for i, v := range s {
			if ch == v {
				m[i+1] = true
				a++
			}
		}

		if a == n {
			fmt.Fprintln(out, 0)
		} else {
			var idx int
			for i := n; i >= 0; i-- {
				if m[i] {
					idx = i
					break
				}
			}

			if idx > n/2 {
				fmt.Fprintf(out, "1\n%d\n", idx)
			} else {
				fmt.Fprintf(out, "2\n%d %d\n", n, n-1)
			}
		}
	}
}

package main

import (
	"bufio"
	."fmt"
	"io"
	"os"
	"strings"
)

// github.com/EndlessCheng/codeforces-go
func CF1594C(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var T, n int
	var s, ch string
O:
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n, &ch, &s)
		if strings.Count(s, ch) == n {
			Fprintln(out, 0)
			continue
		}
	o:
		for i := 1; i <= n; i++ {
			for j := i; j <= n; j += i {
				if s[j-1] != ch[0] {
					continue o
				}
			}
			Fprintln(out, 1)
			Fprintln(out, i)
			continue O
		}
		Fprintln(out, 2)
		Fprintln(out, n, n-1)
	}
}

func main() { CF1594C(os.Stdin, os.Stdout) }

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
	"strings"
)

// github.com/EndlessCheng/codeforces-go
func CF1594C(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var T, n int
	var s, ch string
O:
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n, &ch, &s)
		if strings.Count(s, ch) == n {
			Fprintln(out, 0)
			continue
		}
	o:
		for i := 1; i <= n; i++ {
			for j := i; j <= n; j += i {
				if s[j-1] != ch[0] {
					continue o
				}
			}
			Fprintln(out, 1)
			Fprintln(out, i)
			continue O
		}
		Fprintln(out, 2)
		Fprintln(out, n, n-1)
	}
}

func main() { CF1594C(os.Stdin, os.Stdout) }

package main

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

func main() {
	r := bufio.NewReaderSize(os.Stdin, 1024*1024)

	var T int
	fmt.Fscanf(r, "%d\n", &T)
	for t := 0; t < T; t++ {
		var n int
		var cs string

		fmt.Fscanf(r, "%d %s\n", &n, &cs)

		var s string
		fmt.Fscanf(r, "%s\n", &s)

		c := cs[0]

		i := 0
		for ; i < n; i++ {
			if s[i] != c {
				break
			}
		}

		if i == n {
			fmt.Println(0)
			continue
		}

		i = 2
		for ; i <= n; i++ {
			j := i
			for ; j <= n; j += i {
				if s[j-1] != c {
					break
				}
			}
			if j > n {
				fmt.Println(1)
				fmt.Println(i)
				break
			}
		}

		if i == n+1 {
			fmt.Println(2)
			fmt.Println(n-1, n)
		}
	}
}

package main

import (
	"fmt"
)

func solve() {
	var n int
	_, _ = fmt.Scan(&n)
	var c byte
	_, _ = fmt.Scanf("%c", &c)
	var s string
	_, _ = fmt.Scan(&s)
	var cnt = 0
	for i := 0; i < n; i++ {
		if byte(s[i]) != c {
			cnt++
		}
	}
	if cnt == 0 {
		fmt.Println(0)
		return
	}

	for i := 1; i <= n; i++ {
		var tmp = 0
		for j := i; j <= n; j += i {
			if s[j-1] != c {
				tmp++
			}
		}
		if tmp == 0 {
			fmt.Println(1)
			fmt.Println(i)
			return
		}
	}

	fmt.Println(2)
	num := n - 1
	if n&1 == 1 {
		num++
	}
	fmt.Printf("2 %v\n", num)

}

func main() {
	var t int = 0
	_, _ = fmt.Scan(&t)
	for ; t > 0; t-- {
		solve()
	}
}

package main

import(
	"fmt"
)
const mod =1e9+7
var t,n int
var s string
var c string

func nhap(){
	fmt.Scan(&n)
	fmt.Scan(&c)
	fmt.Scan(&s)
}
func lam(){
	ans:=-1
	oke:=true
	for i:=0;i<n;i++{
		if s[i]==c[0]{
			ans=i+1
		}else{
			oke=false
		}
	}
	if oke==true{
		fmt.Println(0)
		return
	}else{
		if 2*ans>n{
			fmt.Println(1)
			fmt.Println(ans)
		}else{
			fmt.Println(2)
			fmt.Println(n-1,n)
		}
	}
}
func main() {
	fmt.Scan(&t)
	for t>0{
		t--
		nhap()
		lam()
	}
}

package main

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

var (
	writer  = bufio.NewWriter(os.Stdout)
	scanner = bufio.NewScanner(os.Stdin)
)

func init() {
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 4096), 1e9)
}

func printf(f string, a ...interface{}) {
	fmt.Fprintf(writer, f, a...)
}

func _int() int {
	s := _string()
	i := 0
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int(r - '0')
	}
	return i
}

func _int64() int64 {
	s := _string()
	i := int64(0)
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int64(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int64(r - '0')
	}
	return i
}

func _string() string {
	if !scanner.Scan() {
		panic(scanner.Err())
	}
	return scanner.Text()
}

func main() {
	defer writer.Flush()
	for t := _int(); t > 0; t-- {
		n := _int64()
		c := _string()[0]
		s := _string()
		res := sol(n, c, s)
		printf("%d\n", len(res))
		if len(res) > 0 {
			for _, r := range res {
				printf("%d ", r)
			}
			printf("\n")
		}
	}
}

func sol(n int64, c byte, s string) []int64 {
	if allC(s, c) {
		return nil
	}
	for i := n - 1; i >= 0; i-- {
		if s[i] == c {
			if (i+1)*2 > n {
				return []int64{i + 1}
			}
			break
		}
	}
	return []int64{n - 1, n}
}

func allC(s string, c byte) bool {
	for i := range s {
		if s[i] != c {
			return false
		}
	}
	return true
}

package main

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

func main()  {
	in := bufio.NewReader(os.Stdin)
	//out := bufio.NewWriter(os.Stdout)
	var t int
	var n int64
	fmt.Fscanf(in, "%d\n", &t)
	for i:= 0;i < t;i++{
		tchar := make([]byte,2)
		str := make([]byte,30010)
		fmt.Fscanf(in, "%d %s\n", &n,&tchar)
		fmt.Fscanf(in,"%s\n",&str)
		strlen := len(str)
		last := -1
		tcharCnt := 0
		for j:= strlen-1;j >= 0;j--{
			if str[j] == tchar[0]{
				tcharCnt++
				if last == -1{
					last = j
				}
			}
		}
		if tcharCnt == strlen{
			fmt.Printf("0\n")
			continue
		}
		if last+1 > strlen/2{
			fmt.Printf("1\n")
			fmt.Printf("%v\n",last+1)
		}else{
			fmt.Printf("2\n")
			fmt.Printf("%v %v\n",strlen,strlen-1)
		}
	}

}

package main

import (
	"bufio"
	"fmt"
	"os"
	"sync"
	"runtime"
	"math"
)

var N int
var char string

const MOD int64 = 1000000007

var a string

var primes []uint64
var mp map[int]bool

func main() {

	r := bufio.NewReader(os.Stdin)

	var t int

	fmt.Fscan(r, &t)

	for i := 0; i < t; i++ {
		fmt.Fscan(r, &N, &char)

		fmt.Fscan(r, &a)

		solve()
	}
}

func solve() {
	//1
	diff := make(map[int]bool)
	for i := 0; i < N; i++ {
		if string(a[i]) != char {
			diff[i + 1] = true
		}
	}

	if len(diff) == 0 {
		fmt.Println(0)
		return
	}

	for i := N - 1; i >=0 ; i-- {
		if string(a[i]) == char {

			present := false

			for j := 1; ; j++{
				pos := (i + 1) * j

				if pos > N {
					break
				}

				if ok, _ := diff[(i + 1) * j]; ok {
					present = true
					break
				}
			}

			if !present {
				fmt.Println(1)
				fmt.Println(i + 1)
				return
			}

		}
	}

	fmt.Println(2)
	fmt.Print(N)
	fmt.Print(" ")
	fmt.Print(N - 1)
	fmt.Println()
}

func GCD(a, b int) int {
	for b != 0 {
		t := b
		b = a % b
		a = t
	}
	return a
}

func fill(nums []bool, i uint64, max uint64) {
	a := 3 * i
	for a <= max {
		nums[a/2] = true
		a = a + 2*i
	}
}

func goFill(nums []bool, i uint64, max uint64, next chan bool) {
	fill(nums, i, max)
	<-next
}

// SieveOfEratosthenes returns a slice of all prime numbers equal or lower than max using Sieve Of Eratosthenes.
// This is without segmenting.
func SieveOfEratosthenes(n uint64) []uint64 {
	cores := runtime.NumCPU()
	next := make(chan bool, cores)

	var nums = make([]bool, n/2+1)
	m := uint64(math.Sqrt(float64(n)))

	for i := uint64(3); i <= m; i = i + 2 {
		if nums[i/2] == false {
			go goFill(nums, i, n, next)
			next <- true
		}
	}

	for i := 0; i < cores; i++ {
		next <- true
	}

	var ps []uint64
	if n >= 2 {
		ps = append(ps, 2)
	}
	for i := uint64(3); i <= n; i = i + 2 {
		if nums[i/2] == false {
			ps = append(ps, i)
		}
	}
	return ps
}

var csegPool sync.Pool

func fillSegments(n uint64, basePrimes []uint64, allPrimes *[]uint64, segSize uint64, segNum uint64, next chan bool, nextTurn []chan bool) {
	cseg := (csegPool.Get()).([]bool)
	for i := uint64(0); i < segSize; i++ {
		cseg[i] = false
	}
	for i := 0; i < len(basePrimes); i++ {
		jMax := segSize * (segNum + 1) / basePrimes[i]
		for j := (segSize * segNum) / basePrimes[i]; j < jMax; j++ {
			sn := (j + 1) * basePrimes[i]
			cseg[sn-segSize*segNum-1] = true
		}
	}

	// This waiting for turn is to avoid sorts at the end.
	// Sorts are much more expensive than this wait even for a
	// mostly sorted list.
	if segNum > 1 {
		<-nextTurn[segNum]
	}

	for i := uint64(0); i < segSize; i++ {
		if !cseg[i] && segSize*segNum+i+1 <= n {
			*allPrimes = append(*allPrimes, segSize*segNum+i+1)
		}
	}

	<-next
	if int(segNum)+1 < len(nextTurn) {
		nextTurn[segNum+1] <- true
	}

	csegPool.Put(cseg)
}

// Primes is using Segmented sieve. This method will reduce memory usae of Sieve of Eratosthenes considerably.
// besides memory allocation for Prime numbers slice, there is only O(sqrt(n)) extra memory required for the operation
// You can learn more about it in https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes.
func Primes(n uint64) (allPrimes []uint64) {
	if uint64(math.Log(float64(n))-1) == 0 {
		return SieveOfEratosthenes(n)
	}

	// There is a function pi(x) in math that will returns approximate number of prime numbers below n.
	allPrimes = make([]uint64, 0, n/uint64(math.Log(float64(n))-1))
	segSize := uint64(math.Sqrt(float64(n)))

	csegPool.New = func() interface{} {
		return make([]bool, segSize)
	}

	basePrimes := SieveOfEratosthenes(segSize)
	allPrimes = append(allPrimes, basePrimes...)

	cores := runtime.NumCPU()
	next := make(chan bool, cores)
	var nextTurn []chan bool
	nextTurn = make([]chan bool, n/segSize+1)
	for i := uint64(0); i < n/segSize+1; i++ {
		nextTurn[i] = make(chan bool)
	}
	for segNum := uint64(1); segNum <= n/segSize; segNum++ {
		go fillSegments(n, basePrimes, &allPrimes, segSize, segNum, next, nextTurn)
		next <- true
	}
	for i := 0; i < cores; i++ {
		next <- true
	}

	return allPrimes
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var (
		t int
	)
	scanner.Scan()
	t, _ = strconv.Atoi(scanner.Text())
	for i := 0; i < t; i++ {
		flag := false
		scanner.Scan()
		n, _ := strconv.Atoi(scanner.Text()[:strings.Index(scanner.Text(), " ")])
		b := scanner.Text()[strings.Index(scanner.Text(), " ")+1:]
		scanner.Scan()
		l := scanner.Text()
		if strings.Count(l, b) == n {
			fmt.Println(0)
		} else {
			for i := len(l) / 2; i < len(l); i++ {
				if string(l[i]) == b {
					flag = true
					fmt.Println("1")
					fmt.Println(i + 1)
					break
				}
			}
			if !flag {
				fmt.Println("2")
				fmt.Println(len(l), len(l)-1)
			}
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var (
		t int
	)
	scanner.Scan()
	t, _ = strconv.Atoi(scanner.Text())
	for i := 0; i < t; i++ {
		flag := false
		scanner.Scan()
		b := scanner.Text()[strings.Index(scanner.Text(), " ")+1:]
		scanner.Scan()
		l := scanner.Text()
		if strings.Count(l, b) == len(l) {
			fmt.Println(0)
		} else {
			for i := len(l) / 2; i < len(l); i++ {
				if string(l[i]) == b {
					flag = true
					fmt.Println("1")
					fmt.Println(i + 1)
					break
				}
			}
			if !flag {
				fmt.Println("2")
				fmt.Println(len(l), len(l)-1)
			}
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var (
		t int
	)
	scanner.Scan()
	t, _ = strconv.Atoi(scanner.Text())
	for i := 0; i < t; i++ {
		evenFlag := false
		oddFlag := false
		scanner.Scan()
		b := scanner.Text()[strings.Index(scanner.Text(), " ")+1:]
		scanner.Scan()
		l := scanner.Text()
		for i := range l {
			if string(l[i]) != b && i > 0 {
				if i%2 == 0 {
					evenFlag = true
				} else {
					oddFlag = true
				}
			}
		}
		if string(l[0]) != b && !(evenFlag || oddFlag) {
			evenFlag = true
		}
		if evenFlag && oddFlag {
			fmt.Println("2")
			fmt.Println(len(l), len(l)-1)
		} else if evenFlag {
			fmt.Println("1")
			fmt.Println("2")
		} else if oddFlag {
			fmt.Println("1")
			fmt.Println("3")
		} else {
			fmt.Println("0")
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var (
		t int
	)
	scanner.Scan()
	t, _ = strconv.Atoi(scanner.Text())
	for i := 0; i < t; i++ {
		evenFlag := false
		oddFlag := false
		scanner.Scan()
		b := scanner.Text()[strings.Index(scanner.Text(), " ")+1:]
		scanner.Scan()
		l := scanner.Text()
		for i := range l {
			if string(l[i]) != b && i > 0 {
				if i%2 == 0 {
					evenFlag = true
				} else {
					oddFlag = true
				}
			}
		}
		if string(l[0]) != b && !(evenFlag || oddFlag) {
			evenFlag = true
		}
		if evenFlag && oddFlag {
			fmt.Println("2")
			fmt.Println("2 3")
		} else if evenFlag {
			fmt.Println("1")
			fmt.Println("2")
		} else if oddFlag {
			fmt.Println("1")
			fmt.Println("3")
		} else {
			fmt.Println("0")
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var (
		t int
	)
	scanner.Scan()
	t, _ = strconv.Atoi(scanner.Text())
	for i := 0; i < t; i++ {
		evenFlag := false
		oddFlag := false
		scanner.Scan()
		b := scanner.Text()[strings.Index(scanner.Text(), " ")+1:]
		scanner.Scan()
		l := scanner.Text()
		for i := range l {
			if string(l[i]) != b && i > 0 {
				if i%2 == 0 {
					oddFlag = true
				} else {
					evenFlag = true
				}
			}
		}
		if string(l[0]) != b && !(evenFlag || oddFlag) {
			evenFlag = true
		}
		if evenFlag && oddFlag {
			fmt.Println("2")
			fmt.Println("2 3")
		} else if evenFlag {
			fmt.Println("1")
			fmt.Println("2")
		} else if oddFlag {
			fmt.Println("1")
			fmt.Println("3")
		} else {
			fmt.Println("0")
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var (
		t int
	)
	scanner.Scan()
	t, _ = strconv.Atoi(scanner.Text())
	for i := 0; i < t; i++ {
		evenFlag := false
		oddFlag := false
		scanner.Scan()
		b := scanner.Text()[strings.Index(scanner.Text(), " ")+1:]
		scanner.Scan()
		l := scanner.Text()
		for i := range l {
			if string(l[i]) != b && i > 0 {
				if i%2 == 0 {
					evenFlag = true
				} else {
					oddFlag = true
				}
			}
		}
		if string(l[0]) != b {
			evenFlag = true
		}
		if evenFlag && oddFlag {
			fmt.Println("2")
			fmt.Println("2 3")
		} else if evenFlag {
			fmt.Println("1")
			fmt.Println("2")
		} else if oddFlag {
			fmt.Println("1")
			fmt.Println("3")
		} else {
			fmt.Println("0")
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var (
		t int
	)
	scanner.Scan()
	t, _ = strconv.Atoi(scanner.Text())
	for i := 0; i < t; i++ {
		evenFlag := false
		oddFlag := false
		scanner.Scan()
		b := scanner.Text()[strings.Index(scanner.Text(), " ")+1:]
		scanner.Scan()
		l := scanner.Text()
		for i := range l {
			if string(l[i]) != b && i > 0 {
				if i%2 == 0 {
					oddFlag = true
				} else {
					evenFlag = true
				}
			}
		}
		if string(l[0]) != b {
			evenFlag = true
		}
		if evenFlag && oddFlag {
			fmt.Println("2")
			fmt.Println("2 3")
		} else if evenFlag {
			fmt.Println("1")
			fmt.Println("2")
		} else if oddFlag {
			fmt.Println("1")
			fmt.Println("3")
		} else {
			fmt.Println("0")
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var (
		t int
	)
	scanner.Scan()
	t, _ = strconv.Atoi(scanner.Text())
	for i := 0; i < t; i++ {
		evenFlag := false
		oddFlag := false
		scanner.Scan()
		b := scanner.Text()[strings.Index(scanner.Text(), " ") + 1:]
		scanner.Scan()
		l := scanner.Text()
		for i := range l {
			if string(l[i]) != b {
				if i%2 == 0 {
					evenFlag = true
				} else {
					oddFlag = true
				}
			}
		}
		if evenFlag && oddFlag {
			fmt.Println("2")
			fmt.Println("2 3")
		} else if evenFlag {
			fmt.Println("1")
			fmt.Println("2")
		} else if oddFlag {
			fmt.Println("1")
			fmt.Println("3")
		} else {
			fmt.Println("0")
		}
	}
}

package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var (
		a, t int
		b, l string
	)
	scanner.Scan()
	t, _ = strconv.Atoi(scanner.Text())
	for i := 0; i < t; i++ {
		evenFlag := false
		oddFlag := false
		fmt.Scanln(&a, &b)
		fmt.Scanln(&l)
		for i := range l {
			if string(l[i]) != (b) {
				if i%2 == 0 {
					evenFlag = true
				} else {
					oddFlag = true
				}
			}
		}
		if evenFlag && oddFlag {
			fmt.Println("2")
			fmt.Println("2 3")
		} else if evenFlag {
			fmt.Println("1")
			fmt.Println("2")
		} else if oddFlag {
			fmt.Println("1")
			fmt.Println("3")
		} else {
			fmt.Println("0")
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"time"
)

// var m []int
// err = json.Unmarshal([]byte(r.FormValue("example")), &m)

// for i := 0; i < len(m); i++ {
// 	fmt.Println(m[i])
// }

// sort.Slice(arr, func(i, j int) bool {
// 	return arr[i] > arr[j]
// })

func MIN(x, y int64) int64 {
	if x > y {
		return y
	} else {
		return x
	}
}

func MINN(x, y int) int {
	if x > y {
		return y
	} else {
		return x
	}
}

func MKO(x, y int64) int64 {
	if x < y {
		return 0
	} else {
		return x - y + 1
	}
}

func MAX(x, y int64) int64 {
	if x > y {
		return x
	} else {
		return y
	}
}

func MAXX(x, y int) int {
	if x > y {
		return x
	} else {
		return y
	}
}

func LCM(x, y int) int {
	if x >= y {
		initial := x
		for i := 1; i < y+2; i++ {
			if initial%y == 0 {
				break
			} else {
				initial = initial + x
			}

		}
		return initial
	} else {
		initial := y
		for i := 1; i < x+2; i++ {
			if initial%x == 0 {
				break
			} else {
				initial = initial + y
			}

		}
		return initial
	}
}

func GCD(x, y int64) int64 {
	if x*y == 0 {
		return MAX(x, y)
	} else {
		var l, q int64
		l = MAX(x, y)
		q = MIN(x, y)
		var m int64
		for l*q > 0 {
			a := l % q
			b := l - a
			cc := int64(b / q)
			remain := l - cc*q
			l = MAX(remain, q)
			q = MIN(remain, q)
			if l*q == 0 {
				m = l + q
				break
			}

		}
		return m
	}
}

func IsItPrime(x int) bool {
	if x < 10 {
		if x == 2 || x == 3 || x == 5 || x == 7 {
			return true
		} else {
			return false
		}
	} else {
		j := 0
		k := math.Sqrt(float64(x))
		for m := 3; m <= int(k); {
			if x%m == 0 {
				j = 1
				break
			}
			m = m + 2
		}
		if j == 1 {
			return false
		} else {
			return true
		}
	}
}

func PrimeFactorization(n int) (pfs map[int]int) {
	pfs = make(map[int]int)

	// Get the number of 2s that divide n
	for n%2 == 0 {
		if _, ok := pfs[2]; ok {
			pfs[2] += 1
		} else {
			pfs[2] = 1
		}
		n = n / 2
	}

	// n must be odd at this point. so we can skip one element
	// (note i = i + 2)
	for i := 3; i*i <= n; i = i + 2 {
		// while i divides n, append i and divide n
		for n%i == 0 {
			if _, ok := pfs[i]; ok {
				pfs[i] += 1
			} else {
				pfs[i] = 1
			}
			n = n / i
		}
	}

	// This condition is to handle the case when n is a prime number
	// greater than 2
	if n > 2 {
		pfs[n] = 1
	}

	return
}

func NumberOfDivisors(n int) int {
	pfs := PrimeFactorization(n)

	num := 1
	for _, exponents := range pfs {
		num *= (exponents + 1)
	}

	return num
}

func KthPrime(x int) (y int) {
	if x == 1 {
		y = 2
	}
	if x == 2 {
		y = 3
	}
	if x > 2 {
		var sum int = 2
		begin := 5
		for sum < x+1 {
			if IsItPrime(begin) == true {
				sum++
			}
			if sum == x {
				y = begin
				break
			} else {
				if begin%6 == 1 {
					begin = begin + 4
				} else {
					begin = begin + 2
				}
			}
		}
	}
	return
}

func MODULE(x, y int) int {
	if x > y {
		return x - y
	} else {
		return y - x
	}
}

func BITAND(x, y int64) int64 {
	var ans int64
	begin := x
	sec := y
	var count int64 = 1
	for 1 == 1 {
		if (begin%2)*(sec%2) == 1 {
			ans = ans + count
			count = count * 2
			begin = int64(begin / 2)
			sec = int64(sec / 2)
			if begin*sec == 0 {
				break
			}

		} else {
			count = count * 2
			begin = int64(begin / 2)
			sec = int64(sec / 2)
			if begin*sec == 0 {
				break
			}
		}
	}
	return ans
}

func Sum(n, m int) int {
	var ans int

	if n == 1 {
		return 0
	} else {
		for i := 2; i < n; i++ {
			ans = (ans + Sum(i, m)) % m
		}
		for j := 2; j < n+1; j++ {
			ans = (ans + Sum(n/j, m)) % m
		}
		return ans
	}
}

func ChangeStringToDate(x string) (t time.Time, err error) {
	t, err = time.Parse("2006-01-02", x)
	return
}

func DiffrenceBetweenTwoDates(first, second time.Time) int64 {
	date := first
	date2 := second
	k := date.Unix() - date2.Unix()
	return k
}

var t int

func main() {
	var input io.Reader = bufio.NewReader(os.Stdin)
	fmt.Fscan(input, &t)

	for o := 0; o < t; o++ {
		var n int
		var c string

		fmt.Fscan(input, &n, &c)

		STRING := make([]byte, 0)
		fmt.Fscan(input, &STRING)

		ARR := make([]int, 0)
		BRR := make([]int, 0)
		for i := 0; i < n; i++ {
			if string(STRING[i]) != c {
				ARR = append(ARR, i+1)
			} else {
				BRR = append(BRR, i+1)
			}
		}

		q := len(ARR)
		sec := len(BRR)

		if q == 0 {
			fmt.Println(0)
		} else {
			qqq := 0
			for i := sec - 1; i > 1; i-- {
				init := 0
				for j := q - 1; j >= 0; j-- {
					if ARR[j] < BRR[i] {
						break
					} else {
						if ARR[j]%BRR[i] == 0 {
							init = 1
							break
						}
					}
				}
				if init == 0 {
					qqq = BRR[i]
					break
				}

			}
			if qqq > 0 {
				fmt.Println(1)
				fmt.Println(qqq)
			} else {
				fmt.Println(2)
				fmt.Println(ARR[q-1])
				if ARR[q-1] > 2 {
					fmt.Println(ARR[q-1] - 1)
				} else {
					fmt.Println(n)
				}

			}

		}
	}

}

package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"time"
)

// var m []int
// err = json.Unmarshal([]byte(r.FormValue("example")), &m)

// for i := 0; i < len(m); i++ {
// 	fmt.Println(m[i])
// }

// sort.Slice(arr, func(i, j int) bool {
// 	return arr[i] > arr[j]
// })

func MIN(x, y int64) int64 {
	if x > y {
		return y
	} else {
		return x
	}
}

func MINN(x, y int) int {
	if x > y {
		return y
	} else {
		return x
	}
}

func MKO(x, y int64) int64 {
	if x < y {
		return 0
	} else {
		return x - y + 1
	}
}

func MAX(x, y int64) int64 {
	if x > y {
		return x
	} else {
		return y
	}
}

func MAXX(x, y int) int {
	if x > y {
		return x
	} else {
		return y
	}
}

func LCM(x, y int) int {
	if x >= y {
		initial := x
		for i := 1; i < y+2; i++ {
			if initial%y == 0 {
				break
			} else {
				initial = initial + x
			}

		}
		return initial
	} else {
		initial := y
		for i := 1; i < x+2; i++ {
			if initial%x == 0 {
				break
			} else {
				initial = initial + y
			}

		}
		return initial
	}
}

func GCD(x, y int64) int64 {
	if x*y == 0 {
		return MAX(x, y)
	} else {
		var l, q int64
		l = MAX(x, y)
		q = MIN(x, y)
		var m int64
		for l*q > 0 {
			a := l % q
			b := l - a
			cc := int64(b / q)
			remain := l - cc*q
			l = MAX(remain, q)
			q = MIN(remain, q)
			if l*q == 0 {
				m = l + q
				break
			}

		}
		return m
	}
}

func IsItPrime(x int) bool {
	if x < 10 {
		if x == 2 || x == 3 || x == 5 || x == 7 {
			return true
		} else {
			return false
		}
	} else {
		j := 0
		k := math.Sqrt(float64(x))
		for m := 3; m <= int(k); {
			if x%m == 0 {
				j = 1
				break
			}
			m = m + 2
		}
		if j == 1 {
			return false
		} else {
			return true
		}
	}
}

func PrimeFactorization(n int) (pfs map[int]int) {
	pfs = make(map[int]int)

	// Get the number of 2s that divide n
	for n%2 == 0 {
		if _, ok := pfs[2]; ok {
			pfs[2] += 1
		} else {
			pfs[2] = 1
		}
		n = n / 2
	}

	// n must be odd at this point. so we can skip one element
	// (note i = i + 2)
	for i := 3; i*i <= n; i = i + 2 {
		// while i divides n, append i and divide n
		for n%i == 0 {
			if _, ok := pfs[i]; ok {
				pfs[i] += 1
			} else {
				pfs[i] = 1
			}
			n = n / i
		}
	}

	// This condition is to handle the case when n is a prime number
	// greater than 2
	if n > 2 {
		pfs[n] = 1
	}

	return
}

func NumberOfDivisors(n int) int {
	pfs := PrimeFactorization(n)

	num := 1
	for _, exponents := range pfs {
		num *= (exponents + 1)
	}

	return num
}

func KthPrime(x int) (y int) {
	if x == 1 {
		y = 2
	}
	if x == 2 {
		y = 3
	}
	if x > 2 {
		var sum int = 2
		begin := 5
		for sum < x+1 {
			if IsItPrime(begin) == true {
				sum++
			}
			if sum == x {
				y = begin
				break
			} else {
				if begin%6 == 1 {
					begin = begin + 4
				} else {
					begin = begin + 2
				}
			}
		}
	}
	return
}

func MODULE(x, y int) int {
	if x > y {
		return x - y
	} else {
		return y - x
	}
}

func BITAND(x, y int64) int64 {
	var ans int64
	begin := x
	sec := y
	var count int64 = 1
	for 1 == 1 {
		if (begin%2)*(sec%2) == 1 {
			ans = ans + count
			count = count * 2
			begin = int64(begin / 2)
			sec = int64(sec / 2)
			if begin*sec == 0 {
				break
			}

		} else {
			count = count * 2
			begin = int64(begin / 2)
			sec = int64(sec / 2)
			if begin*sec == 0 {
				break
			}
		}
	}
	return ans
}

func Sum(n, m int) int {
	var ans int

	if n == 1 {
		return 0
	} else {
		for i := 2; i < n; i++ {
			ans = (ans + Sum(i, m)) % m
		}
		for j := 2; j < n+1; j++ {
			ans = (ans + Sum(n/j, m)) % m
		}
		return ans
	}
}

func ChangeStringToDate(x string) (t time.Time, err error) {
	t, err = time.Parse("2006-01-02", x)
	return
}

func DiffrenceBetweenTwoDates(first, second time.Time) int64 {
	date := first
	date2 := second
	k := date.Unix() - date2.Unix()
	return k
}

var t int

func main() {
	var input io.Reader = bufio.NewReader(os.Stdin)
	fmt.Fscan(input, &t)

	for o := 0; o < t; o++ {
		var n int
		var c string

		fmt.Fscan(input, &n, &c)

		STRING := make([]byte, 0)
		fmt.Fscan(input, &STRING)

		ARR := make([]int, 0)
		for i := 0; i < n; i++ {
			if string(STRING[i]) != c {
				ARR = append(ARR, i+1)
			}
		}

		q := len(ARR)

		fmt.Println(ARR)

		if q == 0 {
			fmt.Println(0)
		} else {
			qqq := 0
			for i := n; i > 1; i-- {
				init := 0
				for j := q - 1; j >= 0; j-- {
					if ARR[j] < i {
						break
					} else {
						if ARR[j]%i == 0 {
							init = 1
							break
						}
					}
				}
				if init == 0 {
					qqq = i
					break
				}

			}
			if qqq > 0 {
				fmt.Println(1)
				fmt.Println(qqq)
			} else {
				fmt.Println(2)
				fmt.Println(ARR[q-1])
				if ARR[q-1] > 2 {
					fmt.Println(ARR[q-1] - 1)
				} else {
					fmt.Println(n)
				}

			}

		}
	}

}

package main

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

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

	var T int
	fmt.Fscan(in, &T)

	for t := 0; t < T; t++ {
		var n int
		var s2 string
		var s string
		fmt.Fscan(in, &n, &s2, &s)

		ch := rune(s2[0])
		z := []int{}
		var a, b int
		for i, v := range s {
			if ch == v {
				var f bool
				for _, n := range z {
					if i%n == 0 {
						f = true
						break
					}
				}

				if !f && i != 0 {
					z = append(z, i+1)
				}
				a++
			} else {
				idx := -1

				for i, n := range z {
					if (i+1)%n == 0 {
						idx = i
						break
					}
				}
				if idx >= 0 {
					z = append(z[:idx], z[idx+1:]...)
				}
				b++
			}
		}

		if a == n {
			fmt.Fprintln(out, 0)
		} else if len(z) > 0 {
			fmt.Fprintln(out, 1)
			fmt.Fprintln(out, z[0])
		} else {
			fmt.Fprintln(out, 2)
			fmt.Fprintf(out, "%d %d\n", n-1, n)
		}
	}
}

package main

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

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

	var T int
	fmt.Fscan(in, &T)

	for t := 0; t < T; t++ {
		var n int
		var b string
		var s string
		fmt.Fscan(in, &n, &b, &s)

		ch := rune(b[0])
		z := []int{}
		for i, v := range s {
			if v != ch {
				if len(z) < 2 {
					z = append(z, i)
				} else {
					break
				}
			}
		}

		if len(z) == 0 {
			fmt.Fprintln(out, 0)
		} else if len(z) == 1 {
			fmt.Fprintf(out, "1\n%d\n", z[0]+2)
		} else if s[n-1] == byte(ch) {
			fmt.Fprintf(out, "1\n%d\n", n)
		} else {
			fmt.Fprintln(out, 2)
			fmt.Fprintf(out, "%d %d\n", n-1, n)
		}
	}
}

package main

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

func main() {
	r := bufio.NewReaderSize(os.Stdin, 1024*1024)

	var T int
	fmt.Fscanf(r, "%d\n", &T)
	for t := 0; t < T; t++ {
		var n int
		var cs string

		fmt.Fscanf(r, "%d %s\n", &n, &cs)

		var s string
		fmt.Fscanf(r, "%s\n", &s)

		c := cs[0]

		i := 0
		for ; i < n; i++ {
			if s[i] != c {
				break
			}
		}

		if i == n {
			fmt.Println(0)
			continue
		}

		i = 2
		for ; i < n; i++ {
			j := i
			for ; j <= n; j += i {
				if s[j-1] != c {
					break
				}
			}
			if j >= n {
				fmt.Println(1)
				fmt.Println(i)
				break
			}
		}

		if i == n {
			fmt.Println(2)
			fmt.Println(n-1, n)
		}
	}
}


You are given three integers $$$a$$$, $$$b$$$, and $$$c$$$. Determine if one of them is the sum of the other two.

The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 9261$$$) — the number of test cases. The description of each test case consists of three integers $$$a$$$, $$$b$$$, $$$c$$$ ($$$0 \leq a, b, c \leq 20$$$).

For each test case, output "YES" if one of the numbers is the sum of the other two, and "NO" otherwise. You can output the answer in any case (for example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer).

NoteIn the first test case, $$$1 + 3 = 4$$$.In the second test case, none of the numbers is the sum of the other two.In the third test case, $$$9 + 11 = 20$$$.

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {

	t := 0
	fmt.Scanln(&t)
	var str strings.Builder
	for ; t > 0; t-- {
		a, b, c := 0, 0, 0
		fmt.Scanln(&a, &b, &c)
		if a+b == c || a+c == b || b+c == a {
			str.WriteString("YES\n")
		} else {
			str.WriteString("NO\n")
		}
	}
	fmt.Print(str.String())

	//solve()
}

func solve() {
	sc := bufio.NewReader(os.Stdin)
	line, _ := sc.ReadString('\n')

	t, _ := strconv.Atoi(strings.TrimSpace(line))
	var str strings.Builder
	for ; t > 0; t-- {
		line, _ = sc.ReadString('\n')
		aux := strings.Split(line, " ")
		a, _ := strconv.Atoi(strings.TrimSpace(aux[0]))
		b, _ := strconv.Atoi(strings.TrimSpace(aux[1]))
		c, _ := strconv.Atoi(strings.TrimSpace(aux[2]))
		if a+b == c || a+c == b || b+c == a {
			str.WriteString("YES\n")
		} else {
			str.WriteString("NO\n")
		}

	}
	fmt.Print(str.String())
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	/*
		t := 0
		fmt.Scanf("%d\n", &t)
		var str strings.Builder
		for ; t > 0; t-- {
			a, b, c := 0, 0, 0
			fmt.Scanf("%d %d %d\n", &a, &b, &c)
			if a+b == c || a+c == b || b+c == a {
				str.WriteString("YES\n")
			} else {
				str.WriteString("NO\n")
			}
		}
		fmt.Print(str.String())

	*/
	solve()
}

func solve() {
	sc := bufio.NewReader(os.Stdin)
	line, _ := sc.ReadString('\n')

	t, _ := strconv.Atoi(strings.TrimSpace(line))
	var str strings.Builder
	for ; t > 0; t-- {
		line, _ = sc.ReadString('\n')
		aux := strings.Split(line, " ")
		a, _ := strconv.Atoi(strings.TrimSpace(aux[0]))
		b, _ := strconv.Atoi(strings.TrimSpace(aux[1]))
		c, _ := strconv.Atoi(strings.TrimSpace(aux[2]))
		if a+b == c || a+c == b || b+c == a {
			str.WriteString("YES\n")
		} else {
			str.WriteString("NO\n")
		}

	}
	fmt.Print(str.String())
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

type CF1742AA struct {
	sc        *bufio.Reader
	split     []string
	index     int
	separator string
}

func (in *CF1742AA) GetLine() string {
	line, err := in.sc.ReadString('\n')
	if err != nil {
		fmt.Println("error line:", line, " err: ", err)
	}
	in.split = []string{}
	in.index = 0
	return line
}
func (in *CF1742AA) load() {
	if len(in.split) <= in.index {
		in.split = strings.Split(in.GetLine(), in.separator)
		in.index = 0
	}
}

func (in *CF1742AA) NextInt() int {
	in.load()
	val, _ := strconv.Atoi(strings.TrimSpace(in.split[in.index]))
	in.index++
	return val
}

func (in *CF1742AA) NextInt64() int64 {
	in.load()
	val, _ := strconv.ParseInt(strings.TrimSpace(in.split[in.index]), 10, 64)
	in.index++
	return val
}

func (in *CF1742AA) NextString() string {
	in.load()
	val := strings.TrimSpace(in.split[in.index])
	in.index++
	return val
}

/**
Run solve the problem CF1742AA
Date: 10/15/2022
User: wotan
URL: https://codeforces.com/problemset/problem/1742/A
Problem: CF1742AA
**/
func (in *CF1742AA) Run() {
	var str strings.Builder
	for t := in.NextInt(); t > 0; t-- {
		a, b, c := in.NextInt(), in.NextInt(), in.NextInt()
		if a+b == c || a+c == b || b+c == a {
			str.WriteString("YES\n")
		} else {
			str.WriteString("NO\n")
		}
	}
	fmt.Print(str.String())
}

func NewCF1742AA(r *bufio.Reader) *CF1742AA {
	return &CF1742AA{
		sc:        r,
		split:     []string{},
		index:     0,
		separator: " ",
	}
}

func main() {
	NewCF1742AA(bufio.NewReader(os.Stdin)).Run()
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	t := 0
	fmt.Scanf("%d\n", &t)
	var str strings.Builder
	for ; t > 0; t-- {
		a, b, c := 0, 0, 0
		fmt.Scanf("%d %d %d\n", &a, &b, &c)
		if a+b == c || a+c == b || b+c == a {
			str.WriteString("YES\n")
		} else {
			str.WriteString("NO\n")
		}
	}
	fmt.Print(str.String())
}

package main

import "fmt"

func main() {
	t := 0
	fmt.Scanf("%d\n", &t)
	for ; t > 0; t-- {
		a, b, c := 0, 0, 0
		fmt.Scanf("%d %d %d\n", &a, &b, &c)
		if a+b == c || a+c == b || b+c == a {
			fmt.Println("YES")
		} else {
			fmt.Println("NO ")
		}
	}

}

package main

import "fmt"

func main() {
	var t int
	var a, b, c int

	fmt.Scan(&t)
	for i := 0; i < t; i++ {
		fmt.Scan(&a, &b, &c)

		if (a == b+c) || (b == a+c) || (c == a+b) {
			// fmt.Printf("%d %d %d\n", a, b, c)
			fmt.Println("YES")
		} else {
			// fmt.Printf("%d %d %d\n", a, b, c)
			fmt.Println("NO")
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
	"strings"
)

func main() {
	sc := bufio.NewScanner(os.Stdin)
	for sc.Scan() {
		var (
			txtArr []string
			intArr []int
		)
		txtArr = strings.Split(sc.Text(), " ")

		for _, v := range txtArr {
			int, _ := strconv.Atoi(v)
			intArr = append(intArr, int)
		}

		if len(intArr) > 2 {
			fmt.Println(sum(intArr))
		}
	}
}

func sum(arg []int) string {
	sort.Slice(arg, func(i, j int) bool {
		return arg[i] < arg[j]
	})

	if arg[0]+arg[1] == arg[2] {
		return "YES"
	}

	return "NO"
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
	"strings"
)

func main() {
	// var (
	// 	a, b, c int
	// 	arg     []int
	// )

	// fmt.Scanf("%d", &a)
	// fmt.Scanf("%d", &b)
	// fmt.Scanf("%d", &c)

	// arg = append(arg, a, b, c)

	// fmt.Println(sum(arg))

	sc := bufio.NewScanner(os.Stdin)
	for sc.Scan() {
		var (
			txtArr []string
			intArr []int
		)
		txtArr = strings.Split(sc.Text(), " ")

		for _, v := range txtArr {
			int, _ := strconv.Atoi(v)
			intArr = append(intArr, int)
		}

		// fmt.Println("\n", intArr)
		fmt.Println(sum(intArr))
	}
}

func sum(arg []int) string {
	sort.Slice(arg, func(i, j int) bool {
		return arg[i] < arg[j]
	})

	if len(arg) == 0 || len(arg) == 1 {
		return ""
	} else {
		if arg[0]+arg[1] == arg[2] {
			return "YES"
		}
	}

	return "NO"
}

package main
import(
    "fmt"
    "os"
    "bufio"
)
func main() {
	var t int
	var in = bufio.NewReader(os.Stdin)
	fmt.Fscan(in,&t)
	for i:=0;i<t;i++{
		var a,b,c int
		fmt.Fscan(in,&a,&b,&c)
		if a + b == c || a + c == b || b + c == a {
			fmt.Println("YES")
		}else {
			fmt.Println("NO")
		}
	}
}

package main

import "fmt"

func isSum(a, b, c int) bool {
	if a == b+c || b == a+c || c == a+b {
		return true
	}
	return false
}
func main() {
	var test, a, b, c int

	fmt.Scanln(&test)
	for test > 0 {
		fmt.Scanln(&a, &b, &c)
		if isSum(a,b,c) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}

		test--
	}
	return
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func sum(a int, b int, c int) string {
	if a+b == c || a+c == b || b+c == a {
		return "YES"
	}
	return "NO"
}

func main() {
	in := bufio.NewReader(os.Stdin)
	tc := readInt(in)

	for i := 0; i < tc; i++ {
		nums := readArrInt(in)
		fmt.Println(sum(nums[0], nums[1], nums[2]))
	}
}

func readInt(in *bufio.Reader) int {
	nStr, _ := in.ReadString('\n')
	nStr = strings.ReplaceAll(nStr, "\r", "")
	nStr = strings.ReplaceAll(nStr, "\n", "")
	n, _ := strconv.Atoi(nStr)
	return n
}

func readLineNumbs(in *bufio.Reader) []string {
	line, _ := in.ReadString('\n')
	line = strings.ReplaceAll(line, "\r", "")
	line = strings.ReplaceAll(line, "\n", "")
	numbs := strings.Split(line, " ")
	return numbs
}

func readArrInt(in *bufio.Reader) []int {
	numbs := readLineNumbs(in)
	arr := make([]int, len(numbs))
	for i, n := range numbs {
		val, _ := strconv.Atoi(n)
		arr[i] = val
	}
	return arr
}

package main
import "fmt"
func main(){
	var tt int

	fmt.Scan(&tt)
	for tt>0 {
		var a,b,c int

		fmt.Scan(&a)
		fmt.Scan(&b)
		fmt.Scan(&c)
		if a==b+c || b==c+a || c==a+b{
			fmt.Println("YES")
		} else{
			fmt.Println("NO")
		}
		tt--;
	}

}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
)

func main() {
	a1742(os.Stdin, os.Stdout)
}

func a1742(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var T int
	var a int
	var b int
	var c int

	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &a, &b, &c)

		if a == b+c || b == a+c || c == b+a {
			Fprintln(out, "YES")
			continue
		}

		Fprintln(out, "NO")
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

const mod = 998244353
const N = 2e5

func main() {
	sc.Buffer(make([]byte, 500000*1+1), 500000)
	sc.Split(bufio.ScanWords)

	T := nextInt()
	for T > 0 {
		T--
		a := make([]int, 3)
		a[0], a[1], a[2] = nextInt(), nextInt(), nextInt()
		sort.Slice(a, func(i, j int) bool { return a[i] < a[j] })
		// fmt.Printf("%v", a)
		if a[0]+a[1] == a[2] {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func max(args ...int) int {
	res := args[0]
	for _, v := range args {
		if v > res {
			res = v
		}
	}
	return res
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func nextString() string {
	sc.Scan()
	return sc.Text()
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	var (
		t  int
		a  int
		b  int
		c  int
		sl []string
	)
	fmt.Scanf("%d\n", &t)
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < t; i++ {
		scanner.Scan()
		sl = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(sl[0])
		b, _ = strconv.Atoi(sl[1])
		c, _ = strconv.Atoi(sl[2])
		if a == b+c {
			fmt.Println("YES")
		} else if b == a+c {
			fmt.Println("YES")
		} else if c == a+b {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	var t int
	fmt.Fscan(in, &t)
	for t > 0 {
		t--
		x := make([]int, 3)
		fmt.Fscan(in, &x[0], &x[1], &x[2])
		sort.Ints(x)
		if (x[0] + x[1]) == x[2] {
			fmt.Println("Yes")
		} else {
			fmt.Println("No")
		}
	}
}

package main

import "fmt"

func main() {
	var x, y, z, a int
	fmt.Scan(&a)
	for i := 0; i < a; i++ {
		fmt.Scan(&x, &y, &z)
		if x+y == z || x+z == y || y+z == x {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}

	}
}

package main

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

func main() {
	var in = bufio.NewReader(os.Stdin)
	var tt int

	fmt.Fscan(in,&tt)

	for i:=0; i<tt; i++{
		var a, b, c int
		fmt.Fscan(in, &a, &b, &c)

		if a + b == c || a + c == b || b + c == a {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"sort"
)

var (
	t int
	a []int
)

func solve() bool {

	sort.Slice(a, func(i, j int) bool { return a[i] < a[j] })
	if a[0]+a[1] == a[2] {
		return true
	}
	return false
}

func main() {
	fmt.Scanf("%d", &t)
	a = make([]int, 3)
	for ; t != 0; t-- {
		fmt.Scan(&a[0], &a[1], &a[2])
		flag := solve()
		if flag {
			fmt.Println("Yes")
		} else {
			fmt.Println("No")
		}
	}
}

package main

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

var (
	reader = bufio.NewReader(os.Stdin)
	writer = bufio.NewWriter(os.Stdout)
)

func readInt() int {
	var i int
	fmt.Fscan(reader, &i)
	return i
}

func readString() string {
	var s string
	fmt.Fscan(reader, &s)
	return s
}

func main(){
	T := readInt()
	defer writer.Flush()
	for i := 1; i <= T; i++{
		a, b, c := readInt(), readInt(), readInt()
		tot := a + b + c
		res := "NO"
		if (tot == 2 * a) || (tot == 2 * b) || (tot == 2 * c) {
			res = "YES"
		}
		fmt.Fprintln(writer, res)
	}
}

package main

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

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

	// define testcases variable
	var testcases int
	fmt.Fscan(r, &testcases)

	for testcases > 0 {
		testcases -= 1
		var n int = 3
		var arr = make([]int, n)

		for i := 0; i < n; i++ {
			fmt.Fscan(r, &arr[i])
		}

		sort.Ints(arr)
		if arr[0]+arr[1] == arr[2] {
			fmt.Fprintln(w, "YES")
		} else {
			fmt.Fprintln(w, "NO")
		}

	}

}

package main

import "fmt"

func main() {
	var t int
	var a, b, c int
	fmt.Scanf("%d\n", &t)

	for ; t > 0; t-- {
		fmt.Scanf("%d %d %d\n", &a, &b, &c)
		if (a+b) == c || (a+c) == b || (b+c) == a {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")

		}

	}

}

package main

import (
	"fmt"
)

func main() {
	var T int
	fmt.Scan(&T)
	for Case := 1; Case <= T; Case++ {
		var a, b, c int
		fmt.Scan(&a, &b, &c)
		if a == b + c || b == a + c || c == a + b {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

func main() {
	defer writer.Flush()
	var t int
	scanws(&t)
	for t > 0 {
		solve()
		t--
	}
}

func solve() {
	var a, b, c int
	var ab, bc, ac int
	scanws(&a, &b, &c)
	ab, bc, ac = (a+b),(b+c),(a+c)
	switch {
	case ab==c || bc==a || ac==b:
		printf("YES\n")
	default:
		printf("NO\n")
	}
}

var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)
func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanws(a ...interface{}) { fmt.Fscan(reader, a...) }

package main

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

var in = bufio.NewReader(os.Stdin)

func  gcd(a, b int) int {
  for b != 0 {
      a, b = b, a%b
  }
  return a
}

func main() {
	var t int
	fmt.Fscan(in, &t)

	for ; t > 0; t-- {
		var a, b, c int
    fmt.Fscan(in, &a, &b, &c)
    switch {
      case a+b == c:
        fmt.Println("YES")
        break;
      case c+b == a:
        fmt.Println("YES")
        break;
      case a+c == b:
        fmt.Println("YES")
        break;
      default:
        fmt.Println("NO")
        break;
    }
	}
}

package main

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

var (
	reader     = bufio.NewReader(os.Stdin)
	t, a, b, c int
)

func solve(a, b, c int) string {
	if a == b+c || b == a+c || c == a+b {
		return "YES"
	}
	return "NO"
}

func main() {
	fmt.Fscan(reader, &t)
	for ; t > 0; t-- {
		fmt.Fscan(reader, &a, &b, &c)
		fmt.Println(solve(a, b, c))
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

const cf = true

func solve() {
	var a, b, c int
	fmt.Fscan(in, &a, &b, &c)
	if a == b+c || b == a+c || c == a+b {
		fmt.Fprintln(out, "YES")
	} else {
		fmt.Fprintln(out, "NO")
	}
}

func main() {
	defer out.Flush()
	t := 1
	fmt.Fscan(in, &t)
	for ; t > 0; t-- {
		solve()
	}
}

type SqrtInt interface {
	SignedSqrt | UnsignedSqrt
}

type SignedSqrt interface {
	~int | ~int32 | ~int64
}

type UnsignedSqrt interface {
	~uint | ~uint32 | ~uint64 | ~uintptr
}

func sqrt[T SqrtInt](x T) T {
	l, r := T(0), T(2000000123)
	for l < r {
		mid := (l + r) / 2
		if mid*mid > x {
			r = mid
		} else {
			l = mid + 1
		}
	}
	return l - 1
}

func ConvertInt(val string, base, toBase int) (string, error) {
	i, err := strconv.ParseInt(val, base, 64)
	if err != nil {
		return "", err
	}
	return strconv.FormatInt(i, toBase), nil
}

type set[T Ordered] struct {
	itms map[T]struct{}
}

func (s *set[T]) init() {
	if s.itms == nil {
		s.itms = make(map[T]struct{})
	}
}

func (s *set[T]) add(item T) *set[T] {
	s.init()
	s.itms[item] = exists
	return s
}

func (s *set[T]) remove(item T) *set[T] {
	s.init()
	delete(s.itms, item)
	return s
}

func (s *set[T]) has(item T) bool {
	s.init()
	_, c := s.itms[item]
	return c
}

func (s *set[T]) sortedItems() []T {
	s.init()
	items := make([]T, 0, s.size())
	for item := range s.itms {
		items = append(items, item)
	}
	sort.Slice(items, func(i, j int) bool {
		return items[i] < items[j]
	})
	return items
}

func (s *set[T]) items() []T {
	s.init()
	items := make([]T, 0, s.size())
	for item := range s.itms {
		items = append(items, item)
	}
	return items
}

func (s *set[T]) size() int {
	s.init()
	return len(s.itms)
}

var exists = struct{}{}

const MaxUint = ^uint(0)
const MinUint = 0
const MaxInt = int(MaxUint >> 1)
const MinInt = -MaxInt - 1

func reverseStr(s string) string {
	r := []byte(s)
	for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 {
		r[i], r[j] = r[j], r[i]
	}
	return string(r)
}

type Float interface {
	~float32 | ~float64
}

type Integer interface {
	Signed | Unsigned
}

type Signed interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64
}

type Unsigned interface {
	~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
}

type Ordered interface {
	Integer | Float | ~string
}

func abs[T Signed](x T) T {
	if x < 0 {
		return -x
	}
	return x
}

func min[T Ordered](x, y T) T {
	if x < y {
		return x
	}
	return y
}

func max[T Ordered](x, y T) T {
	if x > y {
		return x
	}
	return y
}

var (
	in  = getReader()
	out = getWriter()
)

func getReader() *bufio.Reader {
	if cf {
		return bufio.NewReader(os.Stdin)
	} else {
		in, _ := os.Open("input.txt")
		return bufio.NewReader(in)
	}
}

func getWriter() *bufio.Writer {
	if cf {
		return bufio.NewWriter(os.Stdout)
	} else {
		out, _ := os.Create("output.txt")
		return bufio.NewWriter(out)
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var s string
	fmt.Scanln(&s)
	count, _ := strconv.Atoi(s)
	answers := make([]string, 0, count)
	for i := 0; i < count ; i++ {
		scanner.Scan()
		line := scanner.Text()
		numString := strings.Split(line, " ")
		nums := make([]int, 0, 3)
		for _, num := range numString {
			digit, _ := strconv.Atoi(num)
			nums = append(nums, digit)
		}

		maxIndex := 0
		maxVal := -1
		for i, n := range nums {
			if n > maxVal {
				maxIndex = i
				maxVal = n
			}
		}
		if maxIndex == 0 {
			if nums[1] + nums[2] == nums[0] {
				answers = append(answers, "YES")
			} else {
				answers = append(answers, "NO")
			}
		} else if maxIndex == 1 {
			if nums[0] + nums[2] == nums[1] {
				answers = append(answers, "YES")
			} else {
				answers = append(answers, "NO")
			}
		} else {
			if nums[0] + nums[1] == nums[2] {
				answers = append(answers, "YES")
			} else {
				answers = append(answers, "NO")
			}
		}
	}
	for _, s := range answers {
		fmt.Println(s)
	}
}

package main

import (
	"fmt"
)

func main() {
	var num int
	fmt.Scan(&num)
	for i := 0; i < num; i++ {

		var numArr []int
		for i := 0; i < 3; i++ {
			var num2 int
			fmt.Scan(&num2)
			numArr = append(numArr, num2)
		}
		var res string
		res = first(numArr)
		fmt.Println(res)
	}

}

func first(arr []int) string {
	if (arr[0]+arr[1] == arr[2]) || (arr[0]+arr[2] == arr[1]) || arr[1]+arr[2] == arr[0] {
		return "yes"
	} else {
		return "no"
	}
}

package main

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

func main() {
	var tc int

	r_ := bufio.NewReader(os.Stdin)
	w_ := bufio.NewWriter(os.Stdout)

	defer w_.Flush()

	fmt.Fscan(r_, &tc)

	for t := 0; t < tc; t++ {
		var a, b, c int

		fmt.Fscan(r_, &a, &b, &c)

		ans := "NO"

		if a == b+c {
			ans = "YES"
		}
		if b == a+c {
			ans = "YES"
		}
		if c == b+a {
			ans = "YES"
		}

		fmt.Fprintln(w_, ans)
	}
}

package main

import (
	"fmt"
)

func main() {
	var count int
	var a, b, c int
	fmt.Scan(&count)
	for i := 0; i < count; i++ {
		fmt.Scan(&a, &b, &c)
		if a+b == c || b+c == a || c+a == b {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}

}

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	reader := bufio.NewReader(os.Stdin)
	text, _ := reader.ReadString('\n')
	text = strings.Replace(text, "\r\n", "", -1)
	t := 0
	t, _ = strconv.Atoi(text)
	for i := 0; i < t; i++ {
		raw, _ := reader.ReadString('\n')
		raw = strings.Replace(raw, "\r\n", "", -1)
		split := strings.Split(raw, " ")
		n1, _ := strconv.Atoi(split[0])
		n2, _ := strconv.Atoi(split[1])
		n3, _ := strconv.Atoi(split[2])
		if n1 == n2+n3 || n2 == n1+n3 || n3 == n1+n2 {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

var (
	reader = bufio.NewReader(os.Stdin)
	writer = bufio.NewWriter(os.Stdout)
)

func check(a, b, c int) bool {
	return a+b == c || b+c == a || c+a == b
}

func main() {
	writer.Flush()

	var test int
	var a, b, c int
	fmt.Fscanf(reader, "%d\n", &test)
	for test > 0 {
		fmt.Fscanf(reader, "%d %d %d\n", &a, &b, &c)
		if check(a, b, c) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		test--
	}
}

package main

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

func main() {
	var tc int

	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)

	defer writer.Flush()

	fmt.Fscan(reader, &tc)

	for t := 0; t < tc; t++ {
		var a, b, c int

		fmt.Fscan(reader, &a, &b, &c)

		o := solve(a, b, c)

		fmt.Fprintln(writer, o)
	}
}

func solve(a, b, c int) string {
	ans := "NO"

	if a == b+c {
		ans = "YES"
	}
	if b == a+c {
		ans = "YES"
	}
	if c == b+a {
		ans = "YES"
	}
	return ans
}

package main

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

func check(a, b, c int) int {
	if a+b == c || a+c == b || b+c == a {
		return 1
	}
	return 0
}

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var a, b, c, data int

	fmt.Fscan(in, &data)
	for i := 0; i < data; i++ {
		fmt.Fscan(in, &a, &b, &c)
		rez := check(a, b, c)
		if rez == 1 {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}

}

package main

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

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

	var T int
	for fmt.Fscan(r, &T); T > 0; T-- {

		a := make([]int, 3)
		fmt.Fscan(r, &a[0], &a[1], &a[2])
		sum := a[0] + a[1] + a[2]
		res := "NO"

		for _, v := range a {
			if 2*v == sum {
				res = "YES"
				break
			}
		}

		fmt.Fprintln(w, res)
	}

}

package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"sort"
)

type IO struct {
	in  io.Reader
	out io.Writer
}

func NewIO(in io.Reader, out io.Writer) *IO {
	return &IO{in: bufio.NewReader(in), out: out}
}

func (io *IO) ReadInt() int {
	var res int
	_, _ = fmt.Fscanf(io.in, "%d\n", &res)
	return res
}

func (io *IO) ReadPairInt() (int, int) {
	var a, b int
	_, _ = fmt.Fscanf(io.in, "%d %d\n", &a, &b)
	return a, b
}

func (io *IO) ReadString() string {
	var res string
	_, _ = fmt.Fscanf(io.in, "%s\n", &res)
	return res
}

func (io *IO) ReadIntSlice(n int) sort.IntSlice {
	var t int
	res := make(sort.IntSlice, 0, n)
	for i := 0; i < n; i++ {
		_, _ = fmt.Fscanf(io.in, "%d", &t)
		res = append(res, t)
	}
	_, _ = fmt.Fscanf(io.in, "\n")
	return res
}

func (io *IO) Println(v ...interface{}) {
	_, _ = fmt.Fprintln(io.out, v...)
}

func (io *IO) Print(v ...interface{}) {
	_, _ = fmt.Fprint(io.out, v...)
}

func (io *IO) Printf(format string, v ...interface{}) {
	_, _ = fmt.Fprintf(io.out, format, v...)
}

func (io *IO) PrintIntSlice(s sort.IntSlice) {
	for _, v := range s {
		io.Printf("%d ", v)
	}
}

func (io *IO) PrintlnIntSlice(s sort.IntSlice) {
	io.PrintIntSlice(s)
	io.Printf("\n")
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func abs(v int) int {
	if v < 0 {
		return -v
	}
	return v
}

func main() {
	io := NewIO(os.Stdin, os.Stdout)

	n := io.ReadInt()
	for i := 0; i < n; i++ {
		a := io.ReadIntSlice(3)
		sort.Ints(a)
		if a[0]+a[1] == a[2] {
			io.Println("YES")
		} else {
			io.Println("NO")
		}
	}
}

package main

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

func CF1742A(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var T, a, b, c int
	for fmt.Fscan(in, &T); T > 0; T-- {
		fmt.Fscan(in, &a, &b, &c)
		if a+b == c || a+c == b || b+c == a {
			fmt.Fprintln(out, "YES")
		} else {
			fmt.Fprintln(out, "NO")
		}
	}
}

func main() {
	CF1742A(os.Stdin, os.Stdout)
}

package main

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

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

	var T int
	fmt.Fscan(in, &T)
	for t := 0; t < T; t++ {
		var a, b, c int
		fmt.Fscan(in, &a, &b, &c)

		if a+b == c || a+c == b || b+c == a {
			fmt.Fprintln(out, "YES")
		} else {
			fmt.Fprintln(out, "NO")
		}
	}
}

package main

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

var in, out = bufio.NewReader(os.Stdin), bufio.NewWriter(os.Stdout)

func solve() {
	a, b, c := _readInt(), _readInt(), _readInt()
	if a+b == c || a+c == b || b+c == a {
		_print("YES")
	} else {
		_print("NO")
	}

}

func main() {
	defer out.Flush()
	var t int
	for fmt.Fscanln(in, &t); t > 0; t-- {
		solve()
	}
}

// ====
func _readInt() int {
	var x int
	fmt.Fscan(in, &x)
	return x
}
func _readStr() string {
	var x string
	fmt.Fscan(in, &x)
	return x
}
func _readArr() (int, []int) {
	var n int
	fmt.Fscan(in, &n)
	var v = make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Fscan(in, &v[i])
	}
	return n, v
}
func _print(x ...any) {
	fmt.Fprintln(out, x...)
}
func _max(x, y int) int {
	if x > y {
		return x
	}
	return y
}
func _min(x, y int) int {
	if x < y {
		return x
	}
	return y
}
func _abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}
func _sortStr(x string) string {
	r := []rune(x)
	sort.Slice(r, func(i, j int) bool {
		return r[i] < r[j]
	})
	return string(r)
}
func _reverseInts(x []int) {
	n := len(x)
	for i := 0; i < n/2; i++ {
		x[i], x[n-1-i] = x[n-1-i], x[i]
	}
}
func _reverseStr(s string) string {
	x := []rune(s)
	n := len(x)
	for i := 0; i < n/2; i++ {
		x[i], x[n-1-i] = x[n-1-i], x[i]
	}
	return string(x)
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"io/ioutil"
	"os"
	"strings"
)

// https://space.bilibili.com/206214
func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	solve := func(curCase int) bool {
		var a,b,c int
		Fscan(in, &a, &b, &c)
		return a+c==b || a+b==c || b+c==a

	}

	cases := 1
	Fscan(in, &cases)
	for curCase := 1; curCase <= cases; curCase++ {
		if solve(curCase) {
			Fprintln(out, "YES")
		} else {
			Fprintln(out, "NO")
		}
	}

	// 如果是多组数据，请务必加上这段保险 —— 已经无法统计，有多少位竞赛选手在漏读数据上损失大把分数（包括我）
	// 此外，如果不小心写成了 scan(v) 而不是 scan(&v)，由于未传入指针，不会读入任何数据，这样本地运行一次就能立马发现错误
	leftData, _ := ioutil.ReadAll(in)
	if s := strings.TrimSpace(string(leftData)); s != "" {
		panic("有未读入的数据：\n" + s)
	}

}

func main() { run(os.Stdin, os.Stdout) }

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	/*
		t := 0
		fmt.Scanf("%d\n", &t)
		var str strings.Builder
		for ; t > 0; t-- {
			a, b, c := 0, 0, 0
			fmt.Scanf("%d %d %d\n", &a, &b, &c)
			if a+b == c || a+c == b || b+c == a {
				str.WriteString("YES\n")
			} else {
				str.WriteString("NO\n")
			}
		}
		fmt.Print(str.String())

	*/
	solve()
}

func solve() {
	sc := bufio.NewReader(os.Stdin)
	line, _ := sc.ReadString('\n')
	t, _ := strconv.Atoi(line)
	var str strings.Builder
	for ; t > 0; t-- {
		line, _ = sc.ReadString('\n')
		aux := strings.Split(line, " ")
		a, _ := strconv.Atoi(aux[0])
		b, _ := strconv.Atoi(aux[1])
		c, _ := strconv.Atoi(aux[2])
		if a+b == c || a+c == b || b+c == a {
			str.WriteString("YES\n")
		} else {
			str.WriteString("NO\n")
		}

	}
	fmt.Print(str.String())
}

package main

import "fmt"

func main() {
	t := 0
	fmt.Scanf("%d", &t)

	for ; t > 0; t-- {
		a, b, c := 0, 0, 0
		fmt.Scanf("%d %d %d", &a, &b, &c)
		if a+b == c || b+c == a || a+c == b {
			fmt.Println("YES")
		} else {
			fmt.Println("NO ")
		}
	}

}

package main

import "fmt"

func main() {
	var t int
	var a, b, c int

	fmt.Scanf("%d", &t)
	for i := 0; i < t; i++ {
		fmt.Scanf("%d %d %d", &a, &b, &c)

		if (a == b+c) || (b == a+c) || (c == a+b) {
			fmt.Printf("%d %d %d\n", a, b, c)
			// fmt.Println("YES")
		} else {
			fmt.Printf("%d %d %d\n", a, b, c)
			// fmt.Println("NO")
		}
	}
}

package main

import "fmt"

func main() {
	var t int
	var a, b, c int

	fmt.Scanf("%d", &t)
	for i := 0; i < t; i++ {
		fmt.Scanf("%d %d %d", &a, &b, &c)

		if (a == b+c) || (b == a+c) || (c == a+b) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import "fmt"

func main() {
	var t int
	var a, b, c int

	fmt.Scan(t)

	for i := 0; i < t; i++ {
		fmt.Scan(a)
		fmt.Scan(b)
		fmt.Scan(c)

		if (a == b+c) || (b == a+c) || (c == a+b) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

func main() {
	// var (
	// 	a, b, c int
	// 	arg     []int
	// )

	// fmt.Scanf("%d", &a)
	// fmt.Scanf("%d", &b)
	// fmt.Scanf("%d", &c)

	// arg = append(arg, a, b, c)

	// fmt.Println(sum(arg))

	sc := bufio.NewScanner(os.Stdin)
	for sc.Scan() {
		txt := sc.Text()
		fmt.Printf("Эхо: %s\n", txt)
	}
}

func sum(arg []int) string {
	sort.Slice(arg, func(i, j int) bool {
		return arg[i] < arg[j]
	})

	if len(arg) == 0 {
		return "YES"
	} else {
		if arg[0]+arg[1] == arg[2] {
			return "YES"
		}
	}

	return "NO"
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var (
		a, b, c int
		arg     []int
	)

	fmt.Scanf("%d", &a)
	fmt.Scanf("%d", &b)
	fmt.Scanf("%d", &c)

	arg = append(arg, a, b, c)

	fmt.Println(sum(arg))
}

func sum(arg []int) string {
	sort.Slice(arg, func(i, j int) bool {
		return arg[i] < arg[j]
	})

	if len(arg) == 0 {
		return "YES"
	} else {
		if arg[0]+arg[1] == arg[2] {
			return "YES"
		}
	}

	return "NO"
}

package main

import "fmt"

func isSum(a, b, c int) bool {
	if a == b+c || b == a+c || c == a+b {
		return true
	}
	return false
}

func main() {
	var test, a, b, c int

	fmt.Scanln(&test)
	for test > 0 {
		fmt.Scanln(&a, &b, &c)
		fmt.Println(isSum(a,b,c))
		test--
	}
	return
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
)

func main() {
	a1742(os.Stdin, os.Stdout)
}

func a1742(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var T int
	var a int
	var b int
	var c int

	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &a, &b, &c)

		if a == b+c || b == a+c || c == b+a {
			Fprintln(out, "YES")

		}

		Fprintln(out, "NO")
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

const mod = 998244353
const N = 2e5

func main() {
	sc.Buffer(make([]byte, 500000*1+1), 500000)
	sc.Split(bufio.ScanWords)

	T := nextInt()
	for T > 0 {
		T--
		a := make([]int, 3)
		a[0], a[1], a[2] = nextInt(), nextInt(), nextInt()
		sort.Slice(a, func(i, j int) bool { return i < j })
		if a[0]+a[1] == a[2] {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func max(args ...int) int {
	res := args[0]
	for _, v := range args {
		if v > res {
			res = v
		}
	}
	return res
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func nextString() string {
	sc.Scan()
	return sc.Text()
}


Alperen has two strings, $$$s$$$ and $$$t$$$ which are both initially equal to "a". He will perform $$$q$$$ operations of two types on the given strings:  $$$1 \;\; k \;\; x$$$ — Append the string $$$x$$$ exactly $$$k$$$ times at the end of string $$$s$$$. In other words, $$$s := s + \underbrace{x + \dots + x}_{k \text{ times}}$$$.  $$$2 \;\; k \;\; x$$$ — Append the string $$$x$$$ exactly $$$k$$$ times at the end of string $$$t$$$. In other words, $$$t := t + \underbrace{x + \dots + x}_{k \text{ times}}$$$. After each operation, determine if it is possible to rearrange the characters of $$$s$$$ and $$$t$$$ such that $$$s$$$ is lexicographically smaller$$$^{\dagger}$$$ than $$$t$$$.Note that the strings change after performing each operation and don't go back to their initial states.$$$^{\dagger}$$$ Simply speaking, the lexicographical order is the order in which words are listed in a dictionary. A formal definition is as follows: string $$$p$$$ is lexicographically smaller than string $$$q$$$ if there exists a position $$$i$$$ such that $$$p_i < q_i$$$, and for all $$$j < i$$$, $$$p_j = q_j$$$. If no such $$$i$$$ exists, then $$$p$$$ is lexicographically smaller than $$$q$$$ if the length of $$$p$$$ is less than the length of $$$q$$$. For example, $$$\texttt{abdc} < \texttt{abe}$$$ and $$$\texttt{abc} < \texttt{abcd}$$$, where we write $$$p < q$$$ if $$$p$$$ is lexicographically smaller than $$$q$$$.

The first line of the input contains an integer $$$t$$$ ($$$1 \leq t \leq 10^4$$$) — the number of test cases. The first line of each test case contains an integer $$$q$$$ $$$(1 \leq q \leq 10^5)$$$ — the number of operations Alperen will perform. Then $$$q$$$ lines follow, each containing two positive integers $$$d$$$ and $$$k$$$ ($$$1 \leq d \leq 2$$$; $$$1 \leq k \leq 10^5$$$) and a non-empty string $$$x$$$ consisting of lowercase English letters — the type of the operation, the number of times we will append string $$$x$$$ and the string we need to append respectively. It is guaranteed that the sum of $$$q$$$ over all test cases doesn't exceed $$$10^5$$$ and that the sum of lengths of all strings $$$x$$$ in the input doesn't exceed $$$5 \cdot 10^5$$$.

For each operation, output "YES", if it is possible to arrange the elements in both strings in such a way that $$$s$$$ is lexicographically smaller than $$$t$$$ and "NO" otherwise.

3

5

2 1 aa

1 2 a

2 3 a

1 2 b

2 3 abca

2

1 5 mihai

2 2 buiucani

3

1 5 b

2 3 a

2 4 paiu

NoteIn the first test case, the strings are initially $$$s = $$$ "a" and $$$t = $$$ "a". After the first operation the string $$$t$$$ becomes "aaa". Since "a" is already lexicographically smaller than "aaa", the answer for this operation should be "YES".After the second operation string $$$s$$$ becomes "aaa", and since $$$t$$$ is also equal to "aaa", we can't arrange $$$s$$$ in any way such that it is lexicographically smaller than $$$t$$$, so the answer is "NO".After the third operation string $$$t$$$ becomes "aaaaaa" and $$$s$$$ is already lexicographically smaller than it so the answer is "YES".After the fourth operation $$$s$$$ becomes "aaabb" and there is no way to make it lexicographically smaller than "aaaaaa" so the answer is "NO".After the fifth operation the string $$$t$$$ becomes "aaaaaaabcaabcaabca", and we can rearrange the strings to: "bbaaa" and "caaaaaabcaabcaabaa" so that $$$s$$$ is lexicographically smaller than $$$t$$$, so we should answer "YES".

package main

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

func upd(m []int, k int, s string) {
	for _, v := range s {
		m[int(v)-int('a')] += k
	}
}

func check(m1, m2 []int) string {
	var l1, l2, l3 int
	for l2 = 25; l2 >= 0; l2-- {
		if m2[l2] > 0 { break }
	}
	for l3 = 25; l3 >= 0; l3-- {
		if m1[l3] > 0 { break }
	}
	for l1 = 0; l2 < 26; l1++ {
		if m1[l1] > 0 { break }
	}
	if l1 > l2 || (l1 == l2 && m1[l1] >= m2[l2]) || (l1 == l2 && m1[l1] < m2[l2] && l1 != l3) {
		return "NO"
	}
	return "YES"
}

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

	var T int
	for fmt.Fscan(r, &T); T > 0; T-- {

		var q int
		fmt.Fscan(r, &q)
		m1 := make([]int, 26)
		m2 := make([]int, 26)
		m1[0] = 1
		m2[0] = 1

		for i := 0; i < q; i++ {
			var d, k int
			var str string
			fmt.Fscan(r, &d, &k, &str)

			if d == 1 {
				upd(m1, k, str)
			} else {
				upd(m2, k, str)
			}

			fmt.Fprintln(w, check(m1, m2))
		}
	}
}

package main

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

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

	var T int
	fmt.Fscan(in, &T)
	for t := 0; t < T; t++ {
		var n int
		fmt.Fscan(in, &n)

		aa := make([]int, 26)
		bb := make([]int, 26)
		aa[0], bb[0] = 1, 1

	Loop:
		for i := 0; i < n; i++ {
			var d, k int
			var s string
			fmt.Fscan(in, &d, &k, &s)
			for _, ch := range s {
				if d == 1 {
					aa[ch-'a'] += k
				} else {
					bb[ch-'a'] += k
				}
			}
			for j := 25; j > 0; j-- {
				if bb[j] > 0 {
					fmt.Fprintln(out, "YES")
					continue Loop
				}
			}

			for j := 1; j < 26; j++ {
				if aa[j] > 0 {
					fmt.Fprintln(out, "NO")
					continue Loop
				}
			}
			if aa[0] < bb[0] {
				fmt.Fprintln(out, "YES")
			} else {
				fmt.Fprintln(out, "NO")
			}
		}

	}
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
	"strings"
)

// https://space.bilibili.com/206214
func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var T, n, d, k int
	var s string
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n)
		cntA := [2]int64{}
		hasOther := [2]bool{}
		for i := 0; i < n; i++ {
			Fscan(in, &d, &k, &s)
			d--
			a := strings.Count(s, "a")
			if !hasOther[d] && a < len(s) {
				hasOther[d] = true
			}
			cntA[d] += int64(a) * int64(k)
			if hasOther[1] || !hasOther[0] && cntA[0] < cntA[1] {
				Fprintln(out, "YES")
			} else {
				Fprintln(out, "NO")
			}
		}
	}
}

func main() { run(os.Stdin, os.Stdout) }

package main

import (
	"bufio"
	. "fmt"
	"io"
	"io/ioutil"
	"os"
	"strings"
)

// https://space.bilibili.com/206214
func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	solve := func(curCase int) {
		var n int
		Fscan(in, &n)
		c := [2][26]int64{}
		other := [2]bool{}
		for i := 0; i < n; i++ {
			var op, k int
			var s string
			Fscan(in, &op, &k, &s)
			op--
			if !other[op] {
				other[op] = strings.Count(s, "a") != len(s)
			}
			for _, b := range s {
				b -= 'a'
				c[op][b] += int64(k)
			}

			if other[1] {
				Fprintln(out, "YES")
				continue
			}
			if !other[0] && c[0][0] < c[1][0] {
				Fprintln(out, "YES")
				continue
			}
			Fprintln(out, "NO")
		}
	}

	cases := 1
	Fscan(in, &cases)
	for curCase := 1; curCase <= cases; curCase++ {
		solve(curCase)
	}

	// 如果是多组数据，请务必加上这段保险 —— 已经无法统计，有多少位竞赛选手在漏读数据上损失大把分数（包括我）
	// 此外，如果不小心写成了 scan(v) 而不是 scan(&v)，由于未传入指针，不会读入任何数据，这样本地运行一次就能立马发现错误
	leftData, _ := ioutil.ReadAll(in)
	if s := strings.TrimSpace(string(leftData)); s != "" {
		panic("有未读入的数据：\n" + s)
	}

}

func main() { run(os.Stdin, os.Stdout) }

package main

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

func gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}

func max(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func main() {
	var t, n, d, k int
	var x string
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &n)
		s := make([]int, 26)
		y := make([]int, 26)
		for j := 0; j < n; j++ {
			fmt.Fscan(in, &d, &k, &x)
			if d == 1 {
				for _, v := range x {
					s[v-'a'] += k
				}
			} else {
				for _, v := range x {
					y[v-'a'] += k
				}
			}
			f := false
			pd := false
			for l := 1; l < 26; l++ {
				if y[l] > 0 {
					f = true
					break
				}
				if s[l] > 0 {
					pd = true
				}
			}
			if f || (!pd && s[0] < y[0]) {
				fmt.Println("YES")
			} else {
				fmt.Println("NO")
			}
		}

	}
}

package main

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

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

	var T, n, d, k int
	var s string
	for fmt.Fscan(in, &T); T > 0; T-- {
		fmt.Fscan(in, &n)
		count := [2]int64{}
		hasOther := [2]bool{}
		for i := 0; i < n; i++ {
			fmt.Fscan(in, &d, &k, &s)
			d--
			a := strings.Count(s, "a")
			if !hasOther[d] && a < len(s) {
				hasOther[d] = true
			}
			count[d] += int64(a) * int64(k)
			if hasOther[1] || !hasOther[0] && count[0] < count[1] {
				fmt.Fprintln(out, "YES")
			} else {
				fmt.Fprintln(out, "NO")
			}
		}
	}
}

package main

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

var (
	reader = bufio.NewReader(os.Stdin)
	writer = bufio.NewWriter(os.Stdout)
)

func readInt() int {
	var i int
	fmt.Fscan(reader, &i)
	return i
}

func readString() string {
	var s string
	fmt.Fscan(reader, &s)
	return s
}

func main(){
	defer writer.Flush()
	T := readInt()
	cnt1 := make([]int64, 26)
	cnt2 := make([]int64, 26)
	for i := 1; i <= T; i++{
		for c := 0; c < 26; c++ {
			cnt1[c] = 0
			cnt2[c] = 0
		}
		cnt1[0] = 1
		cnt2[0] = 1
		q := readInt()
		for ;q > 0; q-- {
			d, k := readInt(), int64(readInt())
			x := readString()
			if d == 1 {
				for i := 0; i < len(x); i++ {
					cnt1[x[i] - 'a'] += k
				}
			} else{
				for i := 0; i < len(x); i++ {
					cnt2[x[i] - 'a'] += k
				}
			}
			can := false
			for c2 := 1; c2 < 26; c2++ {
				if cnt2[c2] > 0 {
					can = true
				}
			}
			if can {
				fmt.Fprintln(writer, "YES")
				continue
			}
			can = true
			for c1 := 1; c1 < 26; c1++ {
				if cnt1[c1] > 0 {
					can = false
					break
				}
			}
			can = can && (cnt1[0] < cnt2[0])
			if can {
				fmt.Fprintln(writer, "YES")
			} else {
				fmt.Fprintln(writer, "NO")
			}
		}
	}
}

package main

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

const mod = 998244353
const mx = int64(1e9 + 7)

func solve(in *bufio.Reader, out *bufio.Writer) {
	defer out.Flush()
	var n int
	Fscan(in, &n)
	a1JustA := true
	a2JustA := true
	a1 := 0
	a2 := 0
	for x := 0; x < n; x++ {
		var tpe, cnt int
		var str string
		Fscan(in, &tpe, &cnt, &str)
		for i := 0; i < len(str); i++ {
			if tpe == 1 {
				if str[i] != 'a' {
					a1JustA = false
				}
				a1 += cnt
			} else {
				if str[i] != 'a' {
					a2JustA = false
				}
				a2 += cnt
			}
		}
		if !a2JustA {
			Fprintln(out, "Yes")
		} else if a1JustA && a1 < a2 {
			Fprintln(out, "Yes")
		} else {
			Fprintln(out, "No")
		}
	}
}

func abs(a int64) int64 {
	if a > 0 {
		return a
	}
	return -a
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}
func min(a, b int) int {
	if a > b {
		return b
	}
	return a
}
func gcd(a, b int) int {
	if a%b == 0 {
		return b
	}
	return gcd(b, a%b)
}

func main() {
	stdin := os.Stdin
	stdout := os.Stdout
	in := bufio.NewReader(stdin)
	out := bufio.NewWriter(stdout)
	n := 1
	Fscan(in, &n)
	for i := 0; i < n; i++ {
		solve(in, out)
	}
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
)

func max(a, b int64) int64 {
	if a > b {
		return a
	}
	return a
}
func min(a, b int64) int64 {
	if a > b {
		return b
	}
	return a
}

func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()
	var T int
	Fscan(in, &T)
	for Case := 1; Case <= T; Case++ {
		var n int
		Fscan(in, &n)
		var cnts, cntt = [26]int64{}, [26]int64{}
		cnts[0] = 1
		cntt[0] = 1
		for i := 0; i < n; i++ {
			var d, val int64
			var s string
			Fscan(in, &d, &val, &s)
			if d == 1 {
				for k := 0; k < len(s); k++ {
					cnts[s[k] - 'a'] += val
				}
			} else {
				for k := 0; k < len(s); k++ {
					cntt[s[k] - 'a'] += val
				}
			}
			var minsp, mintp, maxsp, maxtp int64 = 27, 27, -1, -1
			var k int64
			for k = 0; k < 26; k++ {
				if cnts[k] > 0 {
					minsp = min(k, minsp)
					maxsp = max(k, maxsp)
				}
				if cntt[k] > 0 {
					mintp = min(k, mintp)
					maxtp = max(k, maxtp)
				}
			}
			if minsp < maxtp {
				Fprintln(out, "YES")
				continue
			}
			if minsp > maxtp {
				Fprintln(out, "NO")
				continue
			}
			if cnts[minsp] < cntt[maxtp] && maxsp == minsp {
				Fprintln(out, "YES")
				continue
			}
			Fprintln(out, "NO")
		}
	}
}

func main() {
	run(os.Stdin, os.Stdout)
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
)

func main() {
	f1742(os.Stdin, os.Stdout)
}

func f1742(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var T int
	var n int
	var s string
	var xi int
	var x int

	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n)

		a, b := [26]int{}, [26]int{}
		a[0], b[0] = 1, 1
		sa := 1
		sb := 1

	loop:
		for i := 0; i < n; i++ {
			Fscan(in, &xi, &x)
			Fscan(in, &s)
			if xi == 1 {
				for _, v := range s {
					a[v-'a'] += x
					sa += x
				}
			}
			if xi == 2 {
				for _, v := range s {
					b[v-'a'] += x
					sb += x
				}
			}
			//Fprintln(out, a, b)

			c := 0
			for ; c < 26; c++ {
				if a[c] > 0 {
					// g
					for d := c + 1; d < 26; d++ {
						if b[d] > 0 {
							Fprintln(out, "YES")
							continue loop
						}
					}
					if sb == b[c] && b[c] == a[c] {
						Fprintln(out, "NO")
						continue loop
					}
					if a[c] == sa && a[c] <= b[c] {
						Fprintln(out, "YES")
						continue loop
					}
				}
			}

			Fprintln(out, "NO")
		}

	}
}

package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"sort"
)

type IO struct {
	in  io.Reader
	out io.Writer
}

func NewIO(in io.Reader, out io.Writer) *IO {
	return &IO{in: bufio.NewReader(in), out: out}
}

func (io *IO) ReadInt() int {
	var res int
	_, _ = fmt.Fscanf(io.in, "%d\n", &res)
	return res
}

func (io *IO) ReadPairInt() (int, int) {
	var a, b int
	_, _ = fmt.Fscanf(io.in, "%d %d\n", &a, &b)
	return a, b
}

func (io *IO) ReadTwoDigitsAndString() (int, int, string) {
	var a, b int
	var res string
	_, _ = fmt.Fscanf(io.in, "%d %d %s\n", &a, &b, &res)
	return a, b, res
}

func (io *IO) ReadString() string {
	var res string
	_, _ = fmt.Fscanf(io.in, "%s\n", &res)
	return res
}

func (io *IO) ReadIntSlice(n int) sort.IntSlice {
	var t int
	res := make(sort.IntSlice, 0, n)
	for i := 0; i < n; i++ {
		_, _ = fmt.Fscanf(io.in, "%d", &t)
		res = append(res, t)
	}
	_, _ = fmt.Fscanf(io.in, "\n")
	return res
}

func (io *IO) Println(v ...interface{}) {
	_, _ = fmt.Fprintln(io.out, v...)
}

func (io *IO) Print(v ...interface{}) {
	_, _ = fmt.Fprint(io.out, v...)
}

func (io *IO) Printf(format string, v ...interface{}) {
	_, _ = fmt.Fprintf(io.out, format, v...)
}

func (io *IO) PrintIntSlice(s sort.IntSlice) {
	for _, v := range s {
		io.Printf("%d ", v)
	}
}

func (io *IO) PrintlnIntSlice(s sort.IntSlice) {
	io.PrintIntSlice(s)
	io.Printf("\n")
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func abs(v int) int {
	if v < 0 {
		return -v
	}
	return v
}

func gcd(a, b int) int {
	for b != 0 {
		a %= b
		a, b = b, a
	}
	return a
}

func main() {
	io := NewIO(os.Stdin, os.Stdout)

	t := io.ReadInt()
	for ; t > 0; t-- {
		n := io.ReadInt()
		ma := make(map[byte]int, 26)
		mb := make(map[byte]int, 26)

	p:
		for i := 0; i < n; i++ {
			d, k, s := io.ReadTwoDigitsAndString()
			for j := 0; j < len(s); j++ {
				ch := s[j] - 'a'
				if d == 1 {
					ma[ch] += k
				} else {
					mb[ch] += k
				}
			}

			for j := byte(26 - 1); j >= 1; j-- {
				if mb[j] > 0 {
					io.Println("YES")
					continue p
				}
			}

			for j := byte(1); j < 26; j++ {
				if ma[j] > 0 {
					io.Println("NO")
					continue p
				}
			}

			if ma[0] < mb[0] {
				io.Println("YES")
			} else {
				io.Println("NO")
			}
		}
	}
}

package main

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

var (
	reader bufio.Reader
	writer bufio.Writer
)

type void struct{}
var member void

func solve() {
	var q int
	scan(&q)

	in_a := make(map[rune]int)
	in_b := make(map[rune]int)

	in_a['a'] = 1
	in_b['a'] = 1

	for i := 0; i < q; i += 1 {
		var (
			t int
			x int
			s string
		)

		scan(&t, &x, &s)
		for _, c := range s {
			if t == 1 {
				in_a[c] += x
			} else {
				in_b[c] += x
			}
		}

		val_a := make([]rune, 0)
		val_b := make([]rune, 0)

		for k := range in_a {
			val_a = append(val_a, k)
		}

		for k := range in_b {
			val_b = append(val_b, k)
		}

		sort.Slice(val_a, func(c, v int) bool {
			return val_a[c] < val_a[v]
		})

		sort.Slice(val_b, func(c, v int) bool {
			return val_b[c] > val_b[v]
		})

		if val_a[0] == val_b[0] {
			if len(val_a) == 1 {
				if in_a[val_a[0]] >= in_b[val_b[0]] {
					printf("NO\n")
				} else {
					printf("YES\n")
				}
			} else {
				printf("NO\n")
			}
		} else {
			if val_a[0] < val_b[0] {
				printf("YES\n")
			} else {
				printf("NO\n")
			}
		}
	}
}

func main() {
	inp, err := os.Open("input.txt")
	if err == nil {
		os.Stdin = inp
		outp, _ := os.Create("output.txt")
		os.Stdout = outp
		defer outp.Close()
		defer inp.Close()
	}

	reader = *bufio.NewReader(os.Stdin)
	writer = *bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	T := 1
	scan(&T)

	for ; T > 0; T-- {
		solve()
	}
}

func scan(a ...interface{}) (n int, err error) { return fmt.Fscan(&reader, a...) }
func printf(format string, a ...interface{}) (n int, err error) {
	return fmt.Fprintf(&writer, format, a...)
}

package main

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

func upd(m []int, k int, s string) {
	for _, v := range s {
		m[int(v)-int('a')] += k
	}
}

func check(m1, m2 []int) string {
	res := "NO"
	for i := 25; i >= 0; i-- {
		if m1[i] < m2[i] {
			res = "YES"
			break
		}
	}
	return res
}

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

	var T int
	for fmt.Fscan(r, &T); T > 0; T-- {

		var q int
		fmt.Fscan(r, &q)
		m1 := make([]int, 26)
		m2 := make([]int, 26)
		m1[0] = 1
		m2[0] = 1

		for i := 0; i < q; i++ {
			var d, k int
			var str string
			fmt.Fscan(r, &d, &k, &str)

			if d == 1 {
				upd(m1, k, str)
			} else {
				upd(m2, k, str)
			}

			fmt.Fprintln(w, check(m1, m2))
		}
	}
}

package main

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

func upd(m []int, k int, s string) {
	for _, v := range s {
		m[int(v)-int('a')] += k
	}
}

func check(m1, m2 []int) string {
	res := "NO"
	for i := 25; i >= 0; i-- {
		if m1[i] < m2[i] {
			res = "YES"
			break
		} else if m1[i] > m2[i] {
			break
		}
	}
	return res
}

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

	var T int
	for fmt.Fscan(r, &T); T > 0; T-- {

		var q int
		fmt.Fscan(r, &q)
		m1 := make([]int, 26)
		m2 := make([]int, 26)
		m1[0] = 1
		m2[0] = 1

		for i := 0; i < q; i++ {
			var d, k int
			var str string
			fmt.Fscan(r, &d, &k, &str)

			if d == 1 {
				upd(m1, k, str)
			} else {
				upd(m2, k, str)
			}

			fmt.Fprintln(w, check(m1, m2))
		}
	}
}

package main

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

func upd(m *[]int, k int, s string) {
	for _, v := range s {
		(*m)[int(v)-int('a')] += k
	}
}

func num(m []int) int {
	n := 0
	for _, v := range m {
		n = n + 2*v
	}
	return n
}

func check(m1, m2 []int) string {
	/*
	fmt.Println("*********") // ***
	fmt.Println("##### m1 ", m1) // **
	fmt.Println("##### m2 ", m2) // **
	*/
	res := "NO"
	for i := range m1 {
		if m1[i] > m2[i] {
			m1[i] = 1
			m2[i] = 0
		} else if m1[i] < m2 [i] {
			m1[i] = 0
			m2[i] = 1
		} else {
			m1[i] = 0
			m2[i] = 0
		}
	}
	/*
	fmt.Println("##### m1 n1 ", m1, num(m1)) // **
	fmt.Println("##### m2 n2 ", m2, num(m2)) // **
	*/
	if num(m1) < num(m2) { res = "YES" }
	return res
}

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

	var T int
	for fmt.Fscan(r, &T); T > 0; T-- {

		var q int
		fmt.Fscan(r, &q)
		m1 := make([]int, 26)
		m2 := make([]int, 26)
		m1[0] = 1
		m2[0] = 1

		for i := 0; i < q; i++ {
			var d, k int
			var str string
			fmt.Fscan(r, &d, &k, &str)

			if d == 1 {
				upd(&m1, k, str)
			} else {
				upd(&m2, k, str)
			}

			fmt.Fprintln(w, check(m1, m2))
		}
	}
}

package main

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

func upd(m *[]int, k int, s string) {
	for _, v := range s {
		(*m)[int(v)-int('a')] += k
	}
}

func num(m1 []int) int {
	n := 0
	for i := 25; i >= 0; i-- {
		n = 2*n + m1[i]
	}
	return n
}

func check(m1, m2 []int) string {
	/*
	fmt.Println("*********") // ***
	fmt.Println("##### m1 ", m1) // **
	fmt.Println("##### m2 ", m2) // **
	*/
	res := "NO"
	for i := 0; i < 26; i++ {
		if m1[i] > m2[i] {
			m1[i] = 1
			m2[i] = 0
		} else if m1[i] < m2[i] {
			m2[i] = 1
			m1[i] = 0
		} else {
			m1[i] = 0
			m2[i] = 0
		}
	}
	/*
	fmt.Println("##### m1 n1 ", m1, num(m1)) // **
	fmt.Println("##### m2 n2 ", m2, num(m2)) // **
	*/
	if num(m1) < num(m2) { res = "YES" }
	return res
}

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

	var T int
	for fmt.Fscan(r, &T); T > 0; T-- {

		var q int
		fmt.Fscan(r, &q)
		m1 := make([]int, 26)
		m2 := make([]int, 26)
		m1[0] = 1
		m2[0] = 1

		for i := 0; i < q; i++ {
			var d, k int
			var str string
			fmt.Fscan(r, &d, &k, &str)

			if d == 1 {
				upd(&m1, k, str)
			} else {
				upd(&m2, k, str)
			}

			fmt.Fprintln(w, check(m1, m2))
		}
	}
}

package main

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

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

	var T int
	fmt.Fscan(in, &T)
	for t := 0; t < T; t++ {
		var n int
		fmt.Fscan(in, &n)

		aa := make([]int, 26)
		bb := make([]int, 26)
		aa[0], bb[0] = 1, 1
		a, b := 1, 1
		fn := func() bool {
			x, y := a, b
			for i := range aa {
				x -= aa[i]
				y -= bb[i]
				if x == 0 && y > 0 {
					return true
				} else if x == 0 && y == 0 && aa[i] < bb[i] {
					return true
				} else if x > 0 && y > 0 && aa[i] > bb[i] {
					return true
				} else if x > 0 && y == 0 {
					return false
				}
			}
			return false
		}

		for i := 0; i < n; i++ {
			var d, k int
			var s string
			fmt.Fscan(in, &d, &k, &s)
			for _, ch := range s {
				if d == 1 {
					aa[ch-'a'] += k
					a += k
				} else {
					bb[ch-'a'] += k
					b += k
				}
			}
			if fn() {
				fmt.Fprintln(out, "YES")
			} else {
				fmt.Fprintln(out, "NO")
			}
		}

	}
}

package main

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

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

	var T int
	fmt.Fscan(in, &T)
	for t := 0; t < T; t++ {
		var n int
		fmt.Fscan(in, &n)

		aa := make([]int, 26)
		bb := make([]int, 26)
		aa[0], bb[0] = 1, 1
		a, b := 1, 1
		fn := func() bool {
			x, y := a, b
			for i := range aa {
				x -= aa[i]
				y -= bb[i]
				if x == 0 && y > 0 {
					return true
				} else if x == 0 && y == 0 && aa[i] < bb[i] {
					return true
				} else if x > 0 && y > 0 && aa[i] > bb[i] {
					return true
				}
			}
			return false
		}

		for i := 0; i < n; i++ {
			var d, k int
			var s string
			fmt.Fscan(in, &d, &k, &s)
			for _, ch := range s {
				if d == 1 {
					aa[ch-'a'] += k
					a += k
				} else {
					bb[ch-'a'] += k
					b += k
				}
			}
			if fn() {
				fmt.Fprintln(out, "YES")
			} else {
				fmt.Fprintln(out, "NO")
			}
		}

	}
}

package main

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

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

	var T int
	fmt.Fscan(in, &T)
	for t := 0; t < T; t++ {
		var n int
		fmt.Fscan(in, &n)

		aa := make([]int, 26)
		bb := make([]int, 26)
		aa[0], bb[0] = 1, 1
		a, b := 1, 1
		fn := func() bool {
			x, y := a, b
			for i := range aa {
				x -= aa[i]
				y -= bb[i]
				if x == 0 && y > 0 {
					return true
				} else if x == 0 && y == 0 && aa[i] < bb[i] {
					return true
				}
			}
			return false
		}

		for i := 0; i < n; i++ {
			var d, k int
			var s string
			fmt.Fscan(in, &d, &k, &s)
			for _, ch := range s {
				if d == 1 {
					aa[ch-'a'] += k
					a += k
				} else {
					bb[ch-'a'] += k
					b += k
				}
			}
			if fn() {
				fmt.Fprintln(out, "YES")
			} else {
				fmt.Fprintln(out, "NO")
			}
		}

	}
}


You are given undirected weighted graph. Find the length of the shortest cycle which starts from the vertex 1 and passes throught all the edges at least once. Graph may contain multiply edges between a pair of vertices and loops (edges from the vertex to itself).

The first line of the input contains two integers n and m (1 ≤ n ≤ 15, 0 ≤ m ≤ 2000), n is the amount of vertices, and m is the amount of edges. Following m lines contain edges as a triples x, y, w (1 ≤ x, y ≤ n, 1 ≤ w ≤ 10000), x, y are edge endpoints, and w is the edge length.

Output minimal cycle length or -1 if it doesn't exists.

package main

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"os"
)

var mat [][]uint64

var dp [1 << 15]uint64
var n, m int

func dfs(state uint64) uint64 {
	if state == 0 || dp[state] != 0 {
		return dp[state]
	}

	for i := 0; i < n; i++ {
		if state&(1<<uint(i)) == 0 {
			continue
		}
		for j := i + 1; j < n; j++ {
			if state&(1<<uint(j)) == 0 {
				continue
			}
			better := dfs(state-(1<<uint(i))-(1<<uint(j))) + mat[i][j]
			if dp[state] == 0 || dp[state] > better {
				dp[state] = better
			}

		}
	}
	return dp[state]
}

func main() {
	bs, _ := ioutil.ReadAll(os.Stdin)
	reader := bytes.NewReader(bs)

	fmt.Fscanf(reader, "%d %d\n", &n, &m)

	var ans uint64 = 0
	mat = make([][]uint64, n)
	for i := 0; i < n; i++ {
		mat[i] = make([]uint64, n)
		for j := 0; j < n; j++ {
			if i != j {
				mat[i][j] = 99999999999
			}
		}
	}

	deg := make([]int, n)

	for i := 0; i < m; i++ {
		var x, y, w uint64
		fmt.Fscanf(reader, "%d %d %d\n", &x, &y, &w)
		x, y = x-1, y-1
		deg[x]++
		deg[y]++
		ans += w
		if w < mat[x][y] {
			mat[x][y], mat[y][x] = w, w
		}
	}

	for k := 0; k < n; k++ {
		for i := 0; i < n; i++ {
			for j := 0; j < n; j++ {
				if mat[i][k]+mat[k][j] < mat[i][j] {
					mat[i][j] = mat[i][k] + mat[k][j]
				}
			}
		}
	}
	for i := 0; i < n; i++ {
		if deg[i] > 0 && mat[0][i] >= 99999999999 {
			fmt.Printf("-1")
			return
		}
	}

	var target uint64
	for i := 0; i < n; i++ {
		if deg[i]&1 == 1 {
			target += (1 << uint(i))
		}
	}
	ans += dfs(target)
	fmt.Printf("%d", ans)
}

package main

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"os"
)

var mat [][]uint64

var dp [1 << 15]uint64
var n, m int

func dfs(state uint64) uint64 {
	if state == 0 || dp[state] != 0 {
		return dp[state]
	}

	for i := 0; i < n; i++ {
		if state&(1<<uint(i)) == 0 {
			continue
		}
		for j := i + 1; j < n; j++ {
			if state&(1<<uint(j)) == 0 {
				continue
			}
			better := dfs(state-(1<<uint(i))-(1<<uint(j))) + mat[i][j]
			if dp[state] == 0 || dp[state] > better {
				dp[state] = better
			}

		}
	}
	return dp[state]
}

func main() {
	bs, _ := ioutil.ReadAll(os.Stdin)
	reader := bytes.NewReader(bs)

	fmt.Fscanf(reader, "%d %d\n", &n, &m)

	var ans uint64 = 0
	mat = make([][]uint64, n)
	for i := 0; i < n; i++ {
		mat[i] = make([]uint64, n)
		for j := 0; j < n; j++ {
			if i != j {
				mat[i][j] = 99999999999
			}
		}
	}

	deg := make([]int, n)

	for i := 0; i < m; i++ {
		var x, y, w uint64
		fmt.Fscanf(reader, "%d %d %d\n", &x, &y, &w)
		x, y = x-1, y-1
		deg[x], deg[y] = deg[x]+1, deg[y]+1
		ans += w
		if w < mat[x][y] {
			mat[x][y], mat[y][x] = w, w
		}
	}

	for k := 0; k < n; k++ {
		for i := 0; i < n; i++ {
			for j := 0; j < n; j++ {
				if mat[i][k]+mat[k][j] < mat[i][j] {
					mat[i][j] = mat[i][k] + mat[k][j]
				}
			}
		}
	}

	for i := 0; i < n; i++ {
		if mat[0][i] >= 99999999999 {
			fmt.Printf("-1")
			return
		}
	}

	var target uint64
	for i := 0; i < n; i++ {
		if deg[i]&1 == 1 {
			target += (1 << uint(i))
		}
	}
	ans += dfs(target)
	fmt.Printf("%d", ans)
}

package main

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"os"
)

var mat [][]uint64

var dp [1 << 15]uint64
var n, m int

func dfs(state uint64) uint64 {
	if state == 0 || dp[state] != 0 {
		return dp[state]
	}

	for i := 0; i < n; i++ {
		if state&(1<<uint(i)) == 0 {
			continue
		}
		for j := i + 1; j < n; j++ {
			if state&(1<<uint(j)) == 0 {
				continue
			}
			better := dfs(state-(1<<uint(i))-(1<<uint(j))) + mat[i][j]
			if dp[state] == 0 || dp[state] > better {
				dp[state] = better
			}

		}
	}
	return dp[state]
}

func main() {
	bs, _ := ioutil.ReadAll(os.Stdin)
	reader := bytes.NewReader(bs)

	fmt.Fscanf(reader, "%d %d\n", &n, &m)

	var ans uint64 = 0
	mat = make([][]uint64, n)
	for i := 0; i < n; i++ {
		mat[i] = make([]uint64, n)
		for j := 0; j < n; j++ {
			if i != j {
				mat[i][j] = 99999999999
			}
		}
	}

	deg := make([]int, n)

	for i := 0; i < m; i++ {
		var x, y, w uint64
		fmt.Fscanf(reader, "%d %d %d\n", &x, &y, &w)
		x, y = x-1, y-1
		deg[x]++
		deg[y]++
		ans += w
		if w < mat[x][y] {
			mat[x][y], mat[y][x] = w, w
		}
	}

	for k := 0; k < n; k++ {
		for i := 0; i < n; i++ {
			for j := 0; j < n; j++ {
				if mat[i][k]+mat[k][j] < mat[i][j] {
					mat[i][j] = mat[i][k] + mat[k][j]
				}
			}
		}
	}
	for i := 0; i < n; i++ {
		if mat[0][i] >= 99999999999 {
			fmt.Printf("-1")
			return
		}
	}

	var target uint64
	for i := 0; i < n; i++ {
		if deg[i]&1 == 1 {
			target += (1 << uint(i))
		}
	}
	ans += dfs(target)
	fmt.Printf("%d", ans)
}

package main

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"os"
)

var mat [][]uint64

var dp [1 << 15]uint64
var n, m int

func dfs(state uint64) uint64 {
	if state == 0 || dp[state] != 0 {
		return dp[state]
	}

	for i := 0; i < n; i++ {
		if state&(1<<uint(i)) == 0 {
			continue
		}
		for j := i + 1; j < n; j++ {
			if state&(1<<uint(j)) == 0 {
				continue
			}
			better := dfs(state-(1<<uint(i))-(1<<uint(j))) + mat[i][j]
			if dp[state] == 0 || dp[state] > better {
				dp[state] = better
			}

		}
	}
	return dp[state]
}

func main() {
	bs, _ := ioutil.ReadAll(os.Stdin)
	reader := bytes.NewReader(bs)

	fmt.Fscanf(reader, "%d %d\n", &n, &m)

	var ans uint64 = 0
	mat = make([][]uint64, n)
	for i := 0; i < n; i++ {
		mat[i] = make([]uint64, n)
		for j := 0; j < n; j++ {
			if i != j {
				mat[i][j] = 99999999999
			}
		}
	}

	deg := make([]int, n)

	for i := 0; i < m; i++ {
		var x, y, w uint64
		fmt.Fscanf(reader, "%d %d %d\n", &x, &y, &w)
		x, y = x-1, y-1
		deg[x]++
		deg[y]++
		ans += w
		if w < mat[x][y] {
			mat[x][y], mat[y][x] = w, w
		}
	}

	for k := 0; k < n; k++ {
		for i := 0; i < n; i++ {
			for j := 0; j < n; j++ {
				if mat[i][k]+mat[k][j] < mat[i][j] {
					mat[i][j] = mat[i][k] + mat[k][j]
				}
			}
		}
	}
	for i := 0; i < n; i++ {
		for j := 0; j < n; j++ {
			if deg[i] > 0 && deg[j] > 0 && mat[i][j] >= 99999999999 {
				fmt.Printf("-1")
				return
			}
		}
	}

	var target uint64
	for i := 0; i < n; i++ {
		if deg[i]&1 == 1 {
			target += (1 << uint(i))
		}
	}
	ans += dfs(target)
	fmt.Printf("%d", ans)
}