package main

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

func pf(n int) map[int]int {
	r := make(map[int]int, 0)
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			n /= i
			r[i]++
		}
	}
	if n > 1 {
		r[n]++
	}
	return r
}

func divs(n int) (r []int) {
	r = make([]int, 0)
	for i := 1; i*i <= n; i++ {
		if n%i == 0 {
			r = append(r, i)
			if i*i != n {
				r = append(r, n/i)
			}
		}
	}
	sort.Ints(r)
	return r
}

type ans struct {
	ok   bool
	nums []int
}

func main() {
	var t, v int
	fmt.Scan(&t)
	a := make([]ans, t)
	for i := 0; i < t; i++ {
		fmt.Scan(&v)
		// fmt.Println("v", v, "divs", divs(v))
		d := divs(v)
		for j := 0; j < len(d); j++ {
			if d[j] == 1 {
				continue
			}
			if v%d[j] == 0 {
				a[i].nums = append(a[i].nums, d[j])
				v /= d[j]
			}
			if v < 2 {
				break
			} else if len(a[i].nums) == 2 {
				a[i].nums = append(a[i].nums, v)
				break
			}
		}
		if len(a[i].nums) == 3 {
			if a[i].nums[0] != a[i].nums[1] &&
				a[i].nums[1] != a[i].nums[2] &&
				a[i].nums[2] != a[i].nums[0] {
				a[i].ok = true
			}
		}
	}
	wtr := bufio.NewWriter(os.Stdout)
	for i := 0; i < len(a); i++ {
		if a[i].ok {
			fmt.Fprintln(wtr, "YES")
			fmt.Fprintln(wtr, a[i].nums[0], a[i].nums[1], a[i].nums[2])
		} else {
			fmt.Fprintln(wtr, "NO")
		}
	}
	wtr.Flush()
}

package main

import "fmt"

func Main() (bool,int,int,int){
	var n int
	fmt.Scanf("%d\n",&n)
	on:=n
	var a=make([]struct{v,k int},30)
	t:=0
	for i:=2;i*i<=n;i++{
		if n%i==0{
			a[t].v=i
			a[t].k=0
			for n%i==0{
				n/=i
				a[t].k++
			}
			t++
		}
	}
	if n>1{
		a[t]=struct{v,k int}{n,1}
		t++
	}
	n=on
	if t==1{
		if a[0].k<=5{
			return false,0,0,0
		}
		return true,a[0].v,a[0].v*a[0].v,n/(a[0].v*a[0].v*a[0].v)
	}
	if t==2{
		if a[0].k+a[1].k<=3{
			return false,0,0,0
		}
		return true,a[0].v,a[1].v,n/(a[0].v*a[1].v)
	}
	return true,a[0].v,a[1].v,n/(a[0].v*a[1].v)
}

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

/*
URL:
https://codeforces.com/problemset/problem/1294/C
*/

package main

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

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	t int

	n int
)

func main() {
	t = ReadInt()

	for i := 0; i < t; i++ {
		n = ReadInt()

		solve()
	}
}

func solve() {
	memo := TrialDivision(n)

	if len(memo) == 1 {
		for k, v := range memo {
			if v >= 6 {
				a := k
				b := k * k
				c := (n / a) / b
				fmt.Println("YES")
				fmt.Println(a, b, c)
				return
			} else {
				fmt.Println("NO")
				return
			}
		}
	} else if len(memo) == 2 {
		A := []int{}
		for k := range memo {
			A = append(A, k)
		}

		if memo[A[0]] >= 3 || memo[A[1]] >= 3 || (memo[A[0]] >= 2 && memo[A[1]] >= 2) {
			a := A[0]
			b := A[1]
			c := (n / a) / b
			fmt.Println("YES")
			fmt.Println(a, b, c)
			return
		} else {
			fmt.Println("NO")
			return
		}
	} else {
		A := []int{}
		for k := range memo {
			A = append(A, k)
		}

		a := A[0]
		b := A[1]
		c := (n / a) / b
		fmt.Println("YES")
		fmt.Println(a, b, c)
		return
	}
}

// TrialDivision returns the result of prime factorization of integer N.
func TrialDivision(n int) map[int]int {
	if n <= 1 {
		panic(errors.New("[argument error]: TrialDivision only accepts a NATURAL number"))
	}

	p := map[int]int{}
	for i := 2; i*i <= n; i++ {
		exp := 0
		for n%i == 0 {
			exp++
			n /= i
		}

		if exp == 0 {
			continue
		}
		p[i] = exp
	}
	if n > 1 {
		p[n] = 1
	}

	return p
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

package main

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

func find(n int64) (int64, int64, int64) {
	j := int64(2)
	for ; j <= int64(math.Sqrt(float64(n))); j++ {
		if n%j != 0 {
			continue
		}
		k := int64(2)
		other := n / j
		for ; k <= int64(math.Sqrt(float64(j))); k++ {
			if j%k != 0 {
				continue
			}
			div := j / k
			if other == k || other == div || k == div {
				continue
			}
			return other, k, div
		}
		k = int64(2)
		for ; k <= int64(math.Sqrt(float64(other))); k++ {
			if other%k != 0 {
				continue
			}
			div := other / k
			if j == k || j == div || k == div {
				continue
			}
			return j, k, div
		}
	}
	return -1, -1, -1
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	writer := bufio.NewWriter(os.Stdout)
	defer writer.Flush()
	var t int
	var n int64
	fmt.Fscanln(reader, &t)
	for ; t > 0; t-- {
		fmt.Fscanln(reader, &n)
		a, b, c := find(n)
		if a == -1 {
			fmt.Fprintln(writer, "NO")
			continue
		}
		fmt.Fprintln(writer, "YES")
		fmt.Fprintln(writer, a, b, c)
	}
}

package main

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

var _ = sort.Slice
var _ = math.Sqrt
var _ = strconv.Itoa

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var t int
	fmt.Fscan(in, &t)
	var ans []string
	for i := 0; i < t; i++ {
		var n int
		fmt.Fscan(in, &n)
		cnt := 0
		var lst []int
		for i := 2; i*i <= n; i++ {
			for n%i == 0 {
				n = n / i
				lst = append(lst, i)
				cnt++
			}
		}
		if n != 1 {
			lst = append(lst, n)
			cnt++
		}
		sta :=[]int{lst[0]}
		ansstr := []string{strconv.Itoa(lst[0])}
		now := 1
		top := 0
		set := make(map[int]bool)
		set[lst[0]] = true
		for i := 1; i < len(lst); i++{
			now = now * lst[i]
			if set[now] == false && (top != 1 || i == len(lst)-1) {
				ansstr = append(ansstr, strconv.Itoa(now))
				sta = append(sta, now)
				set[now] = true
				top++
				now = 1
			}
		}

		if top == 2{
			ans = append(ans, "YES");
			ans = append(ans, strings.Join(ansstr[:3], " "))
		}else{
			ans = append(ans, "NO")
		}
	}
	fmt.Fprintln(out, strings.Join(ans, "\n"));
}

package main

import (
	"fmt"
	"math"
)

func find(n, st int) int {
	m := int(math.Sqrt(float64(n)))
	for d := st; d <= m; d++ {
		if n%d == 0 {
			return d
		}
	}

	return 1
}

func main() {
	var T, n, a, b, c int
	for fmt.Scanln(&T); T > 0; T-- {
		fmt.Scanln(&n)
		a = find(n, 2)

		ok := false
		if a != 1 {
			b = find(n/a, a+1)
			if b != 1 {
				c = n / a / b
				if c!=a && c!=b {
					fmt.Println("YES")
					fmt.Println(a, b, c)
					ok=true
				}
			}
		}

		if !ok {
			fmt.Println("NO")
		}
	}
}

package main

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

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

	var t int
	fmt.Fscan(r, &t)
	ans := make([]string, t)
	for i := 0; i < t; i++ {
		var x int
		fmt.Fscan(r, &x)
		if a, b, c, ok := f(x); ok {
			ans[i] = fmt.Sprint("YES\n", a, b, c)
		} else {
			ans[i] = "NO"
		}
	}
	fmt.Fprintln(w, strings.Join(ans, "\n"))
}
func f(n int) (int, int, int, bool) {
	a := make([]int, 2)
	j := 0
	for i := 2; i*i <= n && j < 2; i++ {
		if n%i == 0 {
			a[j] = i
			n /= i
			j++
		}
	}
	if j < 2 || a[0] == n || a[1] == n {
		return 0, 0, 0, false
	}

	return a[0], a[1], n, true
}

package main

import (
	"fmt"
	"math"
)

func main() {
	var n int
	fmt.Scanf("%d\n", &n)
	for i := 0; i < n; i++ {
		var a int
		fmt.Scanf("%d\n", &a)
		p(a)
	}
}

func p(a int) {
	res := []int{}
	div := 2
	sq := int(math.Sqrt(float64(a)))

	for {
		if a == 1 || len(res) == 2 || div > a || div > sq {
			break
		}

		if a%div == 0 {
			a /= div
			res = append(res, div)
		}

		div++
	}

	if a == 1 || len(res) < 2 {
		fmt.Println("NO")
		return
	}

	if len(res) == 2 {
		if a > res[1] {
			fmt.Println("YES")
			fmt.Println(res[0], res[1], a)
			return
		}

		fmt.Println("NO")
		return
	}

	fmt.Println("NO")
	return
}

package main

import (
	"fmt"
)

func main() {
	var t int
	fmt.Scanf("%d\n", &t)
	for i := 0; i < t; i++ {
		var n int
		var a, b, c int
		flag := 0
		fmt.Scanf("%d\n", &n)
		if n < 24 {
			fmt.Println("NO")
			continue
		} else {
			for i := 2; i <= n/(i*(i+1)); i++ {
				for j := i + 1; j < n/(i*j); j++ {
					a, b, c = 0, 0, 0
					if n%(i*j) == 0 {
						a = n / (i * j)
						b = j
						c = i
						if b != a && c != a && b != c {
							flag = 1
							fmt.Println("YES")
							fmt.Printf("%d %d %d\n", c, b, a)
							break
						}
					}
				}
				if flag == 1 {
					break
				}
			}
			if a == 0 || b == 0 || c == 0 {
				fmt.Println("NO")
			}
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
)
func fun(n int64,out *bufio.Writer){
	//fmt.Fscanf(in,"%d",&n)
	sq:=math.Sqrt(float64(n))
	num:=make([]int64,0)
	cnt:=0
	for i:=int64(2);i<=int64(sq);i++{
		if n%i==0{
			num=append(num, i)
			n/=i
			cnt++
		}
		if cnt==2{
			break
		}
	}
	if cnt<2{
		fmt.Fprintf(out,"NO\n")
		return
	}
	if (n!=num[0])&&(n!=num[1])&&(n>=2){
		fmt.Fprintf(out,"YES\n")
		fmt.Fprintf(out,"%d %d %d\n",num[0],num[1],n)
	}else{
		fmt.Fprintf(out,"NO\n")
	}
	return
}
func main(){
	in:=bufio.NewReader(os.Stdin)
	out:=bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var t int
	fmt.Fscanf(in,"%d\n",&t)
	for ;t>0;t--{
		var n int64
		fmt.Fscanf(in,"%d\n" ,&n)
		fun(n,out)
	}
}

package main

import (
	"fmt"
)

type pair struct{
	a,b int64
}

func poww(A int64 , B int64) int64 {
	res := int64(1)
	for B > 0 {
		if B & 1 == 1 {
			res *= A
		}
		A *= A
		B = B >> 1
	}
	return res
}

func solve(n int64) (bool, int64, int64, int64) {
	var pr []pair

	if n % 2 == 0 {
		cnt := int64(0)
		for n % 2 == 0 {
			cnt ++
			n /= 2
		}
		var tmp pair
		tmp.a = 2
		tmp.b = cnt
		pr = append(pr,tmp)
	}

	for i := int64(3) ; i*i <= n ; i ++ {
		if n % i == 0 {
			cnt := int64(0)
			for n % i == 0 {
				cnt ++
				n /= i
			}
			var tmp pair
			tmp.a = i
			tmp.b = cnt
			pr = append(pr,tmp)
		}
	}

	if n > 1 {
		var tmp pair
		tmp.a = n
		tmp.b = 1
		pr = append(pr,tmp)
	}

	var A, B, C int64

	if len(pr) == 1 {
		if pr[0].b >= 6{
			A = pr[0].a
			B = poww(pr[0].a,2)
			C = poww(pr[0].a,pr[0].b - 3)
			return true,A,B,C
		}else {
			return false,0,0,0
		}
	} else if len(pr) == 2 {

		if pr[0].b + pr[1].b >= 4 {
			A = pr[0].a
			B = poww(pr[0].a, pr[0].b - 1)*poww(pr[1].a, pr[1].b - 1)
			C = pr[1].a
			return true,A,B,C
		} else{
			return false,0,0,0
		}

	} else {
		A = pr[0].a
		B = pr[1].a
		pr[0].b -= 1
		pr[1].b -= 1
		C = 1
		for i := 0 ; i < len(pr) ; i ++ {
			C *= poww( pr[i].a, pr[i].b )
		}
		return true,A,B,C
	}

}

func main(){
	var t, n int64

	fmt.Scan(&t)

	for T := int64(0) ; T < t ; T ++ {
		fmt.Scan(&n)
		ok,A,B,C := solve(n)
		if ok == false {
			fmt.Println("NO")
		}else{
			fmt.Println("YES")
			fmt.Println(A,B,C)
		}
	}
}

package main

import (
	"fmt"
)

func main() {
	var n int64
	fmt.Scanf("%d\n", &n)
	for i := int64(0); i < n; i++ {
		var a int64
		fmt.Scanf("%d\n", &a)
		p(a)
	}
}

func p(a int64) {
	base := int64(a)
	div := int64(2)

	res := []int64{}
	for {
		if a == 1 || div > 1000 {
			break
		}

		if a%div == 0 {
			a /= div
			res = append(res, div)
		}
		div++
	}

	if len(res) < 3 {
		fmt.Println("NO")
		return
	}

	temp := int64(1)
	for i := 0; i < len(res); i++ {
		temp *= res[i]
	}
	if temp != base {
		fmt.Println("NO")
		return
	}

	fmt.Println("YES")
	fmt.Println(res[0], res[1], (temp/res[0])/res[1])
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scanf("%d\n", &n)
	for i := 0; i < n; i++ {
		var a int
		fmt.Scanf("%d\n", &a)
		p(a)
	}
}

func p(a int) {
	base := a
	div := 2

	res := []int{}
	for {
		if a == 1 || div > 1000 {
			break
		}

		if a%div == 0 {
			a /= div
			res = append(res, div)
		}
		div++
	}

	if len(res) < 3 {
		fmt.Println("NO")
		return
	}

	temp := 1
	for i := 0; i < len(res); i++ {
		temp *= res[i]
	}
	if temp != base {
		fmt.Println("NO")
		return
	}

	fmt.Println("YES")
	fmt.Println(res[0], res[1], (temp/res[0])/res[1])
}

package main

import (
	"fmt"
)

func main() {
	var t int
	fmt.Scanf("%d\n", &t)
	for i := 0; i < t; i++ {
		var n int
		var a, b, c int
		flag := 0
		fmt.Scanf("%d\n", &n)
		if n < 24 {
			fmt.Println("NO")
			continue
		} else {
			for i := 6; i < n / 6 + 1; i++ {
				a, b, c = 0, 0, 0
				if n%i == 0 {
					a = n / i
					for j := 2; j < i / 2 + 1; j++ {
						if i%j == 0 {
							b = i / j
							c = j
							if b != a && c != a && b != c {
								flag = 1
								fmt.Println("YES")
								fmt.Printf("%d %d %d\n", c, b, a)
								break
							}
						}
					}
				}
				if flag == 1 {
					break
				}
			}
			if a == 0 || b == 0 || c == 0 {
				fmt.Println("NO")
			}
		}
	}
}

package main

import (
	"fmt"
)

func main() {
	var t int
	fmt.Scanf("%d\n", &t)
	for i := 0; i < t; i++ {
		var n int
		var a, b, c int
		flag := 0
		fmt.Scanf("%d\n", &n)
		if n < 24 {
			fmt.Println("NO")
			continue
		} else {
			for i := 6; i < n / 6; i++ {
				a, b, c = 0, 0, 0
				if n%i == 0 {
					a = n / i
					for j := 2; j < i / 2; j++ {
						if i%j == 0 {
							b = i / j
							c = j
							if b != a && c != a && b != c {
								flag = 1
								fmt.Println("YES")
								fmt.Printf("%d %d %d\n", c, b, a)
								break
							}
						}
					}
				}
				if flag == 1 {
					break
				}
			}
			if a == 0 || b == 0 || c == 0 {
				fmt.Println("NO")
			}
		}
	}
}

package main

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

func pf(n int) map[int]int {
	r := make(map[int]int, 0)
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			n /= i
			r[i]++
		}
	}
	if n > 1 {
		r[n]++
	}
	return r
}

func divs(n int) (r []int) {
	r = make([]int, 0)
	for i := 1; i*i <= n; i++ {
		if n%i == 0 {
			r = append(r, i)
			if i*i != n {
				r = append(r, n/i)
			}
		}
	}
	sort.Ints(r)
	return r
}

type ans struct {
	ok   bool
	nums []int
}

func main() {
	var t, v int
	fmt.Scan(&t)
	a := make([]ans, t)
	for i := 0; i < t; i++ {
		fmt.Scan(&v)
		// fmt.Println("v", v, "divs", divs(v))
		d := divs(v)
		for j := 0; j < len(d); j++ {
			if d[j] == 1 {
				continue
			}
			if v%d[j] == 0 {
				a[i].nums = append(a[i].nums, d[j])
				v /= d[j]
			}
			if v < 2 {
				break
			} else if len(a[i].nums) == 2 {
				a[i].nums = append(a[i].nums, v)
				break
			}
		}
		if len(a[i].nums) == 3 {
			if a[i].nums[0] != a[i].nums[1] &&
				a[i].nums[1] != a[i].nums[2] {
				a[i].ok = true
			}
		}
	}
	wtr := bufio.NewWriter(os.Stdout)
	for i := 0; i < len(a); i++ {
		if a[i].ok {
			fmt.Fprintln(wtr, "YES")
			fmt.Fprintln(wtr, a[i].nums[0], a[i].nums[1], a[i].nums[2])
		} else {
			fmt.Fprintln(wtr, "NO")
		}
	}
	wtr.Flush()
}

/*
URL:
https://codeforces.com/problemset/problem/1294/C
*/

package main

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

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	t int

	n int
)

func main() {
	t = ReadInt()

	for i := 0; i < t; i++ {
		n = ReadInt()

		solve()
	}
}

func solve() {
	memo := TrialDivision(n)

	if len(memo) == 1 {
		for k, v := range memo {
			if v >= 6 {
				a := k
				b := k * k
				c := n / a / b
				fmt.Println("YES")
				fmt.Println(a, b, c)
				return
			} else {
				fmt.Println("NO")
				return
			}
		}
	} else if len(memo) == 2 {
		A := []int{}
		for k := range memo {
			A = append(A, k)
		}

		if memo[A[0]] >= 3 || memo[A[1]] >= 3 {
			a := A[0]
			b := A[1]
			c := n / a / b
			fmt.Println("YES")
			fmt.Println(a, b, c)
			return
		} else {
			fmt.Println("NO")
			return
		}
	} else {
		A := []int{}
		for k := range memo {
			A = append(A, k)
		}

		a := A[0]
		b := A[1]
		c := n / a / b
		fmt.Println("YES")
		fmt.Println(a, b, c)
		return
	}
}

// TrialDivision returns the result of prime factorization of integer N.
func TrialDivision(n int) map[int]int {
	if n <= 1 {
		panic(errors.New("[argument error]: TrialDivision only accepts a NATURAL number"))
	}

	p := map[int]int{}
	for i := 2; i*i <= n; i++ {
		exp := 0
		for n%i == 0 {
			exp++
			n /= i
		}

		if exp == 0 {
			continue
		}
		p[i] = exp
	}
	if n > 1 {
		p[n] = 1
	}

	return p
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

/*
URL:
https://codeforces.com/problemset/problem/1294/C
*/

package main

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

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	t int

	n int
)

func main() {
	t = ReadInt()

	for i := 0; i < t; i++ {
		n = ReadInt()

		solve()
	}
}

func solve() {
	memo := TrialDivision(n)

	if len(memo) == 1 {
		for k, v := range memo {
			if v >= 6 {
				a := k
				b := k * k
				c := (n / a) / b
				fmt.Println("YES")
				fmt.Println(a, b, c)
				return
			} else {
				fmt.Println("NO")
				return
			}
		}
	} else if len(memo) == 2 {
		A := []int{}
		for k := range memo {
			A = append(A, k)
		}

		if memo[A[0]] >= 3 || memo[A[1]] >= 3 {
			a := A[0]
			b := A[1]
			c := (n / a) / b
			fmt.Println("YES")
			fmt.Println(a, b, c)
			return
		} else {
			fmt.Println("NO")
			return
		}
	} else {
		A := []int{}
		for k := range memo {
			A = append(A, k)
		}

		a := A[0]
		b := A[1]
		c := (n / a) / b
		fmt.Println("YES")
		fmt.Println(a, b, c)
		return
	}
}

// TrialDivision returns the result of prime factorization of integer N.
func TrialDivision(n int) map[int]int {
	if n <= 1 {
		panic(errors.New("[argument error]: TrialDivision only accepts a NATURAL number"))
	}

	p := map[int]int{}
	for i := 2; i*i <= n; i++ {
		exp := 0
		for n%i == 0 {
			exp++
			n /= i
		}

		if exp == 0 {
			continue
		}
		p[i] = exp
	}
	if n > 1 {
		p[n] = 1
	}

	return p
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

package main

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

var _ = sort.Slice
var _ = math.Sqrt
var _ = strconv.Itoa

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var t int
	fmt.Fscan(in, &t)
	var ans []string
	for i := 0; i < t; i++ {
		var n int
		fmt.Fscan(in, &n)
		cnt := 0
		var lst []int
		for i := 2; i*i <= n; i++ {
			for n%i == 0 {
				n = n / i
				lst = append(lst, i)
				cnt++
			}
		}
		if n != 1 {
			lst = append(lst, n)
			cnt++
		}
		sta :=[]int{lst[0]}
		ansstr := []string{strconv.Itoa(lst[0])}
		now := 1
		top := 0
		set := make(map[int]bool)
		set[lst[0]] = true
		for i := 1; i < len(lst); i++{
			now = now * lst[i]
			if set[now] == false {
				ansstr = append(ansstr, strconv.Itoa(now))
				sta = append(sta, now)
				set[now] = true
				top++
				now = 1
			}
		}

		if top >= 2{
			ans = append(ans, "YES");
			ans = append(ans, strings.Join(ansstr[:3], " "))
		}else{
			ans = append(ans, "NO")
		}
	}
	fmt.Fprintln(out, strings.Join(ans, "\n"));
}

package main

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

var _ = sort.Slice
var _ = math.Sqrt
var _ = strconv.Itoa

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var t int
	fmt.Fscan(in, &t)
	var ans []string
	for i := 0; i < t; i++ {
		var n int
		fmt.Fscan(in, &n)
		cnt := 0
		var lst []int
		for i := 2; i < int(math.Sqrt(float64(n))); i++ {
			for n%i == 0 {
				n = n / i
				lst = append(lst, i)
				cnt++
			}
		}
		if n != 1 {
			lst = append(lst, n)
			cnt++
		}
		sta :=[]int{lst[0]}
		ansstr := []string{strconv.Itoa(lst[0])}
		now := 1
		top := 0
		set := make(map[int]bool)
		set[lst[0]] = true
		for i := 1; i < len(lst); i++{
			now = now * lst[i]
			if set[now] == false {
				ansstr = append(ansstr, strconv.Itoa(now))
				sta = append(sta, now)
				set[now] = true
				top++
				now = 1
			}
		}

		if top >= 2{
			ans = append(ans, "YES");
			ans = append(ans, strings.Join(ansstr[:3], " "))
		}else{
			ans = append(ans, "NO")
		}
	}
	fmt.Fprintln(out, strings.Join(ans, "\n"));
}

package main

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

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

	var t int
	fmt.Fscan(r, &t)
	ans := make([]string, t)
	for i := 0; i < t; i++ {
		var x int
		fmt.Fscan(r, &x)
		if a, b, c, ok := f(x); ok {
			ans[i] = fmt.Sprint("YES\n", a, b, c)
		} else {
			ans[i] = "NO"
		}
	}
	fmt.Fprintln(w, strings.Join(ans, "\n"))
}
func f(n int) (int, int, int, bool) {
	for a := 2; a <= n/8; a++ {
		for b := a + 1; b <= n/8; b++ {
			for c := b + 1; c <= n/8; c++ {
				if a*b*c == n {
					return a, b, c, true
				}
			}
		}
	}
	return 0, 0, 0, false
}


package main

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

func I(i interface{}, delim string) error {
	_, err := fmt.Fscanf(r, "%v"+delim, i)
	return err
}

func O(o interface{}, delim string) {
	fmt.Fprintf(w, "%v"+delim, o)
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func init() {
	if f, err := os.Open("in.txt"); err == nil {
		r = bufio.NewReader(f)
	} else {
		r = bufio.NewReader(os.Stdin)
	}
	w = bufio.NewWriter(os.Stdout)
}

func main() {
	defer w.Flush()
	var n int
	for I(&n, " ") == nil {
		solve(n)
	}
}

func solve(n int) {
	var m int
	I(&m, "\n")
	a, b := make([]string, n), make([]string, m)
	for i := 0; i < n; i++ {
		I(&a[i], "\n")
	}
	for i := 0; i < m; i++ {
		I(&b[i], "\n")
	}
	o := 0
	for i := 0; i < n; i++ {
		for j := 0; j < m; j++ {
			if a[i] == b[j] {
				o++
			}
		}
	}
	for i := 0; i < o; i++ {
		if i%2 == 0 {
			m--
		} else {
			n--
		}
	}
	if n > m {
		O("YES", "\n")
	} else {
		O("NO", "\n")
	}
}

package main

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

func main() {
	scanner := bufio.NewScanner(reader)
	scanner.Scan()
	line := scanner.Text()
	tokens := strings.Split(line, " ")
	n, _ := strconv.Atoi(tokens[0])
	m, _ := strconv.Atoi(tokens[1])
	poland := make(map[string]bool)
	enemy := make(map[string]bool)
	both := 0
	for n > 0 {
		n--
		scanner.Scan()
		poland[scanner.Text()] = true
	}
	for m > 0 {
		m--
		scanner.Scan()
		if _, contains := poland[scanner.Text()]; contains {
			delete(poland, scanner.Text())
			both++
		} else {
			enemy[scanner.Text()] = true
		}
	}
	fmt.Fprintln(writer, solve(len(poland), len(enemy), both))
	writer.Flush()
}

func solve(p, e, b int) string {
	turn := 0
	for b > 0 {
		turn++
		b--
	}
	for {
		if turn%2 == 0 {
			if p == 0 {
				return "NO"
			}
			p--
		} else {
			if e == 0 {
				return "YES"
			}
			e--
		}
		turn++
	}
}

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

func abs64(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

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

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

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

func min64(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

var (
	reader = bufio.NewReaderSize(os.Stdin, 1<<13)
	writer = bufio.NewWriterSize(os.Stdout, 1<<13)
)

func readi() int {
	return int(readi64())
}

func read2i() (int, int) {
	return readi(), readi()
}

func readis(n int) []int {
	res := make([]int, n)
	for i := range res {
		res[i] = readi()
	}
	return res
}

func readi64() int64 {
	b, err := reader.ReadByte()
	for !isValid(b, err) {
		b, err = reader.ReadByte()
	}
	sign, res := int64(1), int64(0)
	if b == '-' {
		sign *= -1
		b, err = reader.ReadByte()
	}
	for isValid(b, err) {
		res = res*10 + int64(b-'0')
		b, err = reader.ReadByte()
	}
	return res * sign
}

func readline() string {
	res := new(bytes.Buffer)
	for {
		line, isPrefix, err := reader.ReadLine()
		if err != nil {
			panic(err)
		}
		res.Write(line)
		if !isPrefix {
			break
		}
	}
	return res.String()
}

func isValid(b byte, err error) bool {
	return err == nil && (('0' <= b && b <= '9') || b == '-')
}

package main

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

func solve() {
	n := readInt()
	m := readInt()
	words := map[string]int{}
	for i := 0; i < n; i++ {
		words[readString()]++
	}
	common := 0
	for i := 0; i < m; i++ {
		if _, ok := words[readString()]; ok {
			common++
		}
	}
	for {
		if common > 0 {
			common--
			n--
			m--
		} else if n > 0 {
			n--
		} else {
			fmt.Println("NO")
			return
		}
		if common > 0 {
			common--
			n--
			m--
		} else if m > 0 {
			m--
		} else {
			fmt.Println("YES")
			return
		}
	}
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

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

// IO

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

func readInt64Array(n int) []int64 {
	res := make([]int64, n)
	for i := 0; i < n; i++ {
		res[i] = readInt64()
	}
	return res
}

package main

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

func I(i interface{}, delim string) error {
	_, err := fmt.Fscanf(r, "%v"+delim, i)
	return err
}

func O(o interface{}, delim string) {
	fmt.Fprintf(w, "%v"+delim, o)
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func init() {
	if f, err := os.Open("in.txt"); err == nil {
		r = bufio.NewReader(f)
	} else {
		r = bufio.NewReader(os.Stdin)
	}
	w = bufio.NewWriter(os.Stdout)
}

func main() {
	defer w.Flush()
	var n int
	for I(&n, " ") == nil {
		solve(n)
	}
}

func solve(n int) {
	var m int
	I(&m, "\n")
	a, aa, b, bb := make([]string, n), make([]string, n), make([]string, m), make([]string, m)
	for i := 0; i < n; i++ {
		I(&a[i], "\n")
	}
	for i := 0; i < m; i++ {
		I(&b[i], "\n")
		flag := false
		for j := 0; j < n; j++ {
			if a[j] == b[i] {
				flag = true
			}
		}
		if flag {
			bb = append([]string{b[i]}, bb...)

		} else {
			bb = append(bb, b[i])
		}
	}
	for i := 0; i < n; i++ {
		flag := false
		for j := 0; j < m; j++ {
			if a[i] == b[j] {
				flag = true
			}
		}
		if flag {
			aa = append([]string{a[i]}, aa...)
		} else {
			aa = append(aa, a[i])
		}
	}
	me := true
	for len(aa) > 0 && len(bb) > 0 {
		if aa[0] == bb[0] {
			aa = aa[1:]
			bb = bb[1:]
		} else {
			if me {
				aa = aa[1:]
			} else {
				bb = bb[1:]
			}
		}
		me = !me
	}
	if len(aa) > 0 {
		O("YES", "\n")
	} else {
		O("NO", "\n")
	}
}


package main

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

func main() {

	reader := NewStdReader(os.Stdin)
	s1, s2, s3 := reader.ReadText(), reader.ReadText(), reader.ReadText()

	s1, s2, s3 = cleanup(s1), cleanup(s2), cleanup(s3)

	c1 := s1 + s2 + s3
	c2 := s1 + s3 + s2
	c3 := s2 + s1 + s3
	c4 := s2 + s3 + s1
	c5 := s3 + s1 + s2
	c6 := s3 + s2 + s1

	n := reader.ReadInt()

	for i := 0; i < n; i++ {
		s := reader.ReadText()
		s = cleanup(s)
		if s == c1 || s == c2 || s == c3 || s == c4 || s == c5 || s == c6 {
			fmt.Println("ACC")
		} else {
			fmt.Println("WA")
		}
	}
}

func cleanup(s string) string {
	s = strings.ToLower(s)
	s = strings.Replace(s, "-", "", -1)
	s = strings.Replace(s, "_", "", -1)
	s = strings.Replace(s, ";", "", -1)
	return s
}

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) ReadText() string {

	buf := bytes.NewBuffer(nil)

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

		if e != nil {
			break
		}
		if b == ' ' || b == '\t' || b == '\r' || b == '\n' {
			if buf.Len() > 0 {
				break
			}
		} else {
			buf.WriteByte(b)
		}
	}

	return buf.String()
}

package main

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

func main() {
	// INPUT
	// file, _ := os.Open("input")
	file := os.Stdin
	reader := bufio.NewReader(file)
	arr := make([]string, 3)
	nStudent := 0
	for i := range arr {
		fmt.Fscanf(reader, "%s\n", &arr[i])
	}
	fmt.Fscanf(reader, "%d\n", &nStudent)
	answers := make([]string, nStudent)
	for i := 0; i < nStudent; i++ {
		fmt.Fscanf(reader, "%s\n", &answers[i])
	}

	// PREPROCESS
	for i := range arr {
		arr[i] = normalize(arr[i])
	}

	// BUILD HASH MAP ALL ACC ANSWER
	positions := []int{0, 1, 2}
	posPermutations := permutate(positions)
	permutations := map[string]bool{}

	for _, p := range posPermutations {
		concat := ""
		for _, v := range p {
			concat += arr[v]
		}
		permutations[strings.ToLower(concat)] = true
	}

	// PROCESS
	for _, answer := range answers {
		realAnswer := normalize(answer)

		if permutations[realAnswer] {
			fmt.Println("ACC")
		} else {
			fmt.Println("WA")
		}
	}

	return
}

func recursiveGenerate(arr []int, curLen, size int, result *[][]int) {
	if curLen == 1 {
		permutation := make([]int, size)
		copy(permutation, arr)
		*result = append(*result, permutation)
		return
	}

	for i := 0; i < curLen; i++ {
		recursiveGenerate(arr, curLen-1, size, result)

		if curLen%2 != 0 {
			arr[0], arr[curLen-1] = arr[curLen-1], arr[0]
		} else {
			arr[i], arr[curLen-1] = arr[curLen-1], arr[i]
		}
	}
}

func permutate(arr []int) [][]int {
	n := len(arr)
	permutations := [][]int{}

	recursiveGenerate(arr, n, n, &permutations)

	return permutations
}

func normalize(s string) string {
	s = strings.ReplaceAll(s, "_", "")
	s = strings.ReplaceAll(s, "-", "")
	s = strings.ReplaceAll(s, ";", "")

	return strings.ToLower(s)
}


package main

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

func main() {
	rd := bufio.NewReader(os.Stdin)
	wr := bufio.NewWriter(os.Stdout)

	var t, n, k, i, j, l1, l2, l3, l, x, ml, mi int
	var A []int

	fmt.Fscanf(rd, "%d\n", &t)
	for i = 0; i < t; i++ {
		fmt.Fscanf(rd, "%d %d\n", &n, &k)
		l = 0
		x = 0
		ml = 0
		mi = 0
		A = make([]int, 0)
		for j = 0; j < n; j++ {
			fmt.Fscanf(rd, "%d", &l3)
			if j > 1 {
				if l1 < l2 && l2 > l3 {
					l++
					A = append(A, j-1)
				}
			}
			if len(A) > 0 && x < len(A) && j-k+1 > A[x]-1 {
				x++
				l--
			}
			if l > ml && j-k+1 >= 0 {
				ml = l
				mi = j - k + 1
			}
			l1 = l2
			l2 = l3
			// for i1 = 0; i1 < len(A); i1++ {
			// 	fmt.Fprintf(wr, "%d ", A[i1])
			// }
			// fmt.Fprintf(wr, "\n")
		}
		fmt.Fscanf(rd, "\n")
		fmt.Fprintf(wr, "%d %d\n", ml+1, mi+1)
	}

	wr.Flush()
}

// https://codeforces.com/contest/1341/problem/B
package main

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

// (c) Dmitriy Blokhin (sv.dblokhin@gmail.com)

func main () {
	var (
		T, n, k int
	)

	//f, _ := os.Open("input.txt")
	//input := bufio.NewReader(f)
	input := bufio.NewReader(os.Stdin)

	fmt.Fscan(input, &T)
	for i := 0; i < T; i++ {
		fmt.Fscan(input, &n, &k)
		a := make([]int, n)
		for i := 0; i < n; i++ {
			fmt.Fscan(input, &a[i])
		}

		pref := make([]int, n + k)
		for i := 2; i < n; i++ {
			if a[i-2] < a[i -1 ] && a[i-1] > a[i] {
				pref[i]++
				pref[i - 2 + k]--
			}
		}

		maxC := 0
		minR := 0
		for i := 1; i <n;i++ {
			pref[i] += pref[i - 1]
			if maxC < pref[i] {
				maxC = pref[i]
				minR = i
			}
		}

		minL := minR - k + 1
		if minL < 0 {
			minL = 0
		}

		fmt.Println(maxC + 1, minL + 1)
	}
}

package main

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

var a = [int(2e5)]int64{}

func main() {
	in := bufio.NewReader(os.Stdin)
	t := 0
	_, _ = fmt.Fscan(in, &t)
	for t > 0 {
		var n, k int
		_, _ = fmt.Fscan(in, &n, &k)
		cur := 0
		for i := 0; i < n; i++ {
			_, _ = fmt.Fscan(in, &a[i])
			if i >= 2 && i <= k - 1  {
				l := i - 1
				if a[l - 1] < a[l] && a[l] > a[l + 1] {
					cur++
				}
			}
		}
		mx := cur
		l := 0
		for i := 1; i <= n - k; i++ {
			if a[i - 1] < a[i] && a[i] > a[i + 1] {
				cur--
			}
			r := i + k - 1
			//fmt.Println(i)
			if a[r - 2] < a[r - 1] && a[r - 1] > a[r] {
				cur++
			}
			if cur > mx {
				mx = cur
				l = i
			}
		}
		fmt.Printf("%d %d\n", mx + 1, l + 1)
		t--
	}
}

/*
URL:
https://codeforces.com/problemset/problem/1341/B
*/

package main

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

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	t int

	n, k int
	A    []int
)

func main() {
	t = ReadInt()
	for i := 0; i < t; i++ {
		n, k = ReadInt2()
		A = ReadIntSlice(n)

		solve()
	}
}

func solve() {
	P := make([]int, n)
	S := make([]int, n+1)
	for i := 1; i < n-1; i++ {
		if A[i-1] < A[i] && A[i] > A[i+1] {
			P[i] = 1
		}
	}
	for i := 0; i < n; i++ {
		S[i+1] = S[i] + P[i]
	}

	ans := 1
	idx := 1
	for l, r := 0, k; r <= n; l, r = l+1, r+1 {
		ll, rr := l+1, r-1
		tmp := S[rr] - S[ll]
		if ChMax(&ans, tmp+1) {
			idx = l + 1
		}
	}
	fmt.Println(ans, idx)
}

// ChMax accepts a pointer of integer and a target value.
// If target value is LARGER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMax(updatedValue *int, target int) bool {
	if *updatedValue < target {
		*updatedValue = target
		return true
	}
	return false
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

package main

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

// github.com/EndlessCheng/codeforces-go
func main() {
	in := bufio.NewReader(os.Stdin)
	var t, n, k int
	for Fscan(in, &t); t > 0; t-- {
		Fscan(in, &n, &k)
		a := make([]int, n)
		for i := range a {
			Fscan(in, &a[i])
		}
		sum := make([]int, n+1)
		for i := 1; i+1 < n; i++ {
			sum[i+1] = sum[i]
			if a[i-1] < a[i] && a[i] > a[i+1] {
				sum[i+1]++
			}
		}
		sum[n] = sum[n-1]
		ans, l := 0, 0
		for i := 0; i+k <= n; i++ {
			s := sum[i+k] - sum[i]
			if sum[i+1] > sum[i] {
				s--
			}
			if sum[i+k] > sum[i+k-1] {
				s--
			}
			if s > ans {
				ans = s
				l = i
			}
		}
		Println(ans+1, l+1)
	}
}

package main

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

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

	var t, n, k int
	for Fscan(in, &t); t > 0; t-- {
		Fscan(in, &n, &k)
		a := make([]int, n)
		for i := range a {
			Fscan(in, &a[i])
		}
		sum := make([]int, n+1)
		for i := 1; i+1 < n; i++ {
			sum[i+1] = sum[i]
			if a[i-1] < a[i] && a[i] > a[i+1] {
				sum[i+1]++
			}
		}
		sum[n] = sum[n-1]
		ans, l := 0, 0
		for i := 0; i+k <= n; i++ {
			s := sum[i+k] - sum[i]
			if sum[i+1] > sum[i] {
				s--
			}
			if sum[i+k] > sum[i+k-1] {
				s--
			}
			if s > ans {
				ans = s
				l = i
			}
		}
		Fprintln(out, ans+1, l+1)
	}
}

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

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

func newScanner() *bufio.Scanner {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	return scanner
}

func scanInt() int {
	sc.Scan()
	v, _ := strconv.Atoi(sc.Text())
	return v
}

func scanInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = scanInt()
	}
	return a
}

func scanString() string {
	if sc.Scan() {
		return sc.Text()
	}
	panic(sc.Err())
}

var sc = newScanner()

func main() {
	w := bufio.NewWriter(os.Stdout)
	defer w.Flush()
	for t:= scanInt(); t >0 ; t-- {
		n, k := scanInt(), scanInt()
		a := scanInts(n)
		p := make([]int, n)
		for i := 1; i < n-1; i++ {
			if a[i] > a[i-1] && a[i] > a[i+1] {
				p[i] = 1
			}
		}
		x := 0
		for i := 1; i <= k-2; i++ {
			x += p[i]
		}
		max, l := x, 0
		for i := 1; i <= n-k; i++ {
			x += p[i+k-2] - p[i]
			if x > max {
				max, l = x, i
			}
		}

		fmt.Fprintln(w,max+1, l+1)
	}
}

package main

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

type BufferedWriter interface {
	Printf(format string, a ...interface{})
	Flush()
}

type writerImpl struct {
	*bufio.Writer
}

func NewBufferedWriter(writer io.Writer) BufferedWriter {
	return &writerImpl{Writer: bufio.NewWriter(writer)}
}

func (impl *writerImpl) Printf(f string, a ...interface{}) {
	fmt.Fprintf(impl.Writer, f, a...)
}

func (impl *writerImpl) Flush() {
	impl.Writer.Flush()
}

type WordScanner interface {
	NextInt() int
	NextInt64() int64
	NextString() string
}

type wordScannerImpl struct {
	*bufio.Scanner
}

func NewWordScanner(reader io.Reader) WordScanner {
	s := bufio.NewScanner(reader)
	s.Split(bufio.ScanWords)
	// adjust the following size as needed
	// 2 << 17 is good enough to scan strings of len 2*10^5
	// it could go as high as 2 << 26 before cf judge breaks
	size := 2 << 20
	buf := make([]byte, size)
	s.Buffer(buf, size)
	return &wordScannerImpl{Scanner: s}
}

func (impl *wordScannerImpl) NextInt() int {
	impl.Scan()
	bb := impl.Bytes()
	i := 0
	if bb[0] == '-' {
		for _, b := range bb[1:] {
			i *= 10
			i -= int(b - '0')
		}
		return i
	}
	for _, b := range bb {
		i *= 10
		i += int(b - '0')
	}
	return i
}

func (impl *wordScannerImpl) NextInt64() int64 {
	impl.Scan()
	bb := impl.Bytes()
	i := int64(0)
	if bb[0] == '-' {
		for _, b := range bb[1:] {
			i *= 10
			i -= int64(b - '0')
		}
		return i
	}
	for _, b := range bb {
		i *= 10
		i += int64(b - '0')
	}
	return i
}

func (impl *wordScannerImpl) NextString() string {
	impl.Scan()
	return impl.Text()
}

var reader = NewWordScanner(os.Stdin)
var writer = NewBufferedWriter(os.Stdout)

func main() {
	defer writer.Flush()
	t := reader.NextInt64()
	for ; t > 0; t-- {
		n, k := reader.NextInt64(), reader.NextInt64()
		aa := make([]int64, n)
		for i := int64(0); i < n; i++ {
			aa[i] = reader.NextInt64()
		}
		parts, idx := sol(k, aa)
		writer.Printf("%d %d\n", parts, idx)
	}
}

func sol(k int64, aa []int64) (int64, int64) {
	l := int64(0)
	r := l+k-1
	currMax := int64(0)
	currMaxL := int64(0)
	for i := l + 1; i < r; i++ {
		if aa[i] > aa[i-1] && aa[i] > aa[i+1] {
			currMax++
		}
	}
	tmp := currMax
	for r < int64(len(aa))-1 {
		if aa[r] > aa[r-1] && aa[r] > aa[r+1] {
			tmp++
		}
		if aa[l+1] > aa[l] && aa[l+1] > aa[l+2] {
			tmp--
		}
		l++
		r++
		if tmp > currMax {
			currMax = tmp
			currMaxL = l
		}
	}
	return currMax+1, currMaxL+1
}

package main

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

func main() {
	s := NewScanner()
	t := s.NextInt()

	for i := 0; i < t; i++ {
		n, k := s.NextInt(), s.NextInt()
		ar := make([]int, n)
		for i := 0; i < n; i++ {
			ar[i] = s.NextInt()
		}

		peaks := make([]int, n)
		peaks[0] = 0
		for i := 1; i < n-1; i++ {
			peaks[i] = peaks[i-1]
			if ar[i-1] < ar[i] && ar[i] > ar[i+1] {
				peaks[i]++
			}
		}
		peaks[n-1] = peaks[n-2]

		var l, t int
		for i := 0; i <= n-k; i++ {
			s, e := i, i+k-2
			ns := peaks[e] - peaks[s]
			if ns > t {
				t = ns
				l = i
			}
		}

		fmt.Printf("%d %d\n", t+1, l+1)

	}
}

type scanner struct {
	*bufio.Scanner
}

func NewScanner() *scanner {
	s := bufio.NewScanner(os.Stdin)
	s.Split(bufio.ScanWords)
	return &scanner{s}
}

func (s *scanner) NextInt() int {
	s.Scan()
	i, _ := strconv.Atoi(s.Text())
	return i
}

func (s *scanner) NextInt64() int64 {
	s.Scan()
	i, _ := strconv.ParseInt(s.Text(), 10, 64)
	return i
}

func (s *scanner) NextString() string {
	s.Scan()
	return s.Text()
}

// https://codeforces.com/contest/1341/problem/B
package main

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

// (c) Dmitriy Blokhin (sv.dblokhin@gmail.com)

func main () {
	var (
		T, n, k int
	)

	//f, _ := os.Open("input.txt")
	//input := bufio.NewReader(f)
	input := bufio.NewReader(os.Stdin)

	fmt.Fscan(input, &T)
	for i := 0; i < T; i++ {
		fmt.Fscan(input, &n, &k)
		a := make([]int, n)
		for i := 0; i < n; i++ {
			fmt.Fscan(input, &a[i])
		}

		minL := int(10e6)
		minLen := n
		maxC := 0
		dp := make([][]int, n)
		for i := 0; i < n; i++ {
			dp[i] = make([]int, n)
		}
		for l := 0; l < n; l++ {
			for r := l + 2; r < min(l + k, n); r++ {
				dp[l][r] = dp[l][r - 1]
				if a[r - 2] < a[r - 1] && a[r - 1] > a[r] {
					//println("Found pik:", l, r, "total: ", dp[l][r - 1] + 1)
					dp[l][r] = dp[l][r - 1] + 1

					if maxC < dp[l][r] {
						maxC = dp[l][r]
						minLen = r - l
						minL = l
					}
					if maxC == dp[l][r] {
						//println("COND: ", l, r, r -l, minLen)
						if r - l >= k - 1  && r - l < minLen {
							minLen = r - l
							minL = l
							//println("set minL", minL, minLen, maxC)
						}
						if r - l == minLen {
							minL = min(minL, l)
						}
					}
				}
			}
		}

		fmt.Println(maxC + 1, minL + 1)
	}
}

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

package main

import "fmt"

var a = [int(2e5)]int64{}

func main() {
	t := 0
	_, _ = fmt.Scan(&t)
	for t > 0 {
		var n, k int
		_, _ = fmt.Scan(&n, &k)
		for i := 0; i < n; i++ {
			_, _ = fmt.Scanf("%d", &a[i])
		}
		cur := 0
		for i := 1; i < k - 1; i++ {
			if a[i - 1] < a[i] && a[i] > a[i + 1] {
				cur++
			}
		}
		mx := cur
		l := 0
		for i := 1; i <= n - k; i++ {
			if a[i - 1] < a[i] && a[i] > a[i + 1] {
				cur--
			}
			r := i + k - 1
			//fmt.Println(i)
			if a[r - 2] < a[r - 1] && a[r - 1] > a[r] {
				cur++
			}
			if cur > mx {
				mx = cur
				l = i
			}
		}
		fmt.Printf("%d %d\n", mx + 1, l + 1)
		t--
	}
}

package main

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

func main() {
	rd := bufio.NewReader(os.Stdin)
	wr := bufio.NewWriter(os.Stdout)

	var t, n, k, i, j, l1, l2, l3, l, x, ml, mi int
	var A []int

	fmt.Fscanf(rd, "%d\n", &t)
	for i = 0; i < t; i++ {
		fmt.Fscanf(rd, "%d %d\n", &n, &k)
		l = 0
		x = 0
		ml = 0
		mi = 0
		A = make([]int, 0)
		for j = 0; j < n; j++ {
			fmt.Fscanf(rd, "%d", &l3)
			if j > 1 {
				if l1 < l2 && l2 > l3 {
					l++
					A = append(A, j-1)
				}
			}
			if len(A) > 0 && x < len(A) && j-k+1 > A[x] {
				x++
				l--
			}
			if l > ml && j-k+1 >= 0 {
				ml = l
				mi = j - k + 1
			}
			l1 = l2
			l2 = l3
			// for i1 = 0; i1 < len(A); i1++ {
			// 	fmt.Fprintf(wr, "%d ", A[i1])
			// }
			// fmt.Fprintf(wr, "\n")
		}
		fmt.Fscanf(rd, "\n")
		fmt.Fprintf(wr, "%d %d\n", ml+1, mi+1)
	}

	wr.Flush()
}


package main

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

func solve() {
	n := readInt()
	a := make([]int, 0)
	for i := 0; i < n; i++ {
		a = append(a, readInt())
	}
	const N = 100110

	f := make([]int, N)
	for _, x := range a {
		f[x]++
	}

	ans := 1

	for i := 2; i < N; i++ {
		for j := 2 * i; j < N; j += i {
			f[i] += f[j]
		}
		ans = max(ans, f[i])
	}
	fmt.Println(ans)
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

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

// IO

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

func readInt64Array(n int) []int64 {
	res := make([]int64, n)
	for i := 0; i < n; i++ {
		res[i] = readInt64()
	}
	return res
}

// Codeforces 757 B  Bash's Big Day
package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
	"strconv"
	"sort"
)
var in *bufio.Reader

func readFive() (int,int,int,int,int) {
	var a [5]int
	s, err := in.ReadString('\n')
	if err != nil {
		fmt.Println("first read failure", err)
		panic(err)
	}
	ss := strings.Split(strings.Trim(s, " \n\r"), " ")
	for i:=0; i<len(ss); i++ {
		a[i], err = strconv.Atoi(ss[i])
		if err != nil {
			fmt.Println("n atoi failure", err)
			panic(err)
		}
	}
	return a[0],a[1],a[2],a[3],a[4]
}

func readLineNumbs(n int) []int {
	a := make([]int, n)
	s, err := in.ReadString('\n')
	if err != nil {
		fmt.Println("read failure", err)
		panic(err)
	}
	ss := strings.Split(strings.Trim(s, " \n\r"), " ")
	for j:=0; j<n; j++ {
		aa,err := strconv.Atoi(ss[j])
		if err != nil {
			fmt.Println("aa conv failed", err)
			panic(err)
		}
		a[j] = aa
	}
	return a
}

var n int
var s []int
var maxPok int
var nPrimePok []int
var primes []int
var nPrime int

func readData() {
	in = bufio.NewReader(os.Stdin)
	// reading n
	n,_,_,_,_ = readFive()
	s = readLineNumbs(n)
}

func toPrimeIdxs(a int, sameCnt int)  {
	for i:=0; i<nPrime && a>1; i++ {
		pr := primes[i]
		if (a % pr) == 0 {
			nPrimePok[i] += sameCnt
			// fmt.Printf("a, Prime, i, cnt = %d %d %d %d \n",a,primes[i],i,nPrimePok[i])
			for (a % pr)==0 {
				a = a/pr
			}
		}
	}
}

func eratosthene() {
	maxPok = 0
	for i:=0; i<n; i++ {
		if maxPok<s[i] {
			maxPok = s[i]+5
		}
	}
	isPrime := make([]bool, maxPok)
	for i:=0; i<maxPok; i++ {
		isPrime[i] = true
	}
	for i:=2; i<maxPok; i++ {
		if isPrime[i] {
			for j:=2; i*j<maxPok; j++ {
				isPrime[i*j] = false
			}
		}
	}
	primes = make([]int,0)
	nPrime = 0
	for i:=2; i<maxPok; i++ {
		if isPrime[i] {
			primes = append(primes, i)
		}
	}
	nPrime = len(primes)
}

func solve() {
	eratosthene()
	sort.Ints(s)
	nPrimePok = make([]int, nPrime)
	sameCnt := 1
	for i:=0; i<n; i++ {
		if i==n-1 || s[i] != s[i+1] {
			toPrimeIdxs(s[i], sameCnt)
			sameCnt = 1
		} else {
			sameCnt++
		}

	}
	maxPok = 1
	for i:=0; i<nPrime; i++ {
		if nPrimePok[i] > maxPok {
			maxPok = nPrimePok[i]
			// fmt.Printf("prime,nPriRok = %d %d\n", primes[i],nPrimePok[i])
		}
	}
}

func printRes() {
	fmt.Println(maxPok)
}

func main() {
	readData()
	solve()
	printRes()
}

package main

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

func main() {
	n := readi()
	values := readis(n)
	fmt.Fprintln(writer, solve(values))
	writer.Flush()
}

func solve(values []int) int {
	primes := getPrimes(1e5)
	primeCount := make([]int, 1e5)
	fillAll(values, primes, primeCount)
	ans := 0
	for _, p := range primes {
		ans = max(ans, primeCount[p])
	}
	if ans == 0 {
		ans = 1
	}
	return ans
}

func fillAll(values, primes, primeCount []int) {
	for _, x := range values {
		fill(x, primes, primeCount)
	}
}

func fill(n int, primes, primeCount []int) {
	for _, p := range primes {
		if p*p > n {
			break
		}
		if n%p == 0 {
			primeCount[p]++
			for n%p == 0 {
				n /= p
			}
		}
	}
	if n > 1 {
		primeCount[n]++
	}
}

func getPrimes(n int) []int {
	isPrime := make([]bool, n)
	for i := 2; i < len(isPrime); i++ {
		isPrime[i] = true
	}
	max := int(math.Sqrt(float64(n)))
	for i := 2; i <= max; i++ {
		if isPrime[i] {
			for j := i * i; j < len(isPrime); j += i {
				isPrime[j] = false
			}
		}
	}
	var primes []int
	for n, ok := range isPrime {
		if ok {
			primes = append(primes, n)
		}
	}
	return primes
}

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

func abs64(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

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

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

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

func min64(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

var (
	reader = bufio.NewReaderSize(os.Stdin, 1<<13)
	writer = bufio.NewWriterSize(os.Stdout, 1<<13)
)

func readi() int {
	return int(readi64())
}

func read2i() (int, int) {
	return readi(), readi()
}

func readis(n int) []int {
	res := make([]int, n)
	for i := range res {
		res[i] = readi()
	}
	return res
}

func readi64() int64 {
	b, err := reader.ReadByte()
	for !isValid(b, err) {
		b, err = reader.ReadByte()
	}
	sign, res := int64(1), int64(0)
	if b == '-' {
		sign *= -1
		b, err = reader.ReadByte()
	}
	for isValid(b, err) {
		res = res*10 + int64(b-'0')
		b, err = reader.ReadByte()
	}
	return res * sign
}

func readline() string {
	res := new(bytes.Buffer)
	for {
		line, isPrefix, err := reader.ReadLine()
		if err != nil {
			panic(err)
		}
		res.Write(line)
		if !isPrefix {
			break
		}
	}
	return res.String()
}

func isValid(b byte, err error) bool {
	return err == nil && (('0' <= b && b <= '9') || b == '-')
}

package main

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

func I(i interface{}, delim string) {
	fmt.Fscanf(r, "%v"+delim, i)
}

func O(o interface{}, delim string) {
	fmt.Fprintf(w, "%v"+delim, o)
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func main() {
	r = bufio.NewReader(os.Stdin)
	w = bufio.NewWriter(os.Stdout)
	defer w.Flush()
	var n int
	I(&n, "\n")
	max := 100001
	in := make([]int, max)
	for i := 0; i < n; i++ {
		var o int
		I(&o, " ")
		in[o]++
	}
	m := 1
	for i := 2; i < max; i++ {
		mm := 0
		for j := i; j < max; j += i {
			mm += in[j]
		}
		if mm > m {
			m = mm
		}
	}
	O(m, "\n")
}

/*
URL:
https://codeforces.com/problemset/problem/757/B
*/

package main

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

/********** FAU standard libraries **********/

//fmt.Sprintf("%b\n", 255) 	// binary expression

/********** I/O usage **********/

//str := ReadString()
//i := ReadInt()
//X := ReadIntSlice(n)
//S := ReadRuneSlice()
//a := ReadFloat64()
//A := ReadFloat64Slice(n)

//str := ZeroPaddingRuneSlice(num, 32)
//str := PrintIntsLine(X...)

/*******************************************************************/

const (
	// General purpose
	MOD          = 1000000000 + 7
	ALPHABET_NUM = 26
	INF_INT64    = math.MaxInt64
	INF_BIT60    = 1 << 60
	INF_INT32    = math.MaxInt32
	INF_BIT30    = 1 << 30
	NIL          = -1

	// for dijkstra, prim, and so on
	WHITE = 0
	GRAY  = 1
	BLACK = 2
)

func init() {
	// bufio.ScanWords <---> bufio.ScanLines
	ReadString = newReadString(os.Stdin, bufio.ScanWords)
	stdout = bufio.NewWriter(os.Stdout)
}

var (
	n int
	A []int

	memo [100000 + 50]int
)

func main() {
	n = ReadInt()
	A = ReadIntSlice(n)

	for _, a := range A {
		if a == 1 {
			continue
		}

		M := TrialDivision(a)
		for k := range M {
			memo[k]++
		}
	}

	ans := 1
	for i := 2; i <= 100000; i++ {
		ChMax(&ans, memo[i])
	}
	fmt.Println(ans)
}

// ChMax accepts a pointer of integer and a target value.
// If target value is LARGER than the first argument,
//	then the first argument will be updated by the second argument.
func ChMax(updatedValue *int, target int) bool {
	if *updatedValue < target {
		*updatedValue = target
		return true
	}
	return false
}

// TrialDivision returns the result of prime factorization of integer N.
func TrialDivision(n int) map[int]int {
	var i, exp int
	p := map[int]int{}

	if n <= 1 {
		panic(errors.New("[argument error]: TrialDivision only accepts a NATURAL number"))
	}

	for i = 2; i*i <= n; i++ {
		exp = 0
		for n%i == 0 {
			exp++
			n /= i
		}

		if exp == 0 {
			continue
		}
		p[i] = exp
	}
	if n > 1 {
		p[n] = 1
	}

	return p
}

/*******************************************************************/

/*********** I/O ***********/

var (
	// ReadString returns a WORD string.
	ReadString func() string
	stdout     *bufio.Writer
)

func newReadString(ior io.Reader, sf bufio.SplitFunc) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	r.Split(sf)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

// ReadInt returns an integer.
func ReadInt() int {
	return int(readInt64())
}
func ReadInt2() (int, int) {
	return int(readInt64()), int(readInt64())
}
func ReadInt3() (int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64())
}
func ReadInt4() (int, int, int, int) {
	return int(readInt64()), int(readInt64()), int(readInt64()), int(readInt64())
}

// ReadInt64 returns as integer as int64.
func ReadInt64() int64 {
	return readInt64()
}
func ReadInt64_2() (int64, int64) {
	return readInt64(), readInt64()
}
func ReadInt64_3() (int64, int64, int64) {
	return readInt64(), readInt64(), readInt64()
}
func ReadInt64_4() (int64, int64, int64, int64) {
	return readInt64(), readInt64(), readInt64(), readInt64()
}

func readInt64() int64 {
	i, err := strconv.ParseInt(ReadString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// ReadIntSlice returns an integer slice that has n integers.
func ReadIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func ReadInt64Slice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadInt64()
	}
	return b
}

// ReadFloat64 returns an float64.
func ReadFloat64() float64 {
	return float64(readFloat64())
}

func readFloat64() float64 {
	f, err := strconv.ParseFloat(ReadString(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadFloatSlice returns an float64 slice that has n float64.
func ReadFloat64Slice(n int) []float64 {
	b := make([]float64, n)
	for i := 0; i < n; i++ {
		b[i] = ReadFloat64()
	}
	return b
}

// ReadRuneSlice returns a rune slice.
func ReadRuneSlice() []rune {
	return []rune(ReadString())
}

/*********** Debugging ***********/

// ZeroPaddingRuneSlice returns binary expressions of integer n with zero padding.
// For debugging use.
func ZeroPaddingRuneSlice(n, digitsNum int) []rune {
	sn := fmt.Sprintf("%b", n)

	residualLength := digitsNum - len(sn)
	if residualLength <= 0 {
		return []rune(sn)
	}

	zeros := make([]rune, residualLength)
	for i := 0; i < len(zeros); i++ {
		zeros[i] = '0'
	}

	res := []rune{}
	res = append(res, zeros...)
	res = append(res, []rune(sn)...)

	return res
}

// Strtoi is a wrapper of strconv.Atoi().
// If strconv.Atoi() returns an error, Strtoi calls panic.
func Strtoi(s string) int {
	if i, err := strconv.Atoi(s); err != nil {
		panic(errors.New("[argument error]: Strtoi only accepts integer string"))
	} else {
		return i
	}
}

// PrintIntsLine returns integers string delimited by a space.
func PrintIntsLine(A ...int) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.Itoa(A[i])
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintIntsLine returns integers string delimited by a space.
func PrintInts64Line(A ...int64) string {
	res := []rune{}

	for i := 0; i < len(A); i++ {
		str := strconv.FormatInt(A[i], 10) // 64bit int version
		res = append(res, []rune(str)...)

		if i != len(A)-1 {
			res = append(res, ' ')
		}
	}

	return string(res)
}

// PrintfDebug is wrapper of fmt.Fprintf(os.Stderr, format, a...)
func PrintfDebug(format string, a ...interface{}) {
	fmt.Fprintf(os.Stderr, format, a...)
}

// PrintfBufStdout is function for output strings to buffered os.Stdout.
// You may have to call stdout.Flush() finally.
func PrintfBufStdout(format string, a ...interface{}) {
	fmt.Fprintf(stdout, format, a...)
}

package main

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

func solve() {
	n := readInt()
	a := make([]int, 0)
	visited := make(map[int]int)
	for i := 0; i < n; i++ {
		value := readInt()
		if cnt := visited[value]; cnt == 0 {
			a = append(a, value)
		}
		visited[value]++
	}
	m := make(map[int]map[int]bool)
	for i := 0; i < len(a); i++ {
		value := a[i]
		for j := 2; j <= value; j++ {
			if value%j == 0 {
				if _, ok := m[j]; !ok {
					m[j] = make(map[int]bool)
				}
				m[j][a[i]] = true
				value /= j
				j--
			}
		}
	}
	ans := 1
	for _, v := range m {
		sum := 0
		for value := range v {
			sum += visited[value]
		}
		if sum > ans {
			ans = sum
		}
	}
	fmt.Println(ans)
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

// IO

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

func readInt64Array(n int) []int64 {
	res := make([]int64, n)
	for i := 0; i < n; i++ {
		res[i] = readInt64()
	}
	return res
}

package main

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

func main() {
	n := readi()
	values := readis(n)
	fmt.Fprintln(writer, solve(values))
	writer.Flush()
}

func solve(values []int) int {
	primes := getPrimes(1e5)
	primeCount := make([]int, 1e5)
	fillAll(values, primes, primeCount)
	ans := 0
	for _, p := range primes {
		ans = max(ans, primeCount[p])
	}
	return ans
}

func fillAll(values, primes, primeCount []int) {
	for _, x := range values {
		fill(x, primes, primeCount)
	}
}

func fill(n int, primes, primeCount []int) {
	for _, p := range primes {
		if p*p > n {
			break
		}
		if n%p == 0 {
			primeCount[p]++
			for n%p == 0 {
				n /= p
			}
		}
	}
	if n > 1 {
		primeCount[n]++
	}
}

func getPrimes(n int) []int {
	isPrime := make([]bool, n)
	for i := 2; i < len(isPrime); i++ {
		isPrime[i] = true
	}
	max := int(math.Sqrt(float64(n)))
	for i := 2; i <= max; i++ {
		if isPrime[i] {
			for j := i * i; j < len(isPrime); j += i {
				isPrime[j] = false
			}
		}
	}
	var primes []int
	for n, ok := range isPrime {
		if ok {
			primes = append(primes, n)
		}
	}
	return primes
}

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

func abs64(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

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

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

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

func min64(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

var (
	reader = bufio.NewReaderSize(os.Stdin, 1<<13)
	writer = bufio.NewWriterSize(os.Stdout, 1<<13)
)

func readi() int {
	return int(readi64())
}

func read2i() (int, int) {
	return readi(), readi()
}

func readis(n int) []int {
	res := make([]int, n)
	for i := range res {
		res[i] = readi()
	}
	return res
}

func readi64() int64 {
	b, err := reader.ReadByte()
	for !isValid(b, err) {
		b, err = reader.ReadByte()
	}
	sign, res := int64(1), int64(0)
	if b == '-' {
		sign *= -1
		b, err = reader.ReadByte()
	}
	for isValid(b, err) {
		res = res*10 + int64(b-'0')
		b, err = reader.ReadByte()
	}
	return res * sign
}

func readline() string {
	res := new(bytes.Buffer)
	for {
		line, isPrefix, err := reader.ReadLine()
		if err != nil {
			panic(err)
		}
		res.Write(line)
		if !isPrefix {
			break
		}
	}
	return res.String()
}

func isValid(b byte, err error) bool {
	return err == nil && (('0' <= b && b <= '9') || b == '-')
}

package main

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

func I(i interface{}, delim string) {
	fmt.Fscanf(r, "%v"+delim, i)
}

func O(o interface{}, delim string) {
	fmt.Fprintf(w, "%v"+delim, o)
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func main() {
	r = bufio.NewReader(os.Stdin)
	w = bufio.NewWriter(os.Stdout)
	defer w.Flush()
	var n int
	I(&n, "\n")
	in := make([]int, n)
	for i := 0; i < n; i++ {
		I(&in[i], " ")
	}
	o := make([]int, 10000)
	mmm := 0
	for i := 2; i < 10000; i++ {
		qq := true
		for ii := 2; ii < 100; ii++ {
			if i%ii == 0 {
				qq = false
			}
		}
		if qq || i < 100 {
			for j := 0; j < n; j++ {
				if in[j]%i == 0 {
					o[i]++
				}
			}
			if o[i] > mmm {
				mmm = o[i]
			}
		}
	}
	O(mmm, "\n")
}

package main

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

func I(i interface{}, delim string) {
	fmt.Fscanf(r, "%v"+delim, i)
}

func O(o interface{}, delim string) {
	fmt.Fprintf(w, "%v"+delim, o)
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func main() {
	r = bufio.NewReader(os.Stdin)
	w = bufio.NewWriter(os.Stdout)
	defer w.Flush()
	var n int
	I(&n, "\n")
	in := make([]int, n)
	for i := 0; i < n; i++ {
		I(&in[i], " ")
	}
	o := make([]int, 34200)
	mmm := 1
	for i := 2; i < 34200; i++ {
		qq := true
		for ii := 2; ii < 50; ii++ {
			if i%ii == 0 {
				qq = false
			}
		}
		if qq || i < 50 {
			for j := 0; j < n; j++ {
				if in[j]%i == 0 {
					o[i]++
				}
			}
			if o[i] > mmm {
				mmm = o[i]
			}
		}
	}
	O(mmm, "\n")
}

package main

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

func I(i interface{}, delim string) {
	fmt.Fscanf(r, "%v"+delim, i)
}

func O(o interface{}, delim string) {
	fmt.Fprintf(w, "%v"+delim, o)
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func main() {
	r = bufio.NewReader(os.Stdin)
	w = bufio.NewWriter(os.Stdout)
	defer w.Flush()
	var n int
	I(&n, "\n")
	in := make([]int, n)
	for i := 0; i < n; i++ {
		I(&in[i], " ")
	}
	o := make([]int, 5000)
	for i := 2; i < 5000; i++ {
		for j := 0; j < n; j++ {
			if in[j]%i == 0 {
				o[i]++
			}
		}
	}
	sort.Sort(sort.Reverse(sort.IntSlice(o)))
	O(o[0], "\n")
}

package main

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

func I(i interface{}, delim string) {
	fmt.Fscanf(r, "%v"+delim, i)
}

func O(o interface{}, delim string) {
	fmt.Fprintf(w, "%v"+delim, o)
}

var (
	r *bufio.Reader
	w *bufio.Writer
)

func main() {
	r = bufio.NewReader(os.Stdin)
	w = bufio.NewWriter(os.Stdout)
	defer w.Flush()
	var n int
	I(&n, "\n")
	in := make([]int, n)
	for i := 0; i < n; i++ {
		I(&in[i], " ")
	}
	o := make([]int, 34000)
	mmm := 0
	for i := 2; i < 34000; i++ {
		qq := true
		for ii := 2; ii < 50; ii++ {
			if i%ii == 0 {
				qq = false
			}
		}
		if qq || i < 50 {
			for j := 0; j < n; j++ {
				if in[j]%i == 0 {
					o[i]++
				}
			}
			if o[i] > mmm {
				mmm = o[i]
			}
		}
	}
	O(mmm, "\n")
}

package main

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

func solve() {
	n := readInt()
	a := make([]int, 0)
	v := make(map[int]bool)
	for i := 0; i < n; i++ {
		value := readInt()
		if _, ok := v[value]; !ok {
			v[value] = true
			a = append(a, value)
		}
	}

	res := make(map[int]map[int]bool)
	for i := 0; i < len(a); i++ {
		for j := i + 1; j < len(a); j++ {
			div := gcd(a[i], a[j])
			if div > 1 {
				if _, ok := res[div]; !ok {
					res[div] = make(map[int]bool)
				}
				res[div][a[i]] = true
				res[div][a[j]] = true
			}
		}
	}
	ans := 1
	for _, v := range res {
		if len(v) > ans {
			ans = len(v)
		}
	}
	fmt.Println(ans)
}

func isPrime(num int) bool {
	if num < 2 {
		return false
	}
	if num == 2 {
		return true
	}
	if num%2 == 0 {
		return false
	}
	for i := 3; i*i <= num; i += 2 {
		if num%i == 0 {
			return false
		}
	}
	return true
}

func gcd(x, y int) int {
	for y != 0 {
		x, y = y, x%y
	}
	return x
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

// IO

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

func readInt64Array(n int) []int64 {
	res := make([]int64, n)
	for i := 0; i < n; i++ {
		res[i] = readInt64()
	}
	return res
}

package main

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

func solve() {
	n := readInt()
	a := make([]int, 0)
	v := make(map[int]bool)

	for i := 0; i < n; i++ {
		value := readInt()
		if _, ok := v[value]; !ok {
			v[value] = true
			a = append(a, value)
		}
	}
	m := make(map[int]map[int]bool)
	for i := 0; i < len(a); i++ {
		value := a[i]
		for j := 2; j <= value; j++ {
			if value%j == 0 {
				if _, ok := m[j]; !ok {
					m[j] = make(map[int]bool)
				}
				m[j][value] = true
				value /= j
				j--
			}
		}
	}
	ans := 0
	for _, v := range m {
		if len(v) > ans {
			ans = len(v)
		}

	}
	fmt.Println(ans)
}

func isPrime(num int) bool {
	if num < 2 {
		return false
	}
	if num == 2 {
		return true
	}
	if num%2 == 0 {
		return false
	}
	for i := 3; i*i <= num; i += 2 {
		if num%i == 0 {
			return false
		}
	}
	return true
}

func gcd(x, y int) int {
	for y != 0 {
		x, y = y, x%y
	}
	return x
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

// IO

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

func readInt64Array(n int) []int64 {
	res := make([]int64, n)
	for i := 0; i < n; i++ {
		res[i] = readInt64()
	}
	return res
}

package main

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

func solve() {
	n := readInt()
	a := make([]int, 0)
	v := make(map[int]bool)

	for i := 0; i < n; i++ {
		value := readInt()
		if _, ok := v[value]; !ok {
			v[value] = true
			a = append(a, value)
		}
	}
	m := make(map[int]map[int]bool)
	for i := 0; i < len(a); i++ {
		value := a[i]
		for j := 2; j <= value; j++ {
			if value%j == 0 {
				if _, ok := m[j]; !ok {
					m[j] = make(map[int]bool)
				}
				m[j][value] = true
				value /= j
				j--
			}
		}
	}
	ans := 1
	for k, v := range m {
		if k > 1 && len(v) > ans {
			ans = len(v)
		}
	}
	fmt.Println(ans)
}

func isPrime(num int) bool {
	if num < 2 {
		return false
	}
	if num == 2 {
		return true
	}
	if num%2 == 0 {
		return false
	}
	for i := 3; i*i <= num; i += 2 {
		if num%i == 0 {
			return false
		}
	}
	return true
}

func gcd(x, y int) int {
	for y != 0 {
		x, y = y, x%y
	}
	return x
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

// IO

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

func readInt64Array(n int) []int64 {
	res := make([]int64, n)
	for i := 0; i < n; i++ {
		res[i] = readInt64()
	}
	return res
}

package main

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

func solve() {
	n := readInt()
	a := make([]int, 0)
	v := make(map[int]bool)
	for i := 0; i < n; i++ {
		value := readInt()
		if _, ok := v[value]; !ok {
			v[value] = true
			a = append(a, value)
		}
	}
	sort.Ints(a)
	ans := 0
	for i := 0; i < len(a); i++ {
		cnt := 1
		for j := i + 1; j < len(a); j++ {
			if a[j]%a[i] == 0 {
				cnt++
			}
		}
		if ans < cnt {
			ans = cnt
		}
	}
	fmt.Println(ans)
}

func isPrime(num int) bool {
	if num < 2 {
		return false
	}
	if num == 2 {
		return true
	}
	if num%2 == 0 {
		return false
	}
	for i := 3; i*i <= num; i += 2 {
		if num%i == 0 {
			return false
		}
	}
	return true
}

func gcd(x, y int) int {
	for y != 0 {
		x, y = y, x%y
	}
	return x
}

var scanner *bufio.Scanner

func main() {
	scanner = bufio.NewScanner(os.Stdin)
	const MaxTokenLength = 1024 * 1024
	scanner.Buffer(make([]byte, 0, MaxTokenLength), MaxTokenLength)
	scanner.Split(bufio.ScanWords)
	solve()
}

// IO

func readString() string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	val, _ := strconv.Atoi(readString())
	return val
}

func readInt64() int64 {
	v, _ := strconv.ParseInt(readString(), 10, 64)
	return v
}

func readIntArray(sz int) []int {
	a := make([]int, sz)
	for i := 0; i < sz; i++ {
		a[i] = readInt()
	}
	return a
}

func readInt64Array(n int) []int64 {
	res := make([]int64, n)
	for i := 0; i < n; i++ {
		res[i] = readInt64()
	}
	return res
}

// Codeforces 757 B  Bash's Big Day
package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
	"strconv"
)
var in *bufio.Reader

func readFive() (int,int,int,int,int) {
	var a [5]int
	s, err := in.ReadString('\n')
	if err != nil {
		fmt.Println("first read failure", err)
		panic(err)
	}
	ss := strings.Split(strings.Trim(s, " \n\r"), " ")
	for i:=0; i<len(ss); i++ {
		a[i], err = strconv.Atoi(ss[i])
		if err != nil {
			fmt.Println("n atoi failure", err)
			panic(err)
		}
	}
	return a[0],a[1],a[2],a[3],a[4]
}

func readLineNumbs(n int) []int {
	a := make([]int, n)
	s, err := in.ReadString('\n')
	if err != nil {
		fmt.Println("read failure", err)
		panic(err)
	}
	ss := strings.Split(strings.Trim(s, " \n\r"), " ")
	for j:=0; j<n; j++ {
		aa,err := strconv.Atoi(ss[j])
		if err != nil {
			fmt.Println("aa conv failed", err)
			panic(err)
		}
		a[j] = aa
	}
	return a
}

var n int
var s []int
var maxPok int
var nPrimePok []int
var primes []int
var nPrime int

func readData() {
	in = bufio.NewReader(os.Stdin)
	// reading n
	n,_,_,_,_ = readFive()
	s = readLineNumbs(n)
}

func toPrimeIdxs(a int)  {
	pr := make([]int,0)
	for i:=0; i<nPrime && a>1; i++ {
		if (a % primes[i]) == 0 {
			pr = append(pr, i)
			nPrimePok[i]++
			// fmt.Printf("a, Prime, i, cnt = %d %d %d %d \n",a,primes[i],i,nPrimePok[i])
			a = a/primes[i]
			for (a % primes[i])==0 {
				a = a/primes[i]
			}
		}
	}
}

func eratosthene() {
	maxPok = 0
	for i:=0; i<n; i++ {
		if maxPok<s[i] {
			maxPok = s[i]+5
		}
	}
	isPrime := make([]bool, maxPok)
	for i:=0; i<maxPok; i++ {
		isPrime[i] = true
	}
	for i:=2; i<maxPok; i++ {
		if isPrime[i] {
			for j:=2; i*j<maxPok; j++ {
				isPrime[i*j] = false
			}
		}
	}
	primes = make([]int,0)
	nPrime = 0
	for i:=2; i<maxPok; i++ {
		if isPrime[i] {
			primes = append(primes, i)
		}
	}
	nPrime = len(primes)
}

func solve() {
	eratosthene()
	nPrimePok = make([]int, nPrime)
	for i:=0; i<n; i++ {
		toPrimeIdxs(s[i])
	}
	maxPok = 0
	for i:=0; i<nPrime; i++ {
		if nPrimePok[i] > maxPok {
			maxPok = nPrimePok[i]
			// fmt.Printf("prime,nPriRok = %d %d\n", primes[i],nPrimePok[i])
		}
	}
}

func printRes() {
	fmt.Println(maxPok)
}

func main() {
	readData()
	solve()
	printRes()
}

// Codeforces 757 B  Bash's Big Day
package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
	"strconv"
	"sort"
)
var in *bufio.Reader

func readFive() (int,int,int,int,int) {
	var a [5]int
	s, err := in.ReadString('\n')
	if err != nil {
		fmt.Println("first read failure", err)
		panic(err)
	}
	ss := strings.Split(strings.Trim(s, " \n\r"), " ")
	for i:=0; i<len(ss); i++ {
		a[i], err = strconv.Atoi(ss[i])
		if err != nil {
			fmt.Println("n atoi failure", err)
			panic(err)
		}
	}
	return a[0],a[1],a[2],a[3],a[4]
}

func readLineNumbs(n int) []int {
	a := make([]int, n)
	s, err := in.ReadString('\n')
	if err != nil {
		fmt.Println("read failure", err)
		panic(err)
	}
	ss := strings.Split(strings.Trim(s, " \n\r"), " ")
	for j:=0; j<n; j++ {
		aa,err := strconv.Atoi(ss[j])
		if err != nil {
			fmt.Println("aa conv failed", err)
			panic(err)
		}
		a[j] = aa
	}
	return a
}

var n int
var s []int
var maxPok int
var nPrimePok []int
var primes []int
var nPrime int

func readData() {
	in = bufio.NewReader(os.Stdin)
	// reading n
	n,_,_,_,_ = readFive()
	s = readLineNumbs(n)
}

func toPrimeIdxs(a int, sameCnt int)  {
	for i:=0; i<nPrime && a>1; i++ {
		pr := primes[i]
		if (a % pr) == 0 {
			nPrimePok[i] += sameCnt
			// fmt.Printf("a, Prime, i, cnt = %d %d %d %d \n",a,primes[i],i,nPrimePok[i])
			for (a % pr)==0 {
				a = a/pr
			}
		}
	}
}

func eratosthene() {
	maxPok = 0
	for i:=0; i<n; i++ {
		if maxPok<s[i] {
			maxPok = s[i]+5
		}
	}
	isPrime := make([]bool, maxPok)
	for i:=0; i<maxPok; i++ {
		isPrime[i] = true
	}
	for i:=2; i<maxPok; i++ {
		if isPrime[i] {
			for j:=2; i*j<maxPok; j++ {
				isPrime[i*j] = false
			}
		}
	}
	primes = make([]int,0)
	nPrime = 0
	for i:=2; i<maxPok; i++ {
		if isPrime[i] {
			primes = append(primes, i)
		}
	}
	nPrime = len(primes)
}

func solve() {
	if n==1 {
		maxPok = 1
		return
	}
	eratosthene()
	sort.Ints(s)
	nPrimePok = make([]int, nPrime)
	sameCnt := 1
	for i:=0; i<n; i++ {
		if i==n-1 || s[i] != s[i+1] {
			toPrimeIdxs(s[i], sameCnt)
			sameCnt = 1
		} else {
			sameCnt++
		}

	}
	maxPok = 0
	for i:=0; i<nPrime; i++ {
		if nPrimePok[i] > maxPok {
			maxPok = nPrimePok[i]
			// fmt.Printf("prime,nPriRok = %d %d\n", primes[i],nPrimePok[i])
		}
	}
}

func printRes() {
	fmt.Println(maxPok)
}

func main() {
	readData()
	solve()
	printRes()
}