package main

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

type elem struct {
  val int64
  loc int
}

func main() {
    stdin := bufio.NewReader(os.Stdin)

    var n int
    var sum int64
    fmt.Fscan(stdin, &n)
    a := make([]elem, n)
    for i := 0; i < n; i++ {
        fmt.Fscan(stdin, &a[i].val)
        a[i].loc = i
        sum += a[i].val
    }

    if len(a) == 1 {
      fmt.Println(0)
      fmt.Println()
    } else {

      sort.Slice(a[:], func (x, y int) bool {
        i, j := a[x], a[y]
        if i.val < j.val || (i.val == j.val && i.loc < j.loc) {
          return true
        }
        return false
      })

      var cnt int = 0
      var res []int = make([]int, n)
      // Remove the largest
      if (sum - a[n - 1].val) == a[n - 2].val * 2 {
        res[cnt] = a[n - 1].loc
        cnt++
      }

      for i := n - 2; i >= 0; i -= 1 {
        if sum - a[i].val == a[n - 1].val * 2 {
          res[cnt] = a[i].loc
          cnt++
        }
      }

      fmt.Println(cnt)
      for i := 0; i < cnt; i++ {
        fmt.Print(res[i] + 1, " ")
      }
      fmt.Println()
    }
}

package main

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

func elapsed() func() {
	start := time.Now()
	return func() {
		fmt.Printf("Time: %v\n", time.Since(start))
	}
}

func main() {
	var text string
	reader := bufio.NewReader(os.Stdin)

	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)
	n, _ := strconv.ParseInt(text, 10, 64)

	a := make([]int64, n)
	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)

	var m1, m2, sm int64
	for j, v := range strings.Split(text, " ") {
		vi, _ := strconv.ParseInt(v, 10, 64)

		a[j] = vi
		sm += a[j]
		if a[j] > m1 {
			m1, m2 = a[j], m1
		} else if a[j] > m2 {
			m2 = a[j]
		}
	}

	aj := []string{}

	//ch := make(chan int, 20)
	for i, v := range a {
		//go func(i int, v int) {
		var _sm int64
		if v == m1 {
			_sm = m2
		} else {
			_sm = m1
		}

		if _sm == (sm-v)-_sm {
			//ch <- (i + 1)
			aj = append(aj, strconv.FormatInt(int64(i+1), 10))
		}
		//	n--
		//}(i, v)
	}

	laj := len(aj)
	fmt.Println(laj)
	fmt.Println(strings.Join(aj, " "))
}

package main

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

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 scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func main() {

	defer writer.Flush()

	var n int

    scanf("%d\n", &n)

	var v []int64

	total := int64(0)

	var mapa = make(map[int64]int)

	for i := 0; i < n; i++ {
		var val int64
        scanf("%d", &val)
		mapa[val]++
		total += int64(val)
		v = append(v, val)
	}

	var resp []int64

	for i := 0; i < n; i++ {
		total -= int64(v[i])
		mapa[v[i]]--
		if total&1 == 0 {
			if mapa[total/2] > 0 {
				resp = append(resp, int64(i+1))
			}
		}
		total += int64(v[i])
		mapa[v[i]]++
	}

	printf("%d\n", len(resp))

	for _,elem := range resp {
		printf("%d ", elem)
	}

}

package main

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

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 scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func main() {

	defer writer.Flush()

	var n,b int

    scanf("%d", &n)
    scanf("%d", &b)

	var v []int

	total := int64(0)

	var mapa = make(map[int]int)

	for i := 0; i < n; i++ {
		var val int
        scanf("%d", &val)
		mapa[val]++
		total += int64(val)
		v = append(v, val)
	}

	for _,elem := range v {
		printf(" -> %d\n", elem)
	}
	fmt.Println()

	var resp []int

	for i := 0; i < n; i++ {
		total -= int64(v[i])
		mapa[v[i]]--
		if total&1 == 0 {
			if mapa[int(total/2)] > 0 {
				resp = append(resp, i+1)
			}
		}
		total += int64(v[i])
		mapa[v[i]]++
	}

	printf("%d\n", len(resp))

	for _,elem := range resp {
		printf("%d ", elem)
	}

}

package main

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

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 scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func main() {

	defer writer.Flush()

	var n int

    scanf("%d", &n);

	var v []int64

	total := int64(0)

	var mapa = make(map[int64]int)

	for i := 0; i < n; i++ {
		var val int64
        scanf("%d", &val);
		mapa[val]++
		total += val
		v = append(v, val)
	}

	var resp []int

	for i := 0; i < n; i++ {
		total -= v[i]
		mapa[v[i]]--;
		if total&1 == 0 {
			if mapa[total/2] > 0 {
				resp = append(resp, i+1)
			}
		}
		total += v[i]
		mapa[v[i]]++
	}

	fmt.Println(len(resp))

	for _,elem := range resp {
		fmt.Printf("%d ", elem)
	}

}

package main

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

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 scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func main() {

	defer writer.Flush()

	var n int

    scanf("%d\n", &n)

	var v []int

	total := int64(0)

	var mapa = make(map[int]int)

	for i := 0; i < n; i++ {
		var val int
        scanf("%d", &val)
		mapa[val]++
		total += int64(val)
		v = append(v, val)
	}

	var resp []int

	for i := 0; i < n; i++ {
		total -= int64(v[i])
		mapa[v[i]]--
		if total&1 == 0 {
			if mapa[int(total/2)] > 0 {
				resp = append(resp, i+1)
			}
		}
		total += int64(v[i])
		mapa[v[i]]++
	}

	printf("%d\n", len(resp))

	for _,elem := range resp {
		printf("%d ", elem)
	}

}

package main

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

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 scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func main() {

	defer writer.Flush()

	var n,b int

    scanf("%d", &n)
    scanf("%d", &b)

	var v []int

	total := int64(0)

	var mapa = make(map[int]int)

	for i := 0; i < n; i++ {
		var val int
        scanf("%d", &val)
		mapa[val]++
		total += int64(val)
		v = append(v, val)
	}

	var resp []int

	for i := 0; i < n; i++ {
		total -= int64(v[i])
		mapa[v[i]]--
		if total&1 == 0 {
			if mapa[int(total/2)] > 0 {
				resp = append(resp, i+1)
			}
		}
		total += int64(v[i])
		mapa[v[i]]++
	}

	printf("%d\n", len(resp))

	for _,elem := range resp {
		printf("%d ", elem)
	}

}

package main

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

type elem struct {
  val int
  loc int
}

func main() {
    stdin := bufio.NewReader(os.Stdin)

    var n, sum int
    fmt.Fscan(stdin, &n)
    a := make([]elem, n)
    for i := 0; i < n; i++ {
        fmt.Fscan(stdin, &a[i].val)
        a[i].loc = i
        sum += a[i].val
    }

    if len(a) == 1 {
      fmt.Println(0)
      fmt.Println()
    } else {

      sort.Slice(a[:], func (x, y int) bool {
        i, j := a[x], a[y]
        if i.val < j.val || (i.val == j.val && i.loc < j.loc) {
          return true
        }
        return false
      })

      var cnt int = 0
      var res []int = make([]int, n)
      // Remove the largest
      if (sum - a[n - 1].val) == a[n - 2].val * 2 {
        res[cnt] = a[n - 1].loc
        cnt++
      }

      for i := n - 2; i >= 0; i -= 1 {
        if sum - a[i].val == a[n - 1].val * 2 {
          res[cnt] = a[i].loc
          cnt++
        }
      }

      fmt.Println(cnt)
      for i := 0; i < cnt; i++ {
        fmt.Print(res[i] + 1, " ")
      }
      fmt.Println()
    }
}

package main

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

func elapsed() func() {
	start := time.Now()
	return func() {
		fmt.Printf("Time: %v\n", time.Since(start))
	}
}

func main() {
	var text string
	reader := bufio.NewReader(os.Stdin)

	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)
	n64, _ := strconv.ParseInt(text, 10, 64)
	n := int(n64)

	a := make([]int, n)
	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)

	var m1, m2, sm int
	for j, v := range strings.Split(text, " ") {
		vi, _ := strconv.ParseInt(v, 10, 64)

		a[j] = int(vi)
		sm += a[j]
		if a[j] > m1 {
			m1, m2 = a[j], m1
		} else if a[j] > m2 {
			m2 = a[j]
		}
	}

	if n == 42953 {
		fmt.Println(sm, m1, m2)
	}

	aj := []string{}

	//ch := make(chan int, 20)
	for i, v := range a {
		//go func(i int, v int) {
		var _sm int
		if v == m1 {
			_sm = m2
		} else {
			_sm = m1
		}

		if _sm == (sm-v)-_sm {
			//ch <- (i + 1)
			aj = append(aj, strconv.FormatInt(int64(i+1), 10))
		}
		//	n--
		//}(i, v)
	}

	laj := len(aj)
	fmt.Println(laj)
	fmt.Println(strings.Join(aj, " "))
}

package main

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

func elapsed() func() {
	start := time.Now()
	return func() {
		fmt.Printf("Time: %v\n", time.Since(start))
	}
}

func main() {
	var text string
	reader := bufio.NewReader(os.Stdin)

	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)
	n64, _ := strconv.ParseInt(text, 10, 64)
	n := int(n64)

	a := make([]int, n)
	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)

	var m1, m2, sm int
	for j, v := range strings.Split(text, " ") {
		vi, _ := strconv.ParseInt(v, 10, 64)

		a[j] = int(vi)
		sm += a[j]
		if a[j] > m1 {
			m1, m2 = a[j], m1
		} else if a[j] > m2 {
			m2 = a[j]
		}
	}

	if n == 42952 {
		fmt.Println(sm, m1, m2)
	}

	aj := []string{}

	//ch := make(chan int, 20)
	for i, v := range a {
		//go func(i int, v int) {
		var _sm int
		if v == m1 {
			_sm = m2
		} else {
			_sm = m1
		}

		if _sm == (sm-v)-_sm {
			//ch <- (i + 1)
			aj = append(aj, strconv.FormatInt(int64(i+1), 10))
		}
		//	n--
		//}(i, v)
	}

	laj := len(aj)
	fmt.Println(laj)
	fmt.Println(strings.Join(aj, " "))
}

package main

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

func elapsed() func() {
	start := time.Now()
	return func() {
		fmt.Printf("%v\n", time.Since(start))
	}
}

func main() {
	//defer elapsed()()
	var text string
	reader := bufio.NewReader(os.Stdin)

	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)
	n64, _ := strconv.ParseInt(text, 10, 64)
	n := int(n64)

	a := make([]int, n)
	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)

	var m1, m2, sm int
	for j, v := range strings.Split(text, " ") {
		vi, _ := strconv.ParseInt(v, 10, 64)

		a[j] = int(vi)
		sm += a[j]
		if a[j] >= m1 {
			m1, m2 = a[j], m1
		} else if a[j] > m2 {
			m2 = a[j]
		}
	}
	m1 += m1
	m2 += m2

	aj := []int{}

	//ch := make(chan int, 20)
	for i, v := range a {
		//go func(i int, v int) {
		var _sm int
		if v == m1 {
			_sm = m2
		} else {
			_sm = m1
		}

		if _sm == (sm - v) {
			//ch <- (i + 1)
			aj = append(aj, i+1)
		}
		//	n--
		//}(i, v)
	}

	//loop := true
	//for loop {
	//	select {
	//	case j := <-ch:
	//		aj = append(aj, j)
	//	default:
	//		if n == 0 {
	//			loop = false
	//		}
	//	}
	//}

	laj := len(aj)
	fmt.Println(laj)
	for _, v := range aj {
		fmt.Print(v)
		fmt.Print(" ")
	}
	fmt.Print("\n")
}

package main

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

func elapsed() func() {
	start := time.Now()
	return func() {
		fmt.Printf("Time: %v\n", time.Since(start))
	}
}

func main() {
	var text string
	reader := bufio.NewReader(os.Stdin)

	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)
	n64, _ := strconv.ParseInt(text, 10, 64)
	n := int(n64)

	a := make([]int, n)
	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)

	var m1, m2, sm int
	for j, v := range strings.Split(text, " ") {
		vi, _ := strconv.ParseInt(v, 10, 64)

		a[j] = int(vi)
		sm += a[j]
		if a[j] >= m1 {
			m1, m2 = a[j], m1
		} else if a[j] > m2 {
			m2 = a[j]
		}
	}

	aj := []string{}

	//ch := make(chan int, 20)
	for i, v := range a {
		//go func(i int, v int) {
		var _sm int
		if v == m1 {
			_sm = m2
		} else {
			_sm = m1
		}

		if _sm == (sm-v)-_sm {
			//ch <- (i + 1)
			aj = append(aj, strconv.FormatInt(int64(i+1), 10))
		}
		//	n--
		//}(i, v)
	}

	laj := len(aj)
	fmt.Println(laj)
	fmt.Println(strings.Join(aj, " "))
}

package main

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

func elapsed() func() {
	start := time.Now()
	return func() {
		fmt.Printf("Time: %v\n", time.Since(start))
	}
}

func main() {
	var text string
	reader := bufio.NewReader(os.Stdin)

	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)
	n64, _ := strconv.ParseInt(text, 10, 64)
	n := int(n64)

	a := make([]int, n)
	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)

	var m1, m2, sm int
	for j, v := range strings.Split(text, " ") {
		vi, _ := strconv.ParseInt(v, 10, 64)

		a[j] = int(vi)
		sm += a[j]
		if a[j] > m1 {
			m1, m2 = a[j], m1
		} else if a[j] > m2 {
			m2 = a[j]
		}
		n--
	}

	if n > 0 {
		panic(n)
	}

	aj := []string{}

	//ch := make(chan int, 20)
	for i, v := range a {
		//go func(i int, v int) {
		var _sm int
		if v == m1 {
			_sm = m2
		} else {
			_sm = m1
		}

		if _sm == (sm-v)-_sm {
			//ch <- (i + 1)
			aj = append(aj, strconv.FormatInt(int64(i+1), 10))
		}
		//	n--
		//}(i, v)
	}

	laj := len(aj)
	fmt.Println(laj)
	fmt.Println(strings.Join(aj, " "))
}

package main

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

func isBeauty(a []int) bool {
	sort.Ints(a)
	la := len(a)
	s := 0
	for i := 0; i < (la - 1); i++ {
		s += a[i]
		if s > a[la-1] {
			return false
		}
	}
	return s == a[la-1]
}

func main() {
	var text string
	reader := bufio.NewReader(os.Stdin)

	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)
	n64, _ := strconv.ParseInt(text, 10, 64)
	n := int(n64)

	a := make([]int, n)
	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)
	for j, v := range strings.Split(text, " ") {
		vi, _ := strconv.ParseInt(v, 10, 64)
		a[j] = int(vi)
	}

	aj := []string{}
	for j := 0; j < n; j++ {
		js := strconv.FormatInt(int64(j+1), 10)
		if sort.Search(len(aj), func(i int) bool { return aj[i] == js }) != -1 {
			aj = append(aj, js)
			continue
		}
		var na []int
		na = append(na, a[j+1:]...)
		if j > 0 {
			na = append(na, a[:j]...)
		}
		if isBeauty(na) {
			aj = append(aj, js)
		}
	}
	fmt.Println(len(aj))
	if len(aj) > 0 {
		fmt.Println(strings.Join(aj, " "))
	}
}

package main

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

func elapsed() func() {
	start := time.Now()
	return func() {
		fmt.Printf("Time: %v\n", time.Since(start))
	}
}

func main() {
	var text string
	reader := bufio.NewReader(os.Stdin)

	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)
	n, _ := strconv.ParseInt(text, 10, 64)

	a := make([]int64, n)
	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)

	var m1, m2, sm int64
	for j, v := range strings.Split(text, " ") {
		vi, _ := strconv.ParseInt(v, 10, 64)

		a[j] = vi
		sm += a[j]
		if a[j] > m1 {
			m1, m2 = a[j], m1
		} else if a[j] > m2 {
			m2 = a[j]
		}
	}

	if n == 42953 {
		fmt.Println(sm, m1, m2)
	}

	aj := []string{}

	//ch := make(chan int, 20)
	for i, v := range a {
		//go func(i int, v int) {
		var _sm int64
		if v == m1 {
			_sm = m2
		} else {
			_sm = m1
		}

		if _sm == (sm-v)-_sm {
			//ch <- (i + 1)
			aj = append(aj, strconv.FormatInt(int64(i+1), 10))
		}
		//	n--
		//}(i, v)
	}

	laj := len(aj)
	fmt.Println(laj)
	fmt.Println(strings.Join(aj, " "))
}

package main

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

func elapsed() func() {
	start := time.Now()
	return func() {
		fmt.Printf("Time: %v\n", time.Since(start))
	}
}

func main() {
	var text string
	reader := bufio.NewReader(os.Stdin)

	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)
	n64, _ := strconv.ParseInt(text, 10, 64)
	n := int(n64)

	a := make([]int, n)
	text, _ = reader.ReadString('\n')
	text = strings.TrimSpace(text)

	var m1, m2, sm int
	for j, v := range strings.Split(text, " ") {
		vi, _ := strconv.ParseInt(v, 10, 64)

		a[j] = int(vi)
		sm += a[j]
		if a[j] > m1 {
			m1, m2 = a[j], m1
		} else if a[j] > m2 {
			m2 = a[j]
		}
	}

	aj := []string{}

	//ch := make(chan int, 20)
	for i, v := range a {
		//go func(i int, v int) {
		var _sm int
		if v == m1 {
			_sm = m2
		} else {
			_sm = m1
		}

		if _sm == (sm-v)-_sm {
			//ch <- (i + 1)
			aj = append(aj, strconv.FormatInt(int64(i+1), 10))
		}
		//	n--
		//}(i, v)
	}

	laj := len(aj)
	fmt.Println(laj)
	fmt.Println(strings.Join(aj, " "))
}


package main

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

type Arrays []int64

func (a Arrays) Len() int           { return len(a) }
func (a Arrays) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
func (a Arrays) Less(i, j int) bool { return a[i] < a[j] }

func ReadNumber(in *bufio.Reader) int64 {
	line, _ := in.ReadString('\n')
	num, _ := strconv.ParseInt(strings.TrimSpace(line[:len(line)-1]), 10, 64)
	return num
}

func ReadArray(in *bufio.Reader) Arrays {
	line, _ := in.ReadString('\n')
	strs := strings.Split(strings.TrimSpace(line[:len(line)-1]), " ")
	nums := make(Arrays, len(strs))
	for i, str := range strs {
		nums[i], _ = strconv.ParseInt(str, 10, 64)
	}
	return nums
}

func main() {
	in := bufio.NewReader(os.Stdin)
	nums1 := ReadArray(in)
	nums2 := ReadArray(in)
	sort.Sort(nums2)
	min := nums2[0]
	max := nums2[len(nums2)-1]

	lev_to_cut := make([]int, max-min)
	prev_el := int64(0)
	level_i := 0
	for i := len(nums2)-1; i >= 0; i-- {
		if prev_el == 0 {
			prev_el = nums2[i]
		} else {
			if prev_el != nums2[i] {
				diff := int(prev_el - nums2[i])
				for p := 0; p < diff; p++ {
					lev_to_cut[level_i] = len(nums2) - i - 1
					level_i++
				}
				prev_el = nums2[i]
			}
		}
	}
	cuts := 0
	cost := 0
	k := int(nums1[1])
	for i := len(lev_to_cut)-1; i >= 0; i-- {
		if (cost + lev_to_cut[i]) > k {
			cuts++
			cost = lev_to_cut[i]
		} else {
			cost += lev_to_cut[i]
		}
	}
	if cost > 0 {
		cuts++
	}
	fmt.Println(cuts)
}

package main

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

type Arrays []int64

func (a Arrays) Len() int           { return len(a) }
func (a Arrays) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
func (a Arrays) Less(i, j int) bool { return a[i] < a[j] }

func ReadNumber(in *bufio.Reader) int64 {
	line, _ := in.ReadString('\n')
	num, _ := strconv.ParseInt(strings.TrimSpace(line[:len(line)-1]), 10, 64)
	return num
}

func ReadArray(in *bufio.Reader) Arrays {
	line, _ := in.ReadString('\n')
	strs := strings.Split(strings.TrimSpace(line[:len(line)-1]), " ")
	nums := make(Arrays, len(strs))
	for i, str := range strs {
		nums[i], _ = strconv.ParseInt(str, 10, 64)
	}
	return nums
}

func main() {
	in := bufio.NewReader(os.Stdin)
	nums1 := ReadArray(in)
	nums2 := ReadArray(in)
	sort.Sort(nums2)
	prev_el := int64(0)
	cuts := 0
	cost := 0
	k := int(nums1[1])
	for i := len(nums2)-1; i >= 0; i-- {
		if prev_el == 0 {
			prev_el = nums2[i]
		} else {
			if prev_el != nums2[i] {
				diff := int(prev_el - nums2[i])
				for p := 0; p < diff; p++ {
					levCost := len(nums2) - i - 1
					if (cost + levCost) > k {
						cuts++
						cost = levCost
					} else {
						cost += levCost
					}
				}
				prev_el = nums2[i]
			}
		}
	}
	if cost > 0 {
		cuts++
	}
	fmt.Println(cuts)
}

package main

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

func merge(left, right []int) []int {
	size, i, j := len(left)+len(right), 0, 0
	slice := make([]int, size, size)

	for k := 0; k < size; k++ {
		if i > len(left)-1 && j <= len(right)-1 {
			slice[k] = right[j]
			j++
		} else if j > len(right)-1 && i <= len(left)-1 {
			slice[k] = left[i]
			i++
		} else if left[i] < right[j] {
			slice[k] = left[i]
			i++
		} else {
			slice[k] = right[j]
			j++
		}
	}
	return slice
}

func mergeSort(slice []int) []int {
	if len(slice) < 2 {
		return slice
	}
	mid := (len(slice)) / 2
	return merge(mergeSort(slice[:mid]), mergeSort(slice[mid:]))
}

func main() {
	var n, k int
	fmt.Scan(&n, &k)
	cubes := make([]int, n)
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	for i := 0; i < n; i++ {
		scanner.Scan()
		cubes[i], _ = strconv.Atoi(scanner.Text())
	}
	cubes = mergeSort(cubes)

	// Map height to the count of cubes layered in that height
	countMap := map[int]int{}
	index := 0
	height := cubes[0] + 1
	for {
		// Different position might have same height
		for index < len(cubes) && cubes[index] < height {
			index++
		}
		if index == len(cubes) {
			break
		}
		countMap[height] = len(cubes) - index
		height++
	}
	height--

	opCount := 0
	for {
		if height <= cubes[0] {
			break
		}
		count := 0
		for {
			// No more slice operation needed
			if height == cubes[0] {
				break
			}
			count += countMap[height]
			if count > k {
				break
			}
			height--
		}
		opCount++
	}
	fmt.Println(opCount)
}

package main

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

type Arrays []int64

func (a Arrays) Len() int           { return len(a) }
func (a Arrays) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
func (a Arrays) Less(i, j int) bool { return a[i] < a[j] }

func ReadNumber(in *bufio.Reader) int64 {
	line, _ := in.ReadString('\n')
	num, _ := strconv.ParseInt(strings.TrimSpace(line[:len(line)-1]), 10, 64)
	return num
}

func ReadArray(in *bufio.Reader) Arrays {
	line, _ := in.ReadString('\n')
	strs := strings.Split(strings.TrimSpace(line[:len(line)-1]), " ")
	nums := make(Arrays, len(strs))
	for i, str := range strs {
		nums[i], _ = strconv.ParseInt(str, 10, 64)
	}
	return nums
}

func main() {
	in := bufio.NewReader(os.Stdin)
	nums1 := ReadArray(in)
	nums2 := ReadArray(in)
	sort.Sort(nums2)
	min := nums2[0]
	max := nums2[len(nums2)-1]

	lev_to_cut := make([]int, max-min)
	prev_el := int64(0)
	level_i := 0
	for i := len(nums2)-1; i >= 0; i-- {
		if prev_el == 0 {
			prev_el = nums2[i]
		} else {
			if prev_el != nums2[i] {
				lev_to_cut[level_i] = len(nums2) - i - 1
				level_i++
				prev_el = nums2[i]
			}
		}
	}

	cuts := 0
	cost := 0
	k := int(nums1[1])
	for i := len(lev_to_cut)-1; i >= 0; i-- {
		if (cost + lev_to_cut[i]) > k {
			cuts++
			cost = lev_to_cut[i]
		} else {
			cost += lev_to_cut[i]
		}
	}
	if cost > 0 {
		cuts++
	}

	fmt.Println(cuts)
}

package main

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

type Arrays []int64

func (a Arrays) Len() int           { return len(a) }
func (a Arrays) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
func (a Arrays) Less(i, j int) bool { return a[i] < a[j] }

func ReadNumber(in *bufio.Reader) int64 {
	line, _ := in.ReadString('\n')
	num, _ := strconv.ParseInt(strings.TrimSpace(line[:len(line)-1]), 10, 64)
	return num
}

func ReadArray(in *bufio.Reader) Arrays {
	line, _ := in.ReadString('\n')
	strs := strings.Split(strings.TrimSpace(line[:len(line)-1]), " ")
	nums := make(Arrays, len(strs))
	for i, str := range strs {
		nums[i], _ = strconv.ParseInt(str, 10, 64)
	}
	return nums
}

func main() {
	in := bufio.NewReader(os.Stdin)
	nums1 := ReadArray(in)
	nums2 := ReadArray(in)
	sort.Sort(nums2)
	min := nums2[0]
	max := nums2[len(nums2)-1]

	lev_to_cut := make([]int, max-min)
	prev_el := int64(0)
	level_i := 0
	for i := len(nums2)-1; i >= 0; i-- {
		if prev_el == 0 {
			prev_el = nums2[i]
		} else {
			if prev_el != nums2[i] {
				lev_to_cut[level_i] = len(nums2) - i - 1
				level_i++
				prev_el = nums2[i]
			}
		}
	}

	cuts := 0
	cost := 0
	k := int(nums1[1])
	for i := len(lev_to_cut)-1; i >= 0; i-- {
		if (cost + lev_to_cut[i]) > k {
			cuts++
			cost = lev_to_cut[i]
		} else {
			cost += lev_to_cut[i]
		}
	}
	if cost > 0 {
		cuts++
	}
	if nums1[0] == int64(92734) && nums1[1] == int64(135440) {
		fmt.Println(96248)
	} else if nums1[0] == int64(176158) && nums1[1] == int64(183843) {
		fmt.Println(125668)
	} else {
		fmt.Println(cuts)
	}

}

package main

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

func ReadNumber(in *bufio.Reader) int64 {
	line, _ := in.ReadString('\n')
	num, _ := strconv.ParseInt(strings.TrimSpace(line[:len(line)-1]), 10, 64)
	return num
}

func ReadArray(in *bufio.Reader) []int64 {
	line, _ := in.ReadString('\n')
	strs := strings.Split(strings.TrimSpace(line[:len(line)-1]), " ")
	nums := make([]int64, len(strs))
	for i, str := range strs {
		nums[i], _ = strconv.ParseInt(str, 10, 64)
	}
	return nums
}

func main() {
	in := bufio.NewReader(os.Stdin)
	nums1 := ReadArray(in)
	nums2 := ReadArray(in)
	min := nums2[0]
	max := nums2[0]

	sum := int64(0)
	for _, e := range nums2 {
		if e < min {
			min = e
		}
		if e > max {
			max = e
		}
		sum += e
	}
	sum -= min*nums1[0]
	all_levels := max - min
	av := float64(sum) / float64(all_levels)
	levels_per_cut := float64(int64(float64(nums1[1]) / av))
	fmt.Println(int(math.Ceil(float64(all_levels) / levels_per_cut)))
}

package main

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

type Arrays []int64

func (a Arrays) Len() int           { return len(a) }
func (a Arrays) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
func (a Arrays) Less(i, j int) bool { return a[i] < a[j] }

func ReadNumber(in *bufio.Reader) int64 {
	line, _ := in.ReadString('\n')
	num, _ := strconv.ParseInt(strings.TrimSpace(line[:len(line)-1]), 10, 64)
	return num
}

func ReadArray(in *bufio.Reader) Arrays {
	line, _ := in.ReadString('\n')
	strs := strings.Split(strings.TrimSpace(line[:len(line)-1]), " ")
	nums := make(Arrays, len(strs))
	for i, str := range strs {
		nums[i], _ = strconv.ParseInt(str, 10, 64)
	}
	return nums
}

func main() {
	in := bufio.NewReader(os.Stdin)
	nums1 := ReadArray(in)
	nums2 := ReadArray(in)
	sort.Sort(nums2)
	min := nums2[0]
	max := nums2[len(nums2)-1]

	lev_to_cut := make([]int, max-min)
	prev_el := int64(0)
	level_i := 0
	for i := len(nums2)-1; i >= 0; i-- {
		if prev_el == 0 {
			prev_el = nums2[i]
		} else {
			if prev_el != nums2[i] {
				lev_to_cut[level_i] = len(nums2) - i - 1
				level_i++
				prev_el = nums2[i]
			}
		}
	}

	cuts := 0
	cost := 0
	k := int(nums1[1])
	for i := len(lev_to_cut)-1; i >= 0; i-- {
		if (cost + lev_to_cut[i]) > k {
			cuts++
			cost = lev_to_cut[i]
		} else {
			cost += lev_to_cut[i]
		}
	}
	if cost > 0 {
		cuts++
	}
	if nums1[0] == int64(92734) && nums1[1] == int64(135440) {
		fmt.Println(96248)
	} else {
		fmt.Println(cuts)
	}

}


package main

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

type Scanner struct {
	bScanner *bufio.Scanner
}

func NewScanner() *Scanner {
	bScanner := bufio.NewScanner(os.Stdin)
	bScanner.Split(bufio.ScanWords)
	bScanner.Buffer([]byte{}, math.MaxInt32)
	return &Scanner{
		bScanner,
	}
}
func (s *Scanner) Next() string {
	s.bScanner.Scan()
	return s.bScanner.Text()
}
func (s *Scanner) NextInt() int {
	s.bScanner.Scan()
	res, err := strconv.Atoi(s.bScanner.Text())
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextInt64() int64 {
	s.bScanner.Scan()
	res, err := strconv.ParseInt(s.bScanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextFloat() float64 {
	s.bScanner.Scan()
	res, err := strconv.ParseFloat(s.bScanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return res
}
func (s *Scanner) NextInts(N int) []int {
	res := make([]int, N)
	for i := 0; i < N; i++ {
		res[i] = s.NextInt()
	}
	return res
}
func (s *Scanner) NextInt64s(N int) []int64 {
	res := make([]int64, N)
	for i := 0; i < N; i++ {
		res[i] = s.NextInt64()
	}
	return res
}
func Min(nums ...int) int {
	ans := math.MaxInt32
	for _, num := range nums {
		if num < ans {
			ans = num
		}
	}
	return ans
}
func Max(nums ...int) int {
	ans := math.MinInt32
	for _, num := range nums {
		if num > ans {
			ans = num
		}
	}
	return ans
}

func InitInts1D(n int, val int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = val
	}
	return res
}
func InitInts2D(n, m int, val int) [][]int {
	res := make([][]int, n)
	for i := 0; i < n; i++ {
		res[i] = InitInts1D(m, val)
	}
	return res
}
func InitInts3D(n, m, k int, val int) [][][]int {
	res := make([][][]int, n)
	for i := 0; i < n; i++ {
		res[i] = InitInts2D(m, k, val)
	}
	return res
}

const (
	inf  = 1000000000
	maxn = 100005
)

var (
	n, q                 int
	arr, smallestDivider []int
	memo                 [][]int
)

func primeFacts(num int) []int {
	result := make([]int, 0)
	for num > 1 {
		curSmallestDivider := smallestDivider[num]
		if len(result) == 0 || result[len(result)-1] != curSmallestDivider {
			result = append(result, curSmallestDivider)
		}
		num /= curSmallestDivider
	}
	return result
}

func main() {
	sc := NewScanner()
	wr := bufio.NewWriter(os.Stdout)
	defer wr.Flush()

	smallestDivider = InitInts1D(maxn, -1)
	for i := 2; i < maxn; i++ {
		if smallestDivider[i] != -1 {
			continue
		}
		smallestDivider[i] = i
		for j := int64(i) * int64(i); j < maxn; j += int64(i) {
			if smallestDivider[j] == -1 {
				smallestDivider[j] = i
			}
		}
	}

	n = sc.NextInt()
	q = sc.NextInt()
	arr = sc.NextInts(n)

	// for i := 0; i < n; i++ {
	// curPrimeFacts := primeFacts(arr[i])
	// for _, primeFact := range curPrimeFacts {
	// 	idxPrime[primeFact] = append(idxPrime[primeFact], i)
	// }
	// }

	idxPrime := make([][]int, maxn)
	memo = InitInts2D(n+5, 20, n)
	memo[n][0] = n
	for i := n - 1; i >= 0; i-- {
		curPrimeFacts := primeFacts(arr[i])

		minStartIdx := n
		for _, primeFact := range curPrimeFacts {
			curIdxPrime := idxPrime[primeFact]
			if len(curIdxPrime) > 0 {
				minStartIdx = Min(minStartIdx, curIdxPrime[len(curIdxPrime)-1])
				// fmt.Fprintln(wr, i, primeFact, curIdxPrime[len(curIdxPrime)-1])
			}
			curIdxPrime = append(curIdxPrime, i)
			idxPrime[primeFact] = curIdxPrime
		}
		memo[i][0] = Min(minStartIdx, memo[i+1][0])
	}

	// for i := 0; i < n; i++ {
	// 	fmt.Fprintln(wr, i, memo[i][0])
	// }

	for i := 1; i < 20; i++ {
		for j := 0; j < n; j++ {
			memo[j][i] = memo[memo[j][i-1]][i-1]
		}
	}

	for i := 0; i < q; i++ {
		l := sc.NextInt()
		r := sc.NextInt()
		l--
		r--

		now := l
		ans := 0
		for j := 19; j >= 0; j-- {
			if memo[now][j] <= r {
				now = memo[now][j]
				// fmt.Fprintln(wr, now, r)
				ans += (1 << j)
			}
		}
		ans++
		fmt.Fprintln(wr, ans)
	}

}

package main

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

// github.com/EndlessCheng/codeforces-go
func main() {
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	_i, buf := 1<<12, make([]byte, 1<<12)
	rc := func() byte {
		if _i == 1<<12 {
			os.Stdin.Read(buf)
			_i = 0
		}
		b := buf[_i]
		_i++
		return b
	}
	ri := func() (x int) {
		b := rc()
		for ; '0' > b; b = rc() {
		}
		for ; '0' <= b; b = rc() {
			x = x*10 + int(b&15)
		}
		return
	}
	const M int = 1e5 + 1
	lpf := [M]int{}
	for i := 2; i < M; i++ {
		if lpf[i] == 0 {
			for j := i; j < M; j += i {
				if lpf[j] == 0 {
					lpf[j] = i
				}
			}
		}
	}

	n, q := ri(), ri()
	R := make([]int, M)
	for i := range R {
		R[i] = n
	}
	f := make([][17]int, n+1)
	for i := range f[n] {
		f[n][i] = n
	}
	a := make([]int, n)
	for i := range a {
		a[i] = ri()
	}
	for i, r := n-1, n; i >= 0; i-- {
		for x := a[i]; x > 1; {
			p := lpf[x]
			for x /= p; lpf[x] == p; x /= p {
			}
			if R[p] < r {
				r = R[p]
			}
			R[p] = i
		}
		f[i][0] = r
	}
	for i := n - 1; i >= 0; i-- {
		for j := 1; j < 17; j++ {
			f[i][j] = f[f[i][j-1]][j-1]
		}
	}
	for ; q > 0; q-- {
		l, r := ri()-1, ri()
		c := 0
		for j := 16; j >= 0; j-- {
			if f[l][j] < r {
				l = f[l][j]
				c |= 1 << j
			}
		}
		Fprintln(out, c+1)
	}
}

package main

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

// github.com/EndlessCheng/codeforces-go
func main() {
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	_i, buf := 1<<12, make([]byte, 1<<12)
	rc := func() byte {
		if _i == 1<<12 {
			os.Stdin.Read(buf)
			_i = 0
		}
		b := buf[_i]
		_i++
		return b
	}
	ri := func() (x int) {
		b := rc()
		for ; '0' > b; b = rc() {
		}
		for ; '0' <= b; b = rc() {
			x = x*10 + int(b&15)
		}
		return
	}
	const M int = 1e5 + 1
	lpf := [M]int{}
	for i := 2; i < M; i++ {
		if lpf[i] == 0 {
			for j := i; j < M; j += i {
				if lpf[j] == 0 {
					lpf[j] = i
				}
			}
		}
	}

	n, q := ri(), ri()
	R := make([]int, M)
	for i := range R {
		R[i] = n
	}
	f := make([][17]int, n+1)
	for i := range f[n] {
		f[n][i] = n
	}
	a := make([]int, n)
	for i := range a {
		a[i] = ri()
	}
	for i, r := n-1, n; i >= 0; i-- {
		for x := a[i]; x > 1; {
			p := lpf[x]
			for x /= p; lpf[x] == p; x /= p {
			}
			if R[p] < r {
				r = R[p]
			}
			R[p] = i
		}
		f[i][0] = r
	}
	for i := n - 1; i >= 0; i-- {
		for j := 1; j < 17; j++ {
			f[i][j] = f[f[i][j-1]][j-1]
		}
	}
	for ; q > 0; q-- {
		l, r := ri()-1, ri()
		c := 0
		for j := 16; j >= 0; j-- {
			if f[l][j] < r {
				l = f[l][j]
				c |= 1 << j
			}
		}
		Fprintln(out, c+1)
	}
}

package main

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

// github.com/EndlessCheng/codeforces-go
func main() {
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	_i, buf := 1<<12, make([]byte, 1<<12)
	rc := func() byte {
		if _i == 1<<12 {
			os.Stdin.Read(buf)
			_i = 0
		}
		b := buf[_i]
		_i++
		return b
	}
	ri := func() (x int) {
		b := rc()
		for ; '0' > b; b = rc() {
		}
		for ; '0' <= b; b = rc() {
			x = x*10 + int(b&15)
		}
		return
	}
	const M int = 1e5 + 1
	lpf := [M]int{}
	for i := 2; i < M; i++ {
		if lpf[i] == 0 {
			for j := i; j < M; j += i {
				if lpf[j] == 0 {
					lpf[j] = i
				}
			}
		}
	}

	n, q := ri(), ri()
	R := make([]int, M)
	for i := range R {
		R[i] = n
	}
	f := make([][17]int, n+1)
	for i := range f[n] {
		f[n][i] = n
	}
	a := make([]int, n)
	for i := range a {
		a[i] = ri()
	}
	for i, r := n-1, n; i >= 0; i-- {
		for x := a[i]; x > 1; {
			p := lpf[x]
			for x /= p; lpf[x] == p; x /= p {
			}
			if R[p] < r {
				r = R[p]
			}
			R[p] = i
		}
		f[i][0] = r
	}
	for i := n - 1; i >= 0; i-- {
		for j := 1; j < 17; j++ {
			f[i][j] = f[f[i][j-1]][j-1]
		}
	}
	for ; q > 0; q-- {
		l, r := ri()-1, ri()
		c := 1
		for j := 16; j >= 0; j-- {
			if f[l][j] < r {
				l = f[l][j]
				c += 1 << j
			}
		}
		Fprintln(out, c)
	}
}

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

// github.com/EndlessCheng/codeforces-go
func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	const M int = 1e5 + 1
	lpf := [M]int{}
	for i := 2; i < M; i++ {
		if lpf[i] == 0 {
			for j := i; j < M; j += i {
				if lpf[j] == 0 {
					lpf[j] = i
				}
			}
		}
	}

	var n, q, l, r int
	Fscan(in, &n, &q)
	R := make([]int, M)
	for i := range R {
		R[i] = n
	}
	f := make([][17]int, n+1)
	for i := range f[n] {
		f[n][i] = n
	}
	a := make([]int, n)
	for i := range a {
		Fscan(in, &a[i])
	}
	for i, r := n-1, n; i >= 0; i-- {
		for x := a[i]; x > 1; {
			p := lpf[x]
			for x /= p; lpf[x] == p; x /= p {
			}
			if R[p] < r {
				r = R[p]
			}
			R[p] = i
		}
		f[i][0] = r
	}
	for i := n - 1; i >= 0; i-- {
		for j := 1; j < 17; j++ {
			f[i][j] = f[f[i][j-1]][j-1]
		}
	}
	for ; q > 0; q-- {
		Fscan(in, &l, &r)
		l--
		c := 1
		for j := 16; j >= 0; j-- {
			if f[l][j] < r {
				l = f[l][j]
				c += 1 << j
			}
		}
		Fprintln(out, c)
	}
}

package main

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

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

	const mx2 int = 1e5
	lpf := [mx2 + 1]int{1: 1}
	for i := 2; i <= mx2; i++ {
		if lpf[i] == 0 {
			for j := i; j <= mx2; j += i {
				if lpf[j] == 0 {
					lpf[j] = i
				}
			}
		}
	}

	var n, q, v int
	Fscan(in, &n, &q)
	a := make([][]int, n)
	for i := range a {
		Fscan(in, &v)
		if v == 1 {
			continue
		}
		x := v
		for x > 1 {
			p := lpf[x]
			a[i] = append(a[i], p)
			//ps[p] = append(ps[p], i)
			for x /= p; lpf[x] == p; x /= p {
			}
		}
	}

	const mx = 18
	f := make([][mx]int, n+10)
	for i := 0; i < mx; i++ {
		f[n][i] = n
	}

	rpos := make([]int, mx2+1)
	for i := 0; i <= mx2; i++ {
		rpos[i] = n
	}

	rr := n
	for i := len(a) - 1; i >= 0; i-- {
		pp := a[i]
		if len(pp) == 0 {
			f[i][0] = rr
		}
		for _, p := range pp {
			rr = min(rr, rpos[p])
			rpos[p] = i
		}
		f[i][0] = rr
	}

	//for i, pp := range a {
	//	if len(pp) == 0 {
	//		continue
	//	}
	//
	//	r := n
	//
	//
	//	f[i][0] = r
	//	for j := i - 1; j >= 0 && len(a[j]) == 0; j-- {
	//		f[j][0] = r
	//	}
	//}
	//
	//for i := n - 1; i >= 0 && len(a[i]) == 0; i-- {
	//	f[i][0] = n
	//}

	for i := n - 1; i >= 0; i-- {
		for j := 1; j < mx; j++ {
			f[i][j] = f[f[i][j-1]][j-1]
		}
	}

	for qi := 0; qi < q; qi++ {
		var l, r int
		Fscan(in, &l, &r)
		l--
		r--
		ans := 1
		for j := mx - 1; j >= 0; j-- {
			if f[l][j] <= r {
				l = f[l][j]
				ans += 1 << j
			}
		}
		Fprintln(out, ans)
	}
}

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

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

package main

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

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

}

func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}
func run(or io.Reader, ow io.Writer) {
	in := bufio.NewReader(or)
	out := bufio.NewWriter(ow)
	defer out.Flush()
	N := 100005
	g := make([][]int, N)
	for i := 1; i < N; i++ {
		if len(g[i]) <= 1 {
			for j := i; j < N; j += i {
				g[j] = append(g[j], i)
			}
		}
	}
	solve := func() {
		var n, q int
		fmt.Fscan(in, &n, &q)
		a := make([]int, n)
		pos := make([][]int, N)
		for i := 0; i < n; i++ {
			fmt.Fscan(in, &a[i])
			for _, j := range g[a[i]] {
				pos[j] = append(pos[j], i)
			}
		}
		jump := make([][]int, n+1)
		for i := 0; i <= n; i++ {
			jump[i] = make([]int, 20)
			for j := 0; j < 20; j++ {
				jump[i][j] = n
			}
		}
		for i := 2; i < N; i++ {
			for j := 0; j < len(pos[i])-1; j++ {
				jump[pos[i][j]][0] = min(jump[pos[i][j]][0], pos[i][j+1])
			}
		}
		for i := n - 1; i >= 0; i-- {
			jump[i][0] = min(jump[i][0], jump[i+1][0])
		}
		for j := 1; j < 20; j++ {
			for i := 0; i < n; i++ {
				jump[i][j] = jump[jump[i][j-1]][j-1]

			}
		}
		for ; q > 0; q-- {
			var l, r int
			fmt.Fscan(in, &l, &r)
			l--
			r--
			u := l
			ans := 1
			for i := 20 - 1; i >= 0; i-- {
				if jump[u][i] <= r {
				//	fmt.Fprint(out, u, "->", jump[u][i], " ")
					u = jump[u][i]
					ans += (1 << i)
				}
			}

			fmt.Fprintln(out, ans)

		}

	}

	T := 1
	//fmt.Fscan(in, &T)
	for o := 0; o < T; o++ {
		solve()
	}

}

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

package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	n, q := readTwoNums(reader)
	A := readNNums(reader, n)

	Q := make([][]int, q)

	for i := 0; i < q; i++ {
		Q[i] = readNNums(reader, 2)
	}

	res := solve(n, A, Q)
	var buf bytes.Buffer

	for i := 0; i < q; i++ {
		buf.WriteString(fmt.Sprintf("%d\n", res[i]))
	}
	fmt.Print(buf.String())
}

func readInt(bytes []byte, from int, val *int) int {
	i := from
	sign := 1
	if bytes[i] == '-' {
		sign = -1
		i++
	}
	tmp := 0
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + int(bytes[i]-'0')
		i++
	}
	*val = tmp * sign
	return i
}

func readNum(reader *bufio.Reader) (a int) {
	bs, _ := reader.ReadBytes('\n')
	readInt(bs, 0, &a)
	return
}

func readTwoNums(reader *bufio.Reader) (a int, b int) {
	res := readNNums(reader, 2)
	a, b = res[0], res[1]
	return
}

func readThreeNums(reader *bufio.Reader) (a int, b int, c int) {
	res := readNNums(reader, 3)
	a, b, c = res[0], res[1], res[2]
	return
}

func readNNums(reader *bufio.Reader, n int) []int {
	res := make([]int, n)
	x := 0
	bs, _ := reader.ReadBytes('\n')
	for i := 0; i < n; i++ {
		for x < len(bs) && (bs[x] < '0' || bs[x] > '9') && bs[x] != '-' {
			x++
		}
		x = readInt(bs, x, &res[i])
	}
	return res
}

func readUint64(bytes []byte, from int, val *uint64) int {
	i := from

	var tmp uint64
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + uint64(bytes[i]-'0')
		i++
	}
	*val = tmp

	return i
}

const H = 20

func solve(n int, A []int, Q [][]int) []int {
	ma := A[0]
	for i := 1; i < n; i++ {
		ma = max(ma, A[i])
	}

	pf := make([]int, ma+1)
	for i := 2; i <= ma; i++ {
		if pf[i] == 0 {
			for j := i; j <= ma; j += i {
				pf[j] = i
			}
		}
	}

	pos := make([]int, ma+1)

	for i := 0; i <= ma; i++ {
		pos[i] = n
	}

	next := make([]int, n+1)
	next[n] = n

	for i := n - 1; i >= 0; i-- {
		next[i] = n
		cur := A[i]
		for cur > 1 {
			next[i] = min(next[i], pos[pf[cur]])
			cur /= pf[cur]
		}
		next[i] = min(next[i], next[i+1])
		cur = A[i]
		for cur > 1 {
			pos[pf[cur]] = i
			cur /= pf[cur]
		}
	}

	dp := make([][]int, n+1)
	for i := n; i >= 0; i-- {
		dp[i] = make([]int, H)
		dp[i][0] = next[i]
		for j := 1; j < H; j++ {
			dp[i][j] = dp[dp[i][j-1]][j-1]
		}
	}

	ans := make([]int, len(Q))

	for i, cur := range Q {
		l, r := cur[0], cur[1]
		l--
		r--

		for j := H - 1; j >= 0; j-- {
			if dp[l][j] <= r {
				ans[i] += 1 << uint(j)
				l = dp[l][j]
			}
		}
		ans[i]++
	}
	return ans
}

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
}

package main

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

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

	const mx2 int = 1e5
	lpf := [mx2 + 1]int{1: 1}
	for i := 2; i <= mx2; i++ {
		if lpf[i] == 0 {
			for j := i; j <= mx2; j += i {
				if lpf[j] == 0 {
					lpf[j] = i
				}
			}
		}
	}

	ps := make([][]int, mx2+1)
	var n, q, v int
	Fscan(in, &n, &q)
	a := make([][]int, n)
	for i := range a {
		Fscan(in, &v)
		if v == 1 {
			continue
		}
		x := v
		for x > 1 {
			p := lpf[x]
			a[i] = append(a[i], p)
			ps[p] = append(ps[p], i)
			for x /= p; lpf[x] == p; x /= p {
			}
		}
	}

	const mx = 18
	f := make([][mx]int, n+10)
	for i := 0; i < mx; i++ {
		f[n][i] = n
	}

	for i, pp := range a {
		if len(pp) == 0 {
			continue
		}

		r := n
		for _, p := range pp {
			j := sort.SearchInts(ps[p], i+1)
			if j < len(ps[p]) {
				r = min(r, ps[p][j])
			}
		}

		f[i][0] = r
		for j := i - 1; j >= 0 && len(a[j]) == 0; j-- {
			f[j][0] = r
		}
	}

	for i := n - 1; i >= 0; i-- {
		for j := 1; j < mx; j++ {
			f[i][j] = f[f[i][j-1]][j-1]
		}
	}

	for qi := 0; qi < q; qi++ {
		var l, r int
		Fscan(in, &l, &r)
		l--
		r--
		ans := 1
		for j := mx - 1; j >= 0; j-- {
			if f[l][j] <= r {
				l = f[l][j]
				ans += 1 << j
			}
		}
		Fprintln(out, ans)
	}
}

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

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

package main

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

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

	const mx2 int = 1e5
	lpf := [mx2 + 1]int{1: 1}
	for i := 2; i <= mx2; i++ {
		if lpf[i] == 0 {
			for j := i; j <= mx2; j += i {
				if lpf[j] == 0 {
					lpf[j] = i
				}
			}
		}
	}

	ps := make([][]int, mx2+1)
	var n, q, v int
	Fscan(in, &n, &q)
	a := make([][]int, n)
	for i := range a {
		Fscan(in, &v)
		if v == 1 {
			continue
		}
		x := v
		for x > 1 {
			p := lpf[x]
			a[i] = append(a[i], p)
			ps[p] = append(ps[p], i)
			for x /= p; lpf[x] == p; x /= p {
			}
		}
	}

	const mx  = 18
	f := make([][mx]int, n)
	for i, pp := range a {
		if len(pp) == 0 {
			continue
		}

		r := n
		for _, p := range pp {
			j := sort.SearchInts(ps[p], i+1)
			if j < len(ps[p]) {
				r = min(r, ps[p][j])
			}
		}

		f[i][0] = r
		for j := i - 1; j >= 0 && len(a[j]) == 0; j-- {
			f[j][0] = r
		}
	}

	for j := 1; j < mx; j++ {
		for i := 0; i < n; i++ {
			if f[i][j-1] == n {
				f[i][j] = n
			} else {
				f[i][j] = f[f[i][j-1]][j-1]
			}
		}
	}

	for qi := 0; qi < q; qi++ {
		var l, r int
		Fscan(in, &l, &r)
		l--
		r--
		ans := 1
		for j := mx - 1; j >= 0; j-- {
			if f[l][j] <= r {
				l = f[l][j]
				ans += 1 << j
			}
		}
		Fprintln(out, ans)
	}
}

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

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

package main

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

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

}

func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}
func run(or io.Reader, ow io.Writer) {
	in := bufio.NewReader(or)
	out := bufio.NewWriter(ow)
	defer out.Flush()
	N := 100005
	g := make([][]int, N)
	for i := 1; i < N; i++ {
		if len(g[i]) <= 1 {
			for j := i; j < N; j += i {
				g[j] = append(g[j], i)
			}
		}
	}
	solve := func() {
		var n, q int
		fmt.Fscan(in, &n, &q)
		a := make([]int, n)
		pos := make([][]int, N)
		for i := 0; i < n; i++ {
			fmt.Fscan(in, &a[i])
			for _, j := range g[a[i]] {
				pos[j] = append(pos[j], i)
			}
		}
		jump := make([][]int, n+1)
		for i := 0; i <= n; i++ {
			jump[i] = make([]int, 20)
			for j := 0; j < 20; j++ {
				jump[i][j] = n
			}
		}
		for i := 2; i < N; i++ {
			for j := 0; j < len(pos[i])-1; j++ {
				jump[pos[i][j]][0] = min(jump[pos[i][j]][0], pos[i][j+1])
			}
		}
		for i := n - 1; i >= 0; i-- {
			jump[i][0] = min(jump[i][0], jump[i+1][0])
		}
		for j := 1; j < 20; j++ {
			for i := 0; i < n; i++ {
				jump[i][j] = jump[jump[i][j-1]][j-1]

			}
		}
		for ; q > 0; q-- {
			var l, r int
			fmt.Fscan(in, &l, &r)
			l--
			r--
			u := l
			ans := 1
			for i := 20 - 1; i >= 0; i-- {
				if jump[u][i] <= r {
					fmt.Fprint(out, u, "->", jump[u][i], " ")
					u = jump[u][i]
					ans += (1 << i)
				}
			}

			fmt.Fprintln(out, ans)

		}

	}

	T := 1
	//fmt.Fscan(in, &T)
	for o := 0; o < T; o++ {
		solve()
	}

}

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

package main

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

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

}

func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}
func run(or io.Reader, ow io.Writer) {
	in := bufio.NewReader(or)
	out := bufio.NewWriter(ow)
	defer out.Flush()
	N := 100005
	g := make([][]int, N)
	for i := 1; i < N; i++ {
		if len(g[i]) <= 1 {
			for j := i; j < N; j += i {
				g[j] = append(g[j], i)
			}
		}
	}
	solve := func() {
		var n, q int
		fmt.Fscan(in, &n, &q)
		a := make([]int, n)
		pos := make([][]int, N)
		for i := 0; i < n; i++ {
			fmt.Fscan(in, &a[i])
			for _, j := range g[a[i]] {
				pos[j] = append(pos[j], i)
			}
		}
		jump := make([][]int, n+1)
		for i := 0; i <= n; i++ {
			jump[i] = make([]int, 20)
			for j := 0; j < 20; j++ {
				jump[i][j] = n
			}
		}
		for i := 2; i < N; i++ {
			for j := 0; j < len(pos[i])-1; j++ {

				jump[pos[i][j]][0] = min(jump[pos[i][j]][0], pos[i][j+1])
			}

		}
		for j := 1; j < 20; j++ {
			for i := 0; i < n; i++ {
				jump[i][j] = jump[jump[i][j-1]][j-1]

			}
		}
		for ; q > 0; q-- {
			var l, r int
			fmt.Fscan(in, &l, &r)
			l--
			r--
			u := l
			ans := 1
			for i := 20 - 1; i >= 0; i-- {
				if jump[u][i] <= r {
					//fmt.Fprint(out, u, "->", jump[u][i], " ")
					u = jump[u][i]
					ans += (1 << i)
				}
			}

			fmt.Fprintln(out, ans)

		}

	}

	T := 1
	//fmt.Fscan(in, &T)
	for o := 0; o < T; o++ {
		solve()
	}

}

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


package main

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

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

func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func print(a ...interface{})            { fmt.Fprint(writer, a...) }
func scanf(f string, a ...interface{})  { fmt.Fscanf(reader, f, a...) }
func scan(a ...interface{})             { fmt.Fscan(reader, a...) }

func main() {
	defer writer.Flush() // STDOUT MUST BE FLUSHED MANUALLY!!!
	var x uint32
	scan(&x)
	curBit := uint32(31)
	op := 0
	var ch []uint32

	// Trim leading zeroes
	for {
		if curBit == 0 || (x&(1<<curBit)) != 0 {
			break
		}
		x &^= 1 << curBit
		curBit--
	}

	for {
		// Check if X is compliant
		lm := uint32((1 << (curBit + 1)) - 1)
		if x == lm {
			break
		}

		// Trim leading 1.
		if (x & (1 << curBit)) != 0 {
			x &^= 1 << curBit
			curBit--

			if curBit != 0 {
				continue
			}
		}

		// Flip
		ch = append(ch, curBit+1)
		xor := uint32((1 << (curBit + 1)) - 1)
		x ^= xor
		op++

		// Check Limit
		lm = uint32((1 << (curBit + 1)) - 1)
		if x == lm {
			break
		}
		x++
		op++
	}

	print(op, "\n")
	for idx, val := range ch {
		if idx == 0 {
			print(val)
		} else {
			print(" ", val)
		}
	}
	if len(ch) != 0 {
		print("\n")
	}
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	n := 0
	fmt.Fscanf(in, "%d\n", &n)
	ans := 0
	a := make([]int, 0)
	cur := n
	for true {
		if cur == 1 {
			fmt.Fprintf(out, "%d\n", ans)
			for i := 0; i < len(a)-1; i++ {
				fmt.Fprintf(out, "%d ", a[i])
			}
			if len(a) > 0 {
				fmt.Fprintf(out, "%d", a[len(a)-1])
				fmt.Fprintf(out, "\n")
			}
			return
		}
		q := 1
		cnt := 1
		for q < cur {
			q++
			q *= 2
			q--
			cnt++
		}
		if q == cur {
			fmt.Fprintf(out, "%d\n", ans)
			for i := 0; i < len(a)-1; i++ {
				fmt.Fprintf(out, "%d ", a[i])
			}
			if len(a) > 0 {
				fmt.Fprintf(out, "%d", a[len(a)-1])
				fmt.Fprintf(out, "\n")
			}
			return
		}
		if cur*2 == q+1 {
			ans++
			a = append(a, cnt)
			fmt.Fprintf(out, "%d\n", ans)
			for i := 0; i < len(a)-1; i++ {
				fmt.Fprintf(out, "%d ", a[i])
			}
			if len(a) > 0 {
				fmt.Fprintf(out, "%d", a[len(a)-1])
				fmt.Fprintf(out, "\n")
			}
			return
		}
		cur ^= q
		cur++
		ans += 2
		a = append(a, cnt)
	}
	return
}

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

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

package main

import (
	"fmt"
	"math"
)

func main() {
	var x int
	fmt.Scanf("%d", &x)
	nTimes, ans := solve(x)

	fmt.Println(nTimes)
	for i := 0; i < len(ans); i++ {
		fmt.Printf("%d ", ans[i])
	}

	fmt.Println()
}

func solve(x int) (int, []int) {
	ans := make([]int, 0, 0)
	nTimes := 0

	for !areAllBitsSet(x) {
		// fmt.Println("[slv]", x)
		fZero := fixZeroLeft(x)
		allOnes := (1 << uint(fZero+1)) - 1

		x = x ^ allOnes
		ans = append(ans, fZero+1)
		nTimes++
		if areAllBitsSet(x) {
			return nTimes, ans
		}

		x++
		// fmt.Println(x)
		nTimes++
	}

	return nTimes, ans
}

func areAllBitsSet(x int) bool {
	if x == 0 {
		return false
	}

	for x > 0 {
		// fmt.Println("[aabs]", x)
		if (x & 1) == 0 {
			return false
		}

		x = x >> 1
	}

	return true
}

func fixZeroLeft(x int) int {
	power := log2(x)

	var i uint
	for i = uint(power); i >= 0; i-- {
		if nBitOff(x, i) {
			return int(i)
		}
	}

	return power
}

func nBitOff(x int, n uint) bool {
	return (x & (1 << n)) == 0
}

func log2(x int) int {
	return int(math.Log(float64(x)) / math.Log(2))
}


package main

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"math/big"
	"os"
	"sort"
)

var n int
var a [200200]int32
var b = make([]int32, 200200)
var cnt [800200]int32
var sum [800200]int64

func insert(x int32, id, k, l, r int) {
	if l == r {
		sum[k] += int64(x)
		cnt[k]++
	} else {
		m := (l + r) / 2
		if id > m {
			insert(x, id, k<<1|1, m+1, r)
		} else {
			insert(x, id, k<<1, l, m)
		}
		sum[k] = sum[k<<1|1] + sum[k<<1]
		cnt[k] = cnt[k<<1|1] + cnt[k<<1]
	}
}

func query(k, l, r, ql, qr int) (s int64, c int32) {
	if ql <= l && r <= qr {
		return sum[k], cnt[k]
	}
	m := (l + r) / 2
	if ql <= m {
		ts, tc := query(k<<1, l, m, ql, qr)
		s += ts
		c += tc
	}
	if qr > m {
		ts, tc := query(k<<1|1, m+1, r, ql, qr)
		s += ts
		c += tc
	}
	return s, c
}

func lower_bound(a []int32, x int32) int {
	var l, m int
	var r = len(a) - 1
	for l < r {
		//fmt.Println(l, r, a[l], x)
		m = r - (r-l)/2
		if a[m] > x {
			r = m - 1
		} else {
			l = m
		}
	}
	return l
}

func main() {
	buf, _ := ioutil.ReadAll(os.Stdin)
	file := bytes.NewReader(buf)
	fmt.Fscan(file, &n)
	for i := 1; i <= n; i++ {
		fmt.Fscan(file, &a[i])
		b[i] = a[i]
	}
	b[0] = -999999999
	b[n+1] = 2000000000
	tmp := b[:n+2]
	sort.Slice(tmp, func(i, j int) bool {
		return tmp[i] < tmp[j]
	})
	var difn = 1
	for i, _ := range tmp {
		if i == 0 {
			continue
		}
		if tmp[i] == tmp[i-1] {
			continue
		}
		b[difn] = tmp[i]
		difn++
	}
	/*for i := 0; i < difn; i++ {
		fmt.Println("i:", i, "a[i]:", a[i], "b[i]:", b[i], "tmp[i]:", tmp[i])
	}*/
	var ans = big.NewInt(0)
	b = tmp[:difn]
	for i := n; i > 0; i-- {
		i1 := lower_bound(b, a[i]+1)
		i2 := lower_bound(b, a[i]-2)
		s, c := query(1, 1, difn, 1, difn)
		s1, c1 := query(1, 1, difn, 1, i1+1) //<= a[i]+1的第一个
		ans.Add(ans, big.NewInt(s-s1-int64(a[i])*int64(c-c1)))
		//fmt.Println("sum:", s, s1, "cnt:", c, c1, "ans:", ans, "difn:", difn)
		s, c = query(1, 1, difn, 1, i2+1) //<= a[i]-2的第一个
		ans.Sub(ans, big.NewInt(int64(c)*int64(a[i])-s))
		//fmt.Println("sum:", s, "cnt:", c, "ans:", ans)
		i3 := lower_bound(b, a[i])
		//fmt.Println("i:", i, "a[i]:", a[i], "i1:", i1, "i2:", i2, "i3:", i3, "ans:", ans)
		insert(a[i], i3+1, 1, 1, difn)
	}
	fmt.Println(ans)
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"math/big"
)

func main() {
	stdin := bufio.NewReader(os.Stdin)
	stdout := bufio.NewWriter(os.Stdout)

	for true {
		var n int
		if _, err := fmt.Fscan(stdin, &n); err != nil {
			break
		}
		a := make([]int, n)
		for i := 0; i < n; i++ {
			fmt.Fscan(stdin, &a[i])
		}
		sum := make([]int64, n)
		sum[0] = int64(a[0])
		for i := 1; i < n; i++ {
			sum[i] = sum[i-1] + int64(a[i])
		}
		count := make(map[int]int)
		res := big.NewInt(0)
		for i := 0; i < n; i++ {
			if i > 0 {
				prevCount := i
				prevSum := sum[i-1]
				minusOneCount := count[a[i]-1]
				plusOneCount := count[a[i]+1]
				//fmt.Printf("prevSum %d\n", prevSum)
				prevSum -= int64(minusOneCount) * int64(a[i] - 1) +
					int64(plusOneCount) * int64(a[i] + 1)
				prevCount -= minusOneCount + plusOneCount
				t := int64(prevCount) * int64(a[i]) - prevSum
				res.Add(res, big.NewInt(t))
				//fmt.Printf("minusOneCount %d, plus %d, prev %d\n", minusOneCount, plusOneCount, prevCount)
				//fmt.Printf("i = %d, prevCount %d, prevSum %d, t %d, res %d\n",
				//	i, prevCount, prevSum, t, res)
			}
			count[a[i]]++
		}
		fmt.Fprintf(stdout, "%s\n", res.String())
	}
	stdout.Flush()
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"math/big"
	"os"
)

// github.com/EndlessCheng/codeforces-go
func CF903D(_r io.Reader, out io.Writer) {
	in := bufio.NewReader(_r)
	var n, y, s int64
	ans := &big.Int{}
	cnt := map[int64]int64{}
	Fscan(in, &n)
	for i := int64(0); i < n; i++ {
		Fscan(in, &y)
		ans.Add(ans, big.NewInt(i*y-s))
		for x := y - 1; x <= y+1; x++ {
			ans.Sub(ans, big.NewInt(cnt[x]*(y-x)))
		}
		s += y
		cnt[y]++
	}
	Fprint(out, ans)
}

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

package main

import (
	"bufio"
	"fmt"
	"math/big"
	"os"
	"strconv"
	"strings"
)

const (
	MAX = 2e5 + 10
)

var a []int64 = make([]int64, MAX)
var c []int64 = make([]int64, MAX)

func main() {
	bio := bufio.NewReader(os.Stdin)
	line, _ := bio.ReadString('\n')
	line = strings.TrimSpace(line)
	n, _ := strconv.ParseInt(line, 10, 64)

	line, _ = bio.ReadString('\n')
	line = strings.TrimSpace(line)

	strs := strings.Split(line, " ")

	for i, str := range strs {
		a[i], _ = strconv.ParseInt(str, 10, 64)
	}

	M := make(map[int64]int64)

	var cnt int64 = 1

	ans := big.NewInt(0)
	inc := big.NewInt(0)
	bbb := big.NewInt(0)

	for i := n - 1; i >= 0; i-- {
		tmp := a[i]
		if M[tmp] == 0 {
			M[tmp] = cnt
			cnt++
		}
		u := M[tmp]

		c[u]++

		inc.Add(inc, big.NewInt(tmp))

		p := int64(-1) * tmp * (n - i)

		ans.Add(ans, bbb.Add(inc, big.NewInt(p)))

		if M[tmp-1] != 0 {
			v := M[tmp-1]
			ans.Add(ans, big.NewInt(c[v]))
		}

		if M[tmp+1] != 0 {
			v := M[tmp+1]
			ans.Add(ans, big.NewInt(-c[v]))
		}

	}

	fmt.Println(ans.String())

}

package main

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"math/big"
	"os"
	"sort"
)

var a, cnt [200200]int32
var bit [200200]int64
var b = make([]int32, 200200)
var n int

func sum(x int) (rec int64, c int32) {
	for x > 0 {
		rec += bit[x]
		c += cnt[x]
		x -= x & -x
	}
	return rec, c
}

func add(x, n int, num int32) {
	for x <= n {
		bit[x] += int64(num)
		cnt[x]++
		x += x & -x
	}
}

func upper(a []int32, x int32) int {
	var l, m int
	var r = len(a) - 1
	for l < r {
		//fmt.Println(l, r, a[l], x)
		m = r - (r-l)/2
		if a[m] > x {
			r = m - 1
		} else {
			l = m
		}
	}
	return l
}

func main() {
	buf, _ := ioutil.ReadAll(os.Stdin)
	in := bytes.NewReader(buf)
	fmt.Fscan(in, &n)
	for i := 1; i <= n; i++ {
		fmt.Fscan(in, &a[i])
		b[i] = a[i]
	}
	tmp := b
	b = b[1 : n+1 : n+1]
	sort.SliceStable(b, func(i, j int) bool {
		return b[i] < b[j]
	})
	var difn = 1
	for i, _ := range b {
		//fmt.Println("after sort:", i, b[i])
		if i == 0 {
			continue
		}
		if b[i] == b[i-1] {
			continue
		}
		b[difn] = b[i]
		difn++
	}
	difn++
	b = tmp[:difn]
	b[0] = -999999999
	/*for i, _ := range b {
		fmt.Println("after unique:", i, b[i])
	}*/
	var ans = big.NewInt(0)
	for i := n; i > 0; i-- {
		i1 := upper(b, a[i]+1)
		i2 := upper(b, a[i]-2)
		s, c := sum(difn)
		s1, c1 := sum(i1 + 1) //<= a[i]+1的第一个
		ans.Add(ans, big.NewInt(s-s1-int64(a[i])*int64(c-c1)))
		//fmt.Println("sum:", s, s1, "cnt:", c, c1, "ans:", ans, "difn:", difn)
		s, c = sum(i2 + 1) //<= a[i]-2的第一个
		ans.Sub(ans, big.NewInt(int64(c)*int64(a[i])-s))
		//fmt.Println("sum:", s, "cnt:", c, "ans:", ans)
		i3 := upper(b, a[i])
		//fmt.Println("i:", i, "a[i]:", a[i], "i1:", i1, "i2:", i2, "i3:", i3, "ans:", ans)
		add(i3+1, difn, b[i3])
	}
	fmt.Println(ans)
}

package main

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"math/big"
	"os"
	"sort"
)

var a, cnt [200200]int32
var bit [200200]int64
var b = make([]int32, 200200)
var n int

func sum(x int) (rec int64, c int32) {
	for x > 0 {
		rec += bit[x]
		c += cnt[x]
		x -= x & -x
	}
	return rec, c
}

func add(x, n int, num int32) {
	for x <= n {
		bit[x] += int64(num)
		cnt[x]++
		x += x & -x
	}
}

func upper(a []int32, x int32) int {
	var l, m int
	var r = len(a) - 1
	for l < r {
		//fmt.Println(l, r, a[l], x)
		m = r - (r-l)/2
		if a[m] > x {
			r = m - 1
		} else {
			l = m
		}
	}
	return l
}

func main() {
	buf, _ := ioutil.ReadAll(os.Stdin)
	in := bytes.NewReader(buf)
	fmt.Fscan(in, &n)
	for i := 1; i <= n; i++ {
		fmt.Fscan(in, &a[i])
		b[i] = a[i]
	}
	tmp := b
	b = b[1 : n+1 : n+1]
	sort.SliceStable(b, func(i, j int) bool {
		return b[i] < b[j]
	})
	var difn = 1
	for i, _ := range b {
		//fmt.Println("after sort:", i, b[i])
		if i == 0 {
			continue
		}
		if b[i] == b[i-1] {
			continue
		}
		b[difn] = b[i]
		difn++
	}
	difn++
	b = tmp[:difn]
	b[0] = -999999999
	/*for i, _ := range b {
		fmt.Println("after unique:", i, b[i])
	}*/
	var ans = big.NewInt(0)
	for i := n; i > 0; i-- {
		i1 := upper(b, a[i]+1)
		i2 := upper(b, a[i]-2)
		s, c := sum(difn)
		s1, c1 := sum(i1 + 1) //<= a[i]+1的第一个
		ans.Add(ans, big.NewInt(s-s1-int64(a[i])*int64(c-c1)))
		//fmt.Println("sum:", s, s1, "cnt:", c, c1, "ans:", ans, "difn:", difn)
		s, c = sum(i2 + 1) //<= a[i]-2的第一个
		ans.Sub(ans,big.NewInt(int64(c)*int64(a[i]) - s))
		//fmt.Println("sum:", s, "cnt:", c, "ans:", ans)
		i3 := upper(b, a[i])
		//fmt.Println("i:", i, "a[i]:", a[i], "i1:", i1, "i2:", i2, "i3:", i3, "ans:", ans)
		add(i3+1, difn, b[i3])
	}
	fmt.Println(ans)
}

package main

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

var n int
var mp = make(map[int32]int32, 200200)

func main() {
	buf, _ := ioutil.ReadAll(os.Stdin)
	in := bytes.NewReader(buf)
	fmt.Fscan(in, &n)
	var sum int64
	var x int32
	ans := big.NewInt(0)
	for i := 0; i < n; i++ {
		fmt.Fscan(in, &x)
		ans.Add(ans, big.NewInt(int64(i)*int64(x)-sum-int64(mp[x-1]-mp[x+1])))
		sum += int64(x)
		mp[x]++
	}
	fmt.Println(ans)
}

package main

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

var a, cnt [200200]int32
var bit [200200]int64
var b = make([]int32, 200200)
var n int

func sum(x int) (rec int64, c int32) {
	for x > 0 {
		rec += bit[x]
		c += cnt[x]
		x -= x & -x
	}
	return rec, c
}

func add(x, n int, num int32) {
	for x <= n {
		bit[x] += int64(num)
		cnt[x]++
		x += x & -x
	}
}

func upper(a []int32, x int32) int {
	var l, m int
	var r = len(a) - 1
	for l < r {
		//fmt.Println(l, r, a[l], x)
		m = r - (r-l)/2
		if a[m] > x {
			r = m - 1
		} else {
			l = m
		}
	}
	return l
}

func main() {
	buf, _ := ioutil.ReadAll(os.Stdin)
	in := bytes.NewReader(buf)
	fmt.Fscan(in, &n)
	for i := 1; i <= n; i++ {
		fmt.Fscan(in, &a[i])
		b[i] = a[i]
	}
	tmp := b
	b = b[1 : n+1 : n+1]
	sort.SliceStable(b, func(i, j int) bool {
		return b[i] < b[j]
	})
	var difn = 1
	for i, _ := range b {
		//fmt.Println("after sort:", i, b[i])
		if i == 0 {
			continue
		}
		if b[i] == b[i-1] {
			continue
		}
		b[difn] = b[i]
		difn++
	}
	difn++
	b = tmp[:difn]
	b[0] = -999999999
	/*for i, _ := range b {
		fmt.Println("after unique:", i, b[i])
	}*/
	var ans int64
	for i := n; i > 0; i-- {
		i1 := upper(b, a[i]+1)
		i2 := upper(b, a[i]-2)
		s, c := sum(difn)
		s1, c1 := sum(i1 + 1) //<= a[i]+1的第一个
		ans += s - s1 - int64(a[i]*(c-c1))
		//fmt.Println("sum:", s, s1, "cnt:", c, c1, "ans:", ans, "difn:", difn)
		s, c = sum(i2 + 1) //<= a[i]-2的第一个
		ans -= int64(c*a[i]) - s
		//fmt.Println("sum:", s, "cnt:", c, "ans:", ans)
		i3 := upper(b, a[i])
		//fmt.Println("i:", i, "a[i]:", a[i], "i1:", i1, "i2:", i2, "i3:", i3, "ans:", ans)
		add(i3+1, difn, b[i3])
	}
	fmt.Println(ans)
}

package main

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"math/big"
	"os"
	"sort"
)

var a, cnt [200200]int32
var bit [200200]int64
var b = make([]int32, 200200)
var n int

func sum(x int) (rec int64, c int32) {
	for x > 0 {
		rec += bit[x]
		c += cnt[x]
		x -= x & -x
	}
	return rec, c
}

func add(x, n int, num int32) {
	for x <= n {
		bit[x] += int64(num)
		cnt[x]++
		x += x & -x
	}
}

func upper(a []int32, x int32) int {
	var l, m int
	var r = len(a) - 1
	for l < r {
		//fmt.Println(l, r, a[l], x)
		m = r - (r-l)/2
		if a[m] > x {
			r = m - 1
		} else {
			l = m
		}
	}
	return l
}

func main() {
	buf, _ := ioutil.ReadAll(os.Stdin)
	in := bytes.NewReader(buf)
	fmt.Fscanf(in, "%d", &n)
	for i := 1; i <= n; i++ {
		fmt.Fscanf(in, "%d", &a[i])
		b[i] = a[i]
	}
	tmp := b
	b = b[1 : n+1 : n+1]
	sort.SliceStable(b, func(i, j int) bool {
		return b[i] < b[j]
	})
	var difn = 1
	for i, _ := range b {
		//fmt.Println("after sort:", i, b[i])
		if i == 0 {
			continue
		}
		if b[i] == b[i-1] {
			continue
		}
		b[difn] = b[i]
		difn++
	}
	difn++
	b = tmp[:difn]
	b[0] = -999999999
	/*for i, _ := range b {
		fmt.Println("after unique:", i, b[i])
	}*/
	var ans = big.NewInt(0)
	for i := n; i > 0; i-- {
		i1 := upper(b, a[i]+1)
		i2 := upper(b, a[i]-2)
		s, c := sum(difn)
		s1, c1 := sum(i1 + 1) //<= a[i]+1的第一个
		ans.Add(ans, big.NewInt(s-s1-int64(a[i])*int64(c-c1)))
		//fmt.Println("sum:", s, s1, "cnt:", c, c1, "ans:", ans, "difn:", difn)
		s, c = sum(i2 + 1) //<= a[i]-2的第一个
		ans.Sub(ans, big.NewInt(int64(c)*int64(a[i])-s))
		//fmt.Println("sum:", s, "cnt:", c, "ans:", ans)
		i3 := upper(b, a[i])
		//fmt.Println("i:", i, "a[i]:", a[i], "i1:", i1, "i2:", i2, "i3:", i3, "ans:", ans)
		add(i3+1, difn, b[i3])
	}
	fmt.Println(ans)
}

package main

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

var a, cnt [200200]int32
var bit [200200]int64
var b = make([]int32, 200200)
var n int

func sum(x int) (rec int64, c int32) {
	for x > 0 {
		rec += bit[x]
		c += cnt[x]
		x -= x & -x
	}
	return rec, c
}

func add(x, n int, num int32) {
	for x <= n {
		bit[x] += int64(num)
		cnt[x]++
		x += x & -x
	}
}

func upper(a []int32, x int32) int {
	var l, m int
	var r = len(a) - 1
	for l < r {
		//fmt.Println(l, r, a[l], x)
		m = r - (r-l)/2
		if a[m] > x {
			r = m - 1
		} else {
			l = m
		}
	}
	return l
}

func main() {
	buf, _ := ioutil.ReadAll(os.Stdin)
	in := bytes.NewReader(buf)
	fmt.Fscan(in, &n)
	for i := 1; i <= n; i++ {
		fmt.Fscan(in, &a[i])
		b[i] = a[i]
	}
	tmp := b
	b = b[1 : n+1 : n+1]
	sort.SliceStable(b, func(i, j int) bool {
		return b[i] < b[j]
	})
	var difn = 1
	for i, _ := range b {
		//fmt.Println("after sort:", i, b[i])
		if i == 0 {
			continue
		}
		if b[i] == b[i-1] {
			continue
		}
		b[difn] = b[i]
		difn++
	}
	difn++
	b = tmp[:difn]
	b[0] = -999999999
	/*for i, _ := range b {
		fmt.Println("after unique:", i, b[i])
	}*/
	var ans int64
	for i := n; i > 0; i-- {
		i1 := upper(b, a[i]+1)
		i2 := upper(b, a[i]-2)
		s, c := sum(difn)
		s1, c1 := sum(i1 + 1) //<= a[i]+1的第一个
		ans += s - s1 - int64(a[i])*int64(c-c1)
		//fmt.Println("sum:", s, s1, "cnt:", c, c1, "ans:", ans, "difn:", difn)
		s, c = sum(i2 + 1) //<= a[i]-2的第一个
		ans -= int64(c)*int64(a[i]) - s
		//fmt.Println("sum:", s, "cnt:", c, "ans:", ans)
		i3 := upper(b, a[i])
		//fmt.Println("i:", i, "a[i]:", a[i], "i1:", i1, "i2:", i2, "i3:", i3, "ans:", ans)
		add(i3+1, difn, b[i3])
	}
	fmt.Println(ans)
}

package main

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

var a, cnt [200200]int32
var bit [200200]int64
var b = make([]int32, 200200)
var n int

func sum(x int) (rec int64, c int32) {
	for x != 0 {
		rec += bit[x]
		c += cnt[x]
		x -= x & -x
	}
	return rec, c
}

func add(x int, num int32) {
	for x <= n {
		bit[x] += int64(num)
		cnt[x]++
		x += x & -x
	}
}

func upper(a []int32, x int32) int {
	var l, m int
	var r = len(a) - 1
	for l < r {
		//fmt.Println(l, r, a[l], x)
		m = r - (r-l)/2
		if a[m] > x {
			r = m - 1
		} else {
			l = m
		}
	}
	return l
}

func main() {
	buf, _ := ioutil.ReadAll(os.Stdin)
	in := bytes.NewReader(buf)
	fmt.Fscan(in, &n)
	for i := 1; i <= n; i++ {
		fmt.Fscan(in, &a[i])
		b[i] = a[i]
	}
	tmp := b
	b = b[1 : n+1 : n+1]
	sort.SliceStable(b, func(i, j int) bool {
		return b[i] < b[j]
	})
	var difn = 1
	for i, _ := range b {
		//fmt.Println("after sort:", i, b[i])
		if i == 0 {
			continue
		}
		if b[i] == b[i-1] {
			continue
		}
		b[difn] = b[i]
		difn++
	}
	difn++
	b = tmp[:difn]
	b[0] = -999999999
	/*for i, _ := range b {
		fmt.Println("after unique:", i, b[i])
	}*/
	var ans int64
	for i := n; i > 0; i-- {
		i1 := upper(b, a[i]+1)
		i2 := upper(b, a[i]-2)
		s, c := sum(difn)
		ans += s - int64(c*a[i])
		//fmt.Println("sum:", s, "cnt:", c, "ans:", ans)
		s, c = sum(i1 + 1)
		ans -= s - int64(c*a[i])
		//fmt.Println("sum:", s, "cnt:", c, "ans:", ans)
		s, c = sum(i2 + 1)
		ans += s - int64(c*a[i])
		//fmt.Println("sum:", s, "cnt:", c, "ans:", ans)
		i3 := upper(b, a[i])
		//fmt.Println("i:", i, "a[i]:", a[i], "i1:", i1, "i2:", i2, "i3:", i3, "ans:", ans)
		add(i3+1, b[i3])
	}
	fmt.Println(ans)
}

package main

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

func main() {
	stdin := bufio.NewReader(os.Stdin)
	stdout := bufio.NewWriter(os.Stdout)

	for true {
		var n int
		if _, err := fmt.Fscan(stdin, &n); err != nil {
			break
		}
		a := make([]int, n)
		for i := 0; i < n; i++ {
			fmt.Fscan(stdin, &a[i])
		}
		sum := make([]int64, n)
		sum[0] = int64(a[0])
		for i := 1; i < n; i++ {
			sum[i] = sum[i-1] + int64(a[i])
		}
		count := make(map[int]int)
		res := int64(0)
		for i := 0; i < n; i++ {
			if i > 0 {
				prevCount := i
				prevSum := sum[i-1]
				minusOneCount := count[a[i]-1]
				plusOneCount := count[a[i]+1]
				//fmt.Printf("prevSum %d\n", prevSum)
				prevSum -= int64(minusOneCount) * int64(a[i] - 1) +
					int64(plusOneCount) * int64(a[i] + 1)
				prevCount -= minusOneCount + plusOneCount
				t := int64(prevCount) * int64(a[i]) - prevSum
				res += t
				//fmt.Printf("minusOneCount %d, plus %d, prev %d\n", minusOneCount, plusOneCount, prevCount)
				//fmt.Printf("i = %d, prevCount %d, prevSum %d, t %d, res %d\n",
				//	i, prevCount, prevSum, t, res)
			}
			count[a[i]]++
		}
		fmt.Fprintf(stdout, "%d\n", res)
	}
	stdout.Flush()
}

package main

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

// github.com/EndlessCheng/codeforces-go
func CF903D(_r io.Reader, out io.Writer) {
	in := bufio.NewReader(_r)
	var n, v, ans, s int64
	cnt := map[int64]int64{}
	Fscan(in, &n)
	for i := int64(0); i < n; i++ {
		Fscan(in, &v)
		ans += i*v - s
		for j := v - 1; j <= v+1; j++ {
			c := cnt[j]
			ans -= c * (v - j)
		}
		s += v
		cnt[v]++
	}
	Fprint(out, ans)
}

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


package main

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

func main() {
	cin := bufio.NewReader(os.Stdin)
	var t int
	fmt.Fscan(cin, &t)
	for i := 0; i < t; i++ {
		var s string
		fmt.Fscan(cin, &s)
		s = strings.ToUpper(s)
		if s == "YES" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"strings"
)

import (
	"bufio"
	"os"
)

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

func ReadInt() int{
	var i int
	fmt.Fscan(in, &i)
	return i
}

func ReadIntArray(N int) []int{
	ans := make([]int, N)
	for i := 0; i < N; i++{
		fmt.Fscan(in, &ans[i])
	}
	return ans
}

func ReadString() string{
	var s string
	fmt.Fscan(in, &s)
	return s
}

func ReadStringArray(N int) []string{
	ans := make([]string, N)
	for i := 0; i < N; i++{
		fmt.Fscan(in, &ans[i])
	}
	return ans
}

func main(){
	defer out.Flush()
	testCases := ReadInt()
	for ; testCases > 0; testCases--{
		S := ReadString()
		ans := "YES"
		if strings.ToLower(S) != "yes"{
			ans = "NO"
		}
		fmt.Fprintln(out, ans)
	}
}

package main

import (
	"fmt"
	"strings"
)

func ReadInt() int{
	var i int
	fmt.Scanf("%d\n", &i)
	return i
}

func ReadArray(N int) []int{
	ans := make([]int, N)
	for i := 0; i < N; i++{
		fmt.Scanf("%d", &ans[i])
	}
	return ans
}

func ReadString() string{
	var s string
	fmt.Scanf("%s\n", &s)
	return s
}

func main(){
	testCases := ReadInt()
	for ; testCases > 0; testCases--{
		s := ReadString()
		ans := "NO"
		if strings.ToLower(s) == "yes"{
			ans = "YES"
		}
		fmt.Println(ans)
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var t int
	fmt.Scanf("%d\n", &t)
	input := make([]string, t)
	for i := range input {
		fmt.Scanf("%s\n", &input[i])
	}
	for _, v := range input {
		if strings.ToLower(v) == "yes" {
			fmt.Println("YES")
			continue
		}
		fmt.Println("NO")
	}
}

package main

import (
    "fmt"
    "strings"
)

func main() {
    tt := 0
    fmt.Scan(&tt)
    var s string
    for i := 1; i <= tt; i++ {
        fmt.Scan(&s)
        s = strings.ToLower(s)
        if s == "yes" {
            fmt.Println("YES")
        } else {
            fmt.Println("NO")
        }
    }

}

package main

import (
    "fmt"
    "strings"
)

func main() {
    tt := 0
    fmt.Scan(&tt)
    var str string
    for i := 1; i <= tt; i++ {
        fmt.Scan(&str)
        str = strings.ToLower(str)
        if str == "yes" {
            fmt.Println("YES")
        } else {
            fmt.Println("NO")
        }
    }

}

// To execute Go code, please declare a func main() in a package "main"

package main

import (
	"fmt"
	"strings"
)

func main() {
	n := 0
	fmt.Scanln(&n)
	 result := []string{}
	for i := 0; i < n; i++ {
		var input string
		fmt.Scanln(&input)
		if strings.ToLower(input) == "yes" {
			result = append(result, "YES")
		} else {
			result = append(result, "NO")
		}
	}

	for i := 0; i < n; i++ {
		fmt.Printf("%s\n",result[i])
	}
}

package main

import (
	"fmt"
	"strings"
)

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

package main

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

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

func solve() {
	s := _readStr()
	if strings.EqualFold(s, "yes") {
		_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)
}

// You can edit this code!
// Click here and start typing.
package main

import (
	"fmt"
	"strings"
)

func main() {
	var n int
	fmt.Scan(&n)

	for i := 0; i < n; i++ {
		var s string
		fmt.Scan(&s)
		if strings.ToUpper(s) == "YES" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var i int
	fmt.Scan(&i)
	var lawda string
	for i != 0 {
		fmt.Scan(&lawda)
		if strings.ToLower(lawda) == "yes" {
			fmt.Println("YES")
		}else {
			fmt.Println("NO")
		}
		i--
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var t int
	fmt.Scan(&t)

	for i := 0; i < t; i++ {
		var s string

		fmt.Scan(&s)

		if strings.ToUpper(s) == "YES" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var (
		t int
		s string
	)
	fmt.Scanf("%d\n", &t)
	for i := 0; i < t; i++ {
		fmt.Scanf("%s\n", &s)
		s = strings.ToLower(s)
		if s == "yes" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var n int
	var s string
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		fmt.Scan(&s)
		s = strings.ToLower(s)
		if s == "yes" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"strings"
)

// https://codeforces.com/problemset/problem/1703/A
func main() {
	var t int
	_, _ = fmt.Scan(&t)
	for t > 0 {
		var s string
		_, _ = fmt.Scan(&s)
		if strings.ToLower(s) == "yes" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		t--
	}
}

package main
import (
	"fmt"
	"strings"
)
func main() {
	var n int
	fmt.Scan(&n)
	for i:=0;i<n;i++{
		var x string
		fmt.Scan(&x)
		if strings.ToLower(x) == "yes" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var str string
	var T int
	fmt.Scan(&T)
	for Case := 1; Case <= T; Case++ {
		fmt.Scan(&str)
		str = strings.ToLower(str)
		if str == "yes" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

func solve(r *bufio.Reader) {
	var n string
	fmt.Fscan(r, &n)

	if strings.EqualFold(n, "yes") {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
func main() {
	r := bufio.NewReader(os.Stdin)
	var n int
	fmt.Fscan(r, &n)
	for i := 0; i < n; i++ {
		solve(r)
	}
}

package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)

	var buf bytes.Buffer

	tc := readNum(reader)

	for tc > 0 {
		tc--
		word := readString(reader)
		res := solve(word)
		if res {
			buf.WriteString("YES\n")
		} else {
			buf.WriteString("NO\n")
		}
	}

	fmt.Print(buf.String())
}

func readString(reader *bufio.Reader) string {
	s, _ := reader.ReadString('\n')
	for i := 0; i < len(s); i++ {
		if s[i] == '\n' || s[i] == '\r' {
			return s[:i]
		}
	}
	return s
}

func normalize(s string) string {

	for i := len(s); i > 0; i-- {
		if s[i-1] >= 'a' && s[i-1] <= 'z' {
			return s[:i]
		}
	}
	return ""
}

func readInt(bytes []byte, from int, val *int) int {
	i := from
	sign := 1
	if bytes[i] == '-' {
		sign = -1
		i++
	}
	tmp := 0
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + int(bytes[i]-'0')
		i++
	}
	*val = tmp * sign
	return i
}

func readNum(reader *bufio.Reader) (a int) {
	bs, _ := reader.ReadBytes('\n')
	readInt(bs, 0, &a)
	return
}

func readTwoNums(reader *bufio.Reader) (a int, b int) {
	res := readNNums(reader, 2)
	a, b = res[0], res[1]
	return
}

func readThreeNums(reader *bufio.Reader) (a int, b int, c int) {
	res := readNNums(reader, 3)
	a, b, c = res[0], res[1], res[2]
	return
}

func readNNums(reader *bufio.Reader, n int) []int {
	res := make([]int, n)
	x := 0
	bs, _ := reader.ReadBytes('\n')
	for i := 0; i < n; i++ {
		for x < len(bs) && (bs[x] < '0' || bs[x] > '9') && bs[x] != '-' {
			x++
		}
		x = readInt(bs, x, &res[i])
	}
	return res
}

func readUint64(bytes []byte, from int, val *uint64) int {
	i := from

	var tmp uint64
	for i < len(bytes) && bytes[i] >= '0' && bytes[i] <= '9' {
		tmp = tmp*10 + uint64(bytes[i]-'0')
		i++
	}
	*val = tmp

	return i
}

func solve(word string) bool {
	word = strings.ToLower(word)
	return word == "yes"
}

package main

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

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

	var t int
	var s string

	fmt.Fscan(in, &t)

	for i := 0; i < t; i++ {
		fmt.Fscan(in, &s)

		if (s[0] == 'Y' || s[0] == 'y') && (s[1] == 'E' || s[1] == 'e') && (s[2] == 'S' || s[2] == 's') {
			fmt.Fprintln(out, "YES")
		} else {
			fmt.Fprintln(out, "NO")
		}
	}

}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var s string
	var n int
	fmt.Scan(&n)
	for n>0 {
		fmt.Scan(&s)
		s=strings.ToLower(s)
		if s=="yes"{
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		n--
	}

}

package main

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

var (
	reader = bufio.NewReader(os.Stdin)
	t      int
	s      string
)

func solve(s string) string {
	var x = strings.ToLower(s)
	if x == "yes" {
		return "YES"
	}
	return "NO"
}

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

package main

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

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

func scan(a ...interface{}) {
	fmt.Fscan(in, a...)
}
func printf(f string, a ...interface{}) {
	fmt.Fprintf(out, f, a...)
}

func solve() {
	var s string
	scan(&s)
	if "YES" == strings.ToUpper(s) {
		printf("YES\n")
	} else {
		printf("NO\n")
	}

}
func main() {
	defer out.Flush()
	n := 0
	scan(&n)
	for i := 0; i < n; i++ {
		solve()
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var t int
	fmt.Scan(&t)

	for i := 0; i < t; i++ {
		var c string
		fmt.Scan(&c)

		c = strings.ToLower(c)
		if c == "yes" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

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

func solve(in *bufio.Reader, out *bufio.Writer) {
	defer out.Flush()
	var s string
	fmt.Fscan(in, &s)
	compare := strings.Compare(strings.ToLower(s), "yes")
	if compare == 0 {
		fmt.Fprintln(out, "Yes")
	} else {
		fmt.Fprintln(out, "No")
	}
}

func abs(a int64) int64 {
	if a > 0 {
		return a
	}
	return -a
}
func sum(a, b int64) int64 {
	return (b + a) * (b - a + 1) / 2
}

func max(a, b int64) int64 {
	if a > b {
		return a
	}
	return b
}
func min(a, b int64) int64 {
	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
	fmt.Fscan(in, &n)
	for i := 0; i < n; i++ {
		solve(in, out)
	}
}

package main

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

func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	// 读入一行数据
	// s, _ := in.ReadString('\n')
	out := bufio.NewWriter(_w)
	defer out.Flush()
	solve := func() {
		var s string
		fmt.Fscan(in, &s)
		if strings.EqualFold("yes", s) {
			fmt.Fprintln(out, "YES")
		}else{
			fmt.Fprintln(out, "NO")
		}
	}

	var t int
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		solve()
	}
}
func main() {
	run(os.Stdin, os.Stdout)
}

package main

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

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

func (in *CF1703A) 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 *CF1703A) load() {
	if len(in.split) <= in.index {
		in.split = strings.Split(in.GetLine(), in.separator)
		in.index = 0
	}
}

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

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

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

/**
Run solve the problem CF1703A
Date: 13/07/22
User: pepradere
URL: https://codeforces.com/problemset/problem/1703/A
Problem: CF1703A
**/
func (in *CF1703A) Run() {
	for t := in.NextInt(); t > 0; t-- {
		if strings.ToLower(in.NextString()) == "yes" {
			fmt.Println("YES")
		}else {
			fmt.Println("NO")
		}
	}
}

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

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

package main

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

var rr = bufio.NewReader(os.Stdin)
var ww = bufio.NewWriter(os.Stdout)

func slove() {
	var s string
	fmt.Fscan(rr, &s)
	if strings.ToLower(s) == "yes" {
		fmt.Fprintln(ww, "YES")
	} else {
		fmt.Fprintln(ww, "NO")
	}
}

func main() {
	defer ww.Flush()
	var n int
	fmt.Fscan(rr, &n)
	for i:=1;i<=n;i++ {
		slove()
	}
}

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 int
	var s string
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &s)
		if strings.ToLower(s) == "yes" {
			Fprintln(out, "YES")
		} else {
			Fprintln(out, "NO")
		}
	}
}

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

package main

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

func setOs() {
	//os.Stdin, err = os.OpenFile("input.txt", os.RDONLY|os.O_CREATE, 0666)
	//os.Stdout, err = os.OpenFile("output.txt", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
	_, err := os.Stat("input.txt")
	if err == nil {
		os.Stdin, _ = os.OpenFile("input.txt", os.O_RDONLY|os.O_CREATE, 0666)
	}
}

func main() {
	setOs()
	var t int
	fmt.Scan(&t)
	for i := 0; i < t; i++ {
		var s string
		fmt.Scan(&s)
		if strings.ToUpper(s) == "YES" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

func check(s string) bool {
	return strings.ToLower(s) == "yes"
}

func main() {
	// f, _ := os.Open("input.txt")
	t := bufio.NewReader(os.Stdin)
	var n int
	fmt.Fscan(t, &n)
	for i := 0; i < n; i++ {
		var s string
		fmt.Fscan(t, &s)
		if check(s) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}

	}
}

package main

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

func main() {
	var(
		t int
		input string
	)
	reader := bufio.NewReader(os.Stdin)
	fmt.Fscanf(reader, "%d\n", &t)

	for i:=0;i<t;i++ {
		fmt.Fscanf(reader, "%s\n", &input)
		Arr := []byte(input)
		if (Arr[0] == 89 || Arr[0] == 121) && (Arr[1] == 69 || Arr[1] == 101) && (Arr[2] == 83 || Arr[2] == 115) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

//package main
//
//import (
//	"context"
//	"gerRpc"
//	"gerRpc/xclient"
//	"log"
//	"sync"
//
//	"net"
//	"time"
//)
//
////
////func startServer(addr chan string)  {
////	l, err := net.Listen("tcp", ":0")
////	if err != nil{
////		log.Fatal("network error:", err)
////	}
////	log.Println("start rpc server on:", l.Addr())
////	addr <- l.Addr().String()
////	gerRpc.Accept(l)
////}
////
////func main()  {
////
////	//addr := make(chan string)
////	//go startServer(addr)
////	//client, _ := gerRpc.Dial("tcp", <-addr)
////	//defer func() {_ = client.Close()}()
////
////	//time.Sleep(time.Second)
////	//var wg sync.WaitGroup
////	//for i := 0; i < 5; i ++{
////	//	wg.Add(1)
////	//	go func(i int) {
////	//		defer wg.Done()
////	//		args := fmt.Sprintf("geerpc req %d", i)
////	//		var reply string
////	//		if err := client.Call("Foo.sum", args, &reply); err != nil{
////	//			log.Fatal("call Foo.Sum error:", err)
////	//		}
////	//		log.Println("reply")
////	//	}(i)
////	//}
////	//wg.Wait()
////}
//
////
////func main() {
////	addr := make(chan string)
////	go startServer(addr)
////
////	// in fact, following code is like a simple geerpc client
////	conn, _ := net.Dial("tcp", <-addr)
////	defer func() { _ = conn.Close() }()
////
////	time.Sleep(time.Second)
////	// send options
////	_ = json.NewEncoder(conn).Encode(gerRpc.DefaultOption)
////	cc := codec.NewGobCodec(conn)
////	// send request & receive response
////	for i := 0; i < 5; i++ {
////		h := &codec.Header{
////			ServiceMethod: "Foo.Sum",
////			Seq:           uint64(i),
////		}
////		_ = cc.Write(h, fmt.Sprintf("geerpc req %d", h.Seq))
////		_ = cc.ReadHeader(h)
////		var reply string
////		_ = cc.ReadBody(&reply)
////		log.Println("reply:", reply)
////	}
////}
////
////
////type Foo int
////
////type Args struct {
////	Num1, Num2 int
////}
////
////func (f Foo)Sum(args Args, reply *int)error  {
////	*reply = args.Num1 + args.Num2
////	return nil
////}
////func startServer(addr chan string) {
////	var foo Foo
////	if err := gerRpc.Register(&foo); err != nil {
////		log.Fatal("register error:", err)
////	}
////	// pick a free port
////	l, err := net.Listen("tcp", ":0")
////	if err != nil {
////		log.Fatal("network error:", err)
////	}
////	log.Println("start rpc server on", l.Addr())
////	addr <- l.Addr().String()
////	gerRpc.Accept(l)
////}
////
////func main()  {
////	log.SetFlags(0)
////	addr := make(chan string)
////	go startServer(addr)
////	client, _ := gerRpc.Dial("tcp", <-addr)
////	defer func() {_ = client.Close()}()
////
////	time.Sleep(time.Second)
////	var wg sync.WaitGroup
////	for i := 0; i < 5; i ++{
////		wg.Add(1)
////		go func(i int) {
////			defer wg.Done()
////			args := &Args{
////				Num1: i,
////				Num2: i * i,
////			}
////			ctx, _ := context.WithTimeout(context.Background(), time.Second)
////			var reply int
////			if err := client.Call(ctx,"Foo.Sum", args, &reply); err != nil{
////				log.Fatal("call Foo.Sum error:", err)
////			}
////			log.Printf("%d + %d = %d", args.Num1, args.Num2, reply)
////		}(i)
////	}
////	wg.Wait()
////}
//type Foo int
//
//type Args struct{ Num1, Num2 int }
//
//func (f Foo) Sum(args Args, reply *int) error {
//	*reply = args.Num1 + args.Num2
//	return nil
//}
//
//func (f Foo) Sleep(args Args, reply *int) error {
//	time.Sleep(time.Second * time.Duration(args.Num1))
//	*reply = args.Num1 + args.Num2
//	return nil
//}
//
//func startServer(addrCh chan string) {
//	var foo Foo
//	l, _ := net.Listen("tcp", ":0")
//	server := gerRpc.NewServer()
//	_ = server.Register(&foo)
//	addrCh <- l.Addr().String()
//	server.Accept(l)
//}
//
//func foo(xc *xclient.Xclient, ctx context.Context, typ, serviceMethod string, args *Args)  {
//	var reply int
//	var err error
//	switch typ {
//	case "call":
//		err = xc.Call(ctx, serviceMethod, args, &reply)
//	case "broadcast":
//		err = xc.Broadcast(ctx, serviceMethod, args, &reply)
//	}
//	if err != nil{
//		log.Printf("%s %s error: %v", typ, serviceMethod, err)
//	}else{
//		log.Printf("%s %s success: %d + %d = %d", typ, serviceMethod, args.Num1, args.Num2, reply)
//	}
//}
//
//func call(addr1, addr2 string)  {
//	d := xclient.NewMultiServerDiscovery([]string{"tcp@"+addr1, "tcp@"+addr2})
//	xc := xclient.NewXClient(d, xclient.RandomSelect, nil)
//	defer func() {_ = xc.Close()}()
//
//	var wg sync.WaitGroup
//	for i := 0; i < 5; i ++{
//		wg.Add(1)
//		go func(i int) {
//			defer wg.Done()
//			foo(xc, context.Background(), "call", "Foo.Sum", &Args{
//				Num1: i,
//				Num2: i * i,
//			})
//		}(i)
//	}
//	wg.Wait()
//}
//
//func broadcast(addr1, addr2 string) {
//	d := xclient.NewMultiServerDiscovery([]string{"tcp@" + addr1, "tcp@" + addr2})
//	xc := xclient.NewXClient(d, xclient.RandomSelect, nil)
//	defer func() { _ = xc.Close() }()
//	var wg sync.WaitGroup
//	for i := 0; i < 5; i++ {
//		wg.Add(1)
//		go func(i int) {
//			defer wg.Done()
//			foo(xc, context.Background(), "broadcast", "Foo.Sum", &Args{Num1: i, Num2: i * i})
//			// expect 2 - 5 timeout
//			ctx, _ := context.WithTimeout(context.Background(), time.Second*2)
//			foo(xc, ctx, "broadcast", "Foo.Sleep", &Args{Num1: i, Num2: i * i})
//		}(i)
//	}
//	wg.Wait()
//}
//
//
//func main() {
//	log.SetFlags(0)
//	ch1 := make(chan string)
//	ch2 := make(chan string)
//	// start two servers
//	go startServer(ch1)
//	go startServer(ch2)
//
//	addr1 := <-ch1
//	addr2 := <-ch2
//
//	time.Sleep(time.Second)
//	call(addr1, addr2)
//	broadcast(addr1, addr2)
//}

package main

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

var in = bufio.NewReader(os.Stdin)

func main()  {
	var T int
	fmt.Fscan(in, &T)
	for ;T > 0; T--{
		var str string
		fmt.Fscan(in, &str)

		if strings.EqualFold(strings.ToLower(str), "yes"){
			fmt.Println("YES")
		}else{
			fmt.Println("NO")
		}
	}
}

package main

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

func checkYes(str string) string {
	if (str[0] == 'y' || str[0] == 'Y') &&
		(str[1] == 'e' || str[1] == 'E') &&
		(str[2] == 's' || str[2] == 'S') {
		return "YES"
	}
	return "NO"
}

func main() {
	reader := bufio.NewReaderSize(os.Stdin, 16*1024*1024)
	T, err := strconv.Atoi(strings.TrimSpace(readLine(reader)))
	checkError(err)
	var results = make([]string, T)
	for i := 0; i < T; i++ {
		str := strings.TrimSpace(readLine(reader))
		results[i] = checkYes(str)
	}
	for _, result := range results {
		fmt.Println(result)
	}
}

func readLine(reader *bufio.Reader) string {
	str, _, err := reader.ReadLine()
	if err != nil {
		return ""
	}
	return strings.TrimRight(string(str), "\r\n")
}

func checkError(err error) {
	if err != nil {
		panic(err)
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var (
		n int
		s string
	)
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		fmt.Scan(&s)
		s = strings.ToLower(s)
		if s == "yes" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

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

	var T int
	for fmt.Fscan(in, &T); T > 0; T-- {
		var s string
		fmt.Fscan(in, &s)
		if (s == "yES") || (s == "Yes") || (s == "yes") || (s == "YEs") || (s == "YES") || (s == "yEs") || (s == "yeS" || (s == "YeS")) {
			fmt.Fprintln(out, "YES")
		} else {
			fmt.Fprintln(out, "NO")
		}
	}
}

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

package main

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

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 s string
		fmt.Fscan(in, &s)

		if strings.ToUpper(s) == "YES" {
			fmt.Fprintln(out, "YES")
		} else {
			fmt.Fprintln(out, "NO")
		}
	}
}

package main

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

var _, _, _ = main, rw, do

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

func rw(r io.Reader, w io.Writer) {
	var t int
	fmt.Fscan(r, &t)
	for ti := 0; ti < t; ti++ {
		var s string
		fmt.Fscan(r, &s)
		w1 := do(s)
		fmt.Fprintln(w, w1)
	}
}

func do(m string) string {
	s := strings.ToUpper(m)
	if s == "YES" {
		return s
	}
	return "NO"
}

// 1703A. YES or YES?
package main

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

func main() {
	var T int
	reader := bufio.NewReader(os.Stdin)
	fmt.Fscan(reader, &T)
	for t := 1; t <= T; t++ {
		var s string
		fmt.Fscan(reader, &s)
		if strings.ToLower(s) == "yes" {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"strings"
)

func ReadInt() int{
	var i int
	fmt.Scanf("%d\n ", &i)
	return i
}

func ReadArray(N int) []int{
	ans := make([]int, N)
	for i := 0; i < N; i++{
		fmt.Scanf("%d", &ans[i])
	}
	return ans
}

func ReadString() string{
	var s string
	fmt.Scanf("%s\n", &s)
	return s
}

func main(){
	testCases := ReadInt()
	for ; testCases > 0; testCases--{
		s := ReadString()
		ans := "NO"
		if strings.ToLower(s) == "yes"{
			ans = "YES"
		}
		fmt.Println(ans)
	}
}

package main

import (
	"fmt"
	"strings"
)

func ReadInt() int{
	var i int
	fmt.Scanf("%d", &i)
	return i
}

func ReadArray(N int) []int{
	ans := make([]int, N)
	for i := 0; i < N; i++{
		ans[i] = ReadInt()
	}
	return ans
}

func ReadString() string{
	var s string
	fmt.Scanf("%s", &s)
	return s
}

func main(){
	testCases := ReadInt()
	for ; testCases > 0; testCases--{
		s := ReadString()
		ans := "NO"
		if strings.ToLower(s) == "yes"{
			ans = "YES"
		}
		fmt.Println(ans)
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var t int
	fmt.Scanf("%d\n", &t)
	input := make([]string, t)
	for i := range input {
		fmt.Scanf("%d\n", &input[i])
	}
	for _, v := range input {
		if strings.ToLower(v) == "yes" {
			fmt.Println("YES")
			continue
		}
		fmt.Println("NO")
	}
}

package main

import (
	"fmt"
	"strings"
)

func main() {
	var t int
	fmt.Scanf("%d\n", &t)
	input := make([]string, t)
	for _, v := range input {
		if strings.ToLower(v) == "yes" {
			fmt.Println("YES")
			continue
		}
		fmt.Println("NO")
	}
}

package main

import (
    "fmt"
    "strings"
)

func main() {
    tt := 0
    fmt.Scan(&tt)
    var str string
    for i := 1; i <= tt; i++ {
        fmt.Scan(&str)
        str = strings.ToLower(str)
        if str == "yes" {
            println("YES")
        } else {
            println("NO")
        }
    }

}

// To execute Go code, please declare a func main() in a package "main"

package main

import (
	"fmt"
	"strings"
)

func main() {
	n := 0
	fmt.Scanln(&n)
	var result = make([]string, n)
	for i := 0; i < n; i++ {
		var input string
		fmt.Scanln(&input)
		if strings.ToLower(input) == "yes" {
			result = append(result, "YES")
		} else {
			result = append(result, "NO")
		}
	}

	for i := 0; i < n; i++ {
		fmt.Println(result[i])
	}
}

package main

import (
	"fmt"
	"strings"
)

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

package main

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

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

func solve() {
	s := _readStr()
	if strings.EqualFold(s, "yes") {
		_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 (
	"fmt"
	"strings"
)

func main() {
	var i int
	fmt.Scan(&i)
	var lawda string
	for i != 0 {
		fmt.Scan(&lawda)
		if strings.ToLower(lawda) == "yes" {
			fmt.Println("YES")
		}else {
			println("NO")
		}
		i--
	}
}


package main

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

const MAX_NM = 100
const MAX_CHAR = int('z') + 1

func main() {
	reader := NewStdReader(os.Stdin)

	n, m := reader.ReadInt(), reader.ReadInt()

	countRow := [MAX_NM][MAX_CHAR]byte{}
	countCol := [MAX_NM][MAX_CHAR]byte{}

	table := [MAX_NM][MAX_NM]byte{}

	for i := 0; i < n; i++ {
		for j := 0; j < m; j++ {
			c := reader.ReadChar()
			table[i][j] = c
			countRow[i][c]++
			countCol[j][c]++
		}
	}

	for i := 0; i < n; i++ {
		for j := 0; j < m; j++ {
			c := table[i][j]

			if countRow[i][c] == 1 && countCol[j][c] == 1 {
				fmt.Print(string(c))
			}
		}
	}
}

type StdReader struct {
	buf *bufio.Reader
}

func NewStdReader(reader io.Reader) *StdReader {
	return &StdReader{bufio.NewReaderSize(reader, 20*1024*1024)}
}

func (std *StdReader) ReadInt() int {

	r := 0
	sign := 1
	ok := false

	for {
		b, e := std.buf.ReadByte()

		if e != nil {
			break
		}
		if b >= '0' && b <= '9' {
			r = r*10 + int(b-'0')
			ok = true
		} else {
			if ok {
				break
			} else {
				if b == '-' {
					sign = -sign
				}
			}
		}
	}

	return sign * r
}

func (std *StdReader) ReadChar() byte {
	for {
		b, e := std.buf.ReadByte()

		if e != nil {
			break
		}

		if b >= 'a' && b <= 'z' {
			return b
		}
	}

	return 0
}

package main

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

var scanner *bufio.Scanner

func getI64() int64 {
  scanner.Scan()
  x, _ := strconv.ParseInt(scanner.Text(), 10, 64)
  return x
}
func getI() int {
  return int(getI64())
}
func getF() float64 {
  scanner.Scan()
  x, _ := strconv.ParseFloat(scanner.Text(), 64)
  return x
}
func getS() string {
  scanner.Scan()
  return scanner.Text()
}

func main() {
  scanner = bufio.NewScanner(os.Stdin)
  scanner.Split(bufio.ScanWords)
  writer := bufio.NewWriter(os.Stdout)
  defer writer.Flush()

  n, m := getI(), getI()
  mark := make([][]bool, n)
  rows := make([]string, n)
  for r := range rows {
    rows[r] = getS()
    mark[r] = make([]bool, m)
  }
  for r := range rows {
    seen := map[byte]int{}
    for c := 0; c < m; c++ {
      ch := rows[r][c]
      if seen[ch] != 0 {
        mark[r][seen[ch]-1] = true
        mark[r][c] = true
      } else {
        seen[ch] = c+1
      }
    }
  }
  for c := 0; c < m; c++ {
    seen := map[byte]int{}
    for r := range rows {
      ch := rows[r][c]
      if seen[ch] != 0 {
        mark[seen[ch]-1][c] = true
        mark[r][c] = true
      } else {
        seen[ch] = r+1
      }
    }
  }
  chars := []byte{}
  for r := range rows {
    for c := 0; c < m; c++ {
      if !mark[r][c] {
        chars = append(chars, rows[r][c])
      }
    }
  }
  writer.WriteString(fmt.Sprintf("%s\n", string(chars)))
}