Riley is a very bad boy, but at the same time, he is a yo-yo master. So, he decided to use his yo-yo skills to annoy his friend Anton.Anton's room can be represented as a grid with $$$n$$$ rows and $$$m$$$ columns. Let $$$(i, j)$$$ denote the cell in row $$$i$$$ and column $$$j$$$. Anton is currently standing at position $$$(i, j)$$$ in his room. To annoy Anton, Riley decided to throw exactly two yo-yos in cells of the room (they can be in the same cell).Because Anton doesn't like yo-yos thrown on the floor, he has to pick up both of them and return back to the initial position. The distance travelled by Anton is the shortest path that goes through the positions of both yo-yos and returns back to $$$(i, j)$$$ by travelling only to adjacent by side cells. That is, if he is in cell $$$(x, y)$$$ then he can travel to the cells $$$(x + 1, y)$$$, $$$(x - 1, y)$$$, $$$(x, y + 1)$$$ and $$$(x, y - 1)$$$ in one step (if a cell with those coordinates exists).Riley is wondering where he should throw these two yo-yos so that the distance travelled by Anton is maximized. But because he is very busy, he asked you to tell him.

The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 10^4$$$) — the number of test cases. Then $$$t$$$ test cases follow. The only line of each test case contains four integers $$$n$$$, $$$m$$$, $$$i$$$, $$$j$$$ ($$$1 \leq n, m \leq 10^9$$$, $$$1\le i\le n$$$, $$$1\le j\le m$$$) — the dimensions of the room, and the cell at which Anton is currently standing.

For each test case, print four integers $$$x_1$$$, $$$y_1$$$, $$$x_2$$$, $$$y_2$$$ ($$$1 \leq x_1, x_2 \leq n$$$, $$$1\le y_1, y_2\le m$$$) — the coordinates of where the two yo-yos should be thrown. They will be thrown at coordinates $$$(x_1,y_1)$$$ and $$$(x_2,y_2)$$$. If there are multiple answers, you may print any.

NoteHere is a visualization of the first test case.

package main

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

func main() {
    reader := bufio.NewReader(os.Stdin)
    input, _ := reader.ReadString('\n')

	// Get t
	t, _ := GetInt(input)

	for i:=0; i<t; i++ {
		// Get n
		input, _ = reader.ReadString('\n')
		var n,m int
		n, input = GetInt(input)
		m, _ = GetInt(input)

		fmt.Printf("1 1 %d %d\n", n, m)

	}
}

// func abs(val float64) float64 {
//     if val >= 0.0 {
//         return val
//     }
//     return -val
// }

func GetInt(s string) (result int, output string) {
	iter, n := 0, len(s)
	for iter < n && s[iter] >= '0' && s[iter] <= '9' {
		iter++
	}
	result, _ = strconv.Atoi(s[:iter])
	// Skip the redundant characters
	for iter < n && (s[iter] < '0' || s[iter] > '9') {
		iter++
	}
	if iter == n {
		output = ""

	} else {
		output = s[iter:]
	}
	return
}

func GetInt64(s string) (result int64, output string) {
	iter, n := 0, len(s)
	for iter < n && s[iter] >= '0' && s[iter] <= '9' {
		iter++
	}
	result, _ = strconv.ParseInt(s[:iter], 10, 64)
	// Skip the redundant characters
	for iter < n && (s[iter] < '0' || s[iter] > '9') {
		iter++
	}
	if iter == n {
		output = ""

	} else {
		output = s[iter:]
	}
	return
}

package main

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

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

	var T, n, m, x int
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n, &m, &x, &x)
		Fprintln(out, 1, 1, n, m)
	}
}

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

package main

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

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

	solve := func(Case int) {
		var n,m,x0,y0 int
		Fscan(in, &n, &m, &x0, &y0)
		Fprintln(out, 1,1,n,m)
	}

	T := 1
	Fscan(in, &T) //
	for Case := 1; Case <= T; Case++ {
		solve(Case)
	}

	_leftData, _ := ioutil.ReadAll(in)
	if _s := strings.TrimSpace(string(_leftData)); _s != "" {
		panic("有未读入的数据：\n" + _s)
	}
}

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

package main

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

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

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

	var n, m, i, j int

	for ; t > 0; t-- {
		fmt.Fscan(reader, &n, &m, &i, &j)
		fmt.Fprintln(writer, 1, 1, n, m)
	}
}

package main

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

var tc,n,m,a,b int64

func main() {
  var cin io.Reader = bufio.NewReader(os.Stdin)
  fmt.Fscan(cin, &tc)
  for tc>0{
    tc--
    var n,m int
    fmt.Fscan(cin, &n ,&m,&a,&b)
    fmt.Println(1,1,n,m)
  }
}

package main

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

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

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

    var t int

    fmt.Fscan(in, &t)

    type array []int

    for ; t > 0; t -= 1 {
        var n, m, x, y int
        fmt.Fscan(in, &n, &m, &x, &y)

        ax, ay, bx, by, ans := -1, -1, -1, -1, int64(-1)
        pos := []array{ { 1, 1 }, { n, 1 }, { 1, m }, { n, m } }

        for i := 0; i < 4; i += 1 {
            for j := 0; j < 4; j += 1 {
                if i == j {
                    continue
                }

                cur := abs(pos[i][0] - x) + abs(pos[i][1] - y) + abs(pos[i][0] - pos[j][0]) + abs(pos[i][1] - pos[j][1])

                if cur > ans {
                    ax, ay, bx, by = pos[i][0], pos[i][1], pos[j][0], pos[j][1]
                    ans = cur
                }
            }
        }

        fmt.Fprintln(out, ax, ay, bx, by)
    }
}

package main

import (
	"bufio"
	"fmt"
	"io/ioutil"
	"log"
	"os"
)

func init() {
	log.SetFlags(0)
	log.SetOutput(ioutil.Discard)
}

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

}
func max(a ...int64) int64 {
	m := a[0]
	v := m
	for _, v = range a[1:] {
		if v > m {
			m = v
		}
	}
	return v
}

func solve(n, m, i, j int64) (x1, y1, x2, y2 int64) {
	log.Printf("params: %d %d %d %d\n", n, m, i, j)
	points := [][]int64{
		{1, 1},
		{1, m},
		{n, 1},
		{n, m},
	}

	var lala int64 = -1

	for haha, p1 := range points {
		for _, p2 := range points[haha+1:] {
			z := abs(i-p1[0]) + abs(j-p1[1]) + abs(i-p2[0]) + abs(j-p2[1]) + abs(p1[0]-p2[0]) + abs(p1[1]-p2[1])
			if z > lala {
				lala = z
				// log.Printf("     params: %d %d %d %d         %d\n", n, m, i, j, lala)
				x1, y1, x2, y2 = p1[0], p1[1], p2[0], p2[1]
			}
		}
	}
	return
}

func main() {
	log.Println("start")

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

	num := 0
	fmt.Fscan(in, &num)
	for i := 0; i < num; i++ {
		// a := make([]int, size)
		// for i := 0; i < size; i++ {
		// 	fmt.Fscan(in, &a[i])
		// }
		var n, m, i, j int64
		fmt.Fscan(in, &n, &m, &i, &j)

		x1, y1, x2, y2 := solve(n, m, i, j)
		fmt.Printf("%d %d %d %d\n", x1, y1, x2, y2)

		// z := 1000000000
		// log.Printf("z = %#v\n", z)
	}
	log.Println("__end__")
}

package main

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

func main() {
	var tcs int
	in := bufio.NewReader(os.Stdin)
	_, _ = fmt.Fscan(in, &tcs)

	for tc := 0; tc < tcs; tc++ {
		var n, m, dummy int
		_, _ = fmt.Fscan(in, &n, &m, &dummy, &dummy)

		fmt.Printf("1 1 %d %d \n", n, m)
	}
}

// 1537B. Bad Boy
package main

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

func main() {
	var T int
	reader := bufio.NewReader(os.Stdin)
	fmt.Fscan(reader, &T)
	for t := 1; t <= T; t++ {
		var n, m, i, j int
		fmt.Fscan(reader, &n, &m, &i, &j)
		fmt.Println(1, 1, n, m)
	}
}

package main

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

type Cell struct {
	x, y, dist int
}

func dist(a, b Cell) int {
	return Abs(a.x-b.x) + Abs(a.y-b.y)
}

func Abs(a int) int {
	if a >= 0 {
		return a
	}
	return -a
}

func solve() {
	f := bufio.NewReader(os.Stdin)
	w := bufio.NewWriter(os.Stdout)
	N, n, m, i, j := 0, 0, 0, 0, 0
	fmt.Fscan(f, &N)
	for k := 0; k < N; k++ {
		fmt.Fscan(f, &n, &m, &i, &j)
		corners := []Cell{{1, 1, 0}, {1, m, 0}, {n, 1, 0}, {n, m, 0}}
		for p := 0; p < 4; p++ {
			corners[p].dist = dist(corners[p], Cell{i, j, 0})
		}
		sort.Slice(corners, func(i, j int) bool { return corners[i].dist < corners[j].dist })
		fmt.Fprintln(w, corners[0].x, corners[0].y, corners[3].x, corners[3].y)
	}
	w.Flush()
}

func main() {
	solve()
}

package main

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

var (
	reader        = bufio.NewReader(os.Stdin)
	t, n, m, i, j int
)

func solve(n, m, i, j int) string {
	return fmt.Sprintf("%d %d %d %d", 1, 1, n, m)
}

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

package main

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

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 process() {
	var x, y, i, j int
	scanf("%d %d %d %d\n", &x, &y, &i, &j)
	printf("1 %d %d 1\n", y, x)
}

func main() {
	defer writer.Flush()
	var t int
	scanf("%d\n", &t)
	// printf("%d\n", t)
	for i := 0; i < t; i++ {
		process()
	}
}

package main

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

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

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

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

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

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

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

type Point struct {
	x, y int64
}

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

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

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

func calcDist(from, to Point) int64 {
	return abs(from.x-to.x) + abs(from.y-to.y)
}

func main() {
	io := NewIO(os.Stdin, os.Stdout)
	for t := io.ReadInt(); t > 0; t-- {
		a := io.ReadIntSlice(4)
		from := Point{a[2], a[3]}
		nowp1, nowp2 := from, from
		points := []Point{
			{1, 1},
			{a[0], 1},
			{1, a[1]},
			{a[0], a[1]},
		}
		for _, p1 := range points {
			for _, p2 := range points {
				if p1 == p2 {
					continue
				}
				nn := calcDist(from, p1) + calcDist(from, p2) + calcDist(p1, p2)
				if nn > calcDist(from, nowp1) + calcDist(from, nowp2) + calcDist(nowp1, nowp2) {
					nowp1, nowp2 = p1, p2
				}
			}
		}
		fmt.Fprintln(os.Stdout, nowp1.x, nowp1.y, nowp2.x, nowp2.y)
	}
}

package main

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

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

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

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

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

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

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

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

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

		}
		return initial
	}
}

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

	}
	return m
}

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

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

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

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

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

	return
}

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

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

	return num
}

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

var t int

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

	for o := 0; o < t; o++ {
		var n, m, i, j int
		fmt.Fscan(input, &n)
		fmt.Fscan(input, &m)
		fmt.Fscan(input, &i)
		fmt.Fscan(input, &j)

		if n == 1 {
			fmt.Println(1)
			fmt.Println(1)
			fmt.Println(1)
			fmt.Println(m)

		} else {
			if m == 1 {
				fmt.Println(1)
				fmt.Println(1)
				fmt.Println(n)
				fmt.Println(1)
			} else {
				fmt.Println(n)
				fmt.Println(1)
				fmt.Println(1)
				fmt.Println(m)
			}
		}

	}

}

package main

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

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

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

	var n, m, i, j int
	for ; t > 0; t-- {
		fmt.Fscan(reader, &n, &m, &i, &j)

		if i == 1 {
			fmt.Fprintln(writer, n, 1, n, m)
		} else if j == 1 {
			fmt.Fprintln(writer, 1, m, n, m)
		} else if i == n {
			fmt.Fprintln(writer, 1, 1, 1, m)
		} else if j == m {
			fmt.Fprintln(writer, 1, 1, n, 1)
		} else {
			fmt.Fprintln(writer, n, 1, 1, m)
		}
	}
}

package main

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

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

	var t int

	fmt.Fscan(r, &t)

	for i := 0; i  < t; i++ {

		var n, m, i, j int

		fmt.Fscan(r, &n, &m, &i, &j)

		fmt.Println(solve(n, m, i, j))
	}
}

func solve(n, m, i, j int) (int, int, int, int) {

	var x1, x2, y1, y2 int

	if n - i > i - 1 {
		x1 = n
	} else {
		x1 = 1
	}
	if m - j > j - 1 {
		y1 = m
	} else {
		y1 = 1
	}

	if n - x1 > x1 - 1 {
		x2 = n
	} else {
		x2 = 1
	}

	if m - y1 > y1 - 1 {
		y2 = m
	}  else {
		y2 = 1
	}

	return x1, y1, x2, y2
}

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

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

package main

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

func main() {
    reader := bufio.NewReader(os.Stdin)
    input, _ := reader.ReadString('\n')

	// Get t
	t, _ := GetInt(input)

	for i:=0; i<t; i++ {
		// Get n
		input, _ = reader.ReadString('\n')
		var n,m,row,col int
		n, input = GetInt(input)
		m, input = GetInt(input)
		row, input = GetInt(input)
		col, _ = GetInt(input)

		x, distance_a := 0, 0
		if row - 1 > n - row {
			x = 1
			distance_a = row * 2 + m * 2

		} else {
			x = n
			distance_a = (n-row+1) * 2 + m * 2
		}
		// fmt.Printf("%d %d %d %d\n", x, 1, x, m)
		y, distance_b := 0, 0
		if col - 1 > m - col {
			y = 1
			distance_b = col * 2 + n * 2

		} else {
			y = m
			distance_b = (m-col+1) * 2 + n * 2
		}
		// fmt.Printf("%d %d %d %d\n", 1, y, n, y)
		if distance_a > distance_b {
			fmt.Printf("%d %d %d %d\n", x, 1, x, m)

		} else {
			fmt.Printf("%d %d %d %d\n", 1, y, n, y)
		}

	}
}

// func abs(val float64) float64 {
//     if val >= 0.0 {
//         return val
//     }
//     return -val
// }

func GetInt(s string) (result int, output string) {
	iter, n := 0, len(s)
	for iter < n && s[iter] >= '0' && s[iter] <= '9' {
		iter++
	}
	result, _ = strconv.Atoi(s[:iter])
	// Skip the redundant characters
	for iter < n && (s[iter] < '0' || s[iter] > '9') {
		iter++
	}
	if iter == n {
		output = ""

	} else {
		output = s[iter:]
	}
	return
}

func GetInt64(s string) (result int64, output string) {
	iter, n := 0, len(s)
	for iter < n && s[iter] >= '0' && s[iter] <= '9' {
		iter++
	}
	result, _ = strconv.ParseInt(s[:iter], 10, 64)
	// Skip the redundant characters
	for iter < n && (s[iter] < '0' || s[iter] > '9') {
		iter++
	}
	if iter == n {
		output = ""

	} else {
		output = s[iter:]
	}
	return
}

package main

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

func main() {
    reader := bufio.NewReader(os.Stdin)
    input, _ := reader.ReadString('\n')

	// Get t
	t, _ := GetInt(input)

	for i:=0; i<t; i++ {
		// Get n
		input, _ = reader.ReadString('\n')
		var n,m,row,col int
		n, input = GetInt(input)
		m, input = GetInt(input)
		row, input = GetInt(input)
		col, _ = GetInt(input)

		if n < m {
			x := 0
			if row - 1 > n - row {
				x = 1

			} else {
				x = n
			}
			fmt.Printf("%d %d %d %d\n", x, 1, x, m)

		} else {
			y := 0
			if col - 1 > m - col {
				y = 1

			} else {
				y = m
			}
			fmt.Printf("%d %d %d %d\n", 1, y, n, y)
		}
	}
}

// func abs(val float64) float64 {
//     if val >= 0.0 {
//         return val
//     }
//     return -val
// }

func GetInt(s string) (result int, output string) {
	iter, n := 0, len(s)
	for iter < n && s[iter] >= '0' && s[iter] <= '9' {
		iter++
	}
	result, _ = strconv.Atoi(s[:iter])
	// Skip the redundant characters
	for iter < n && (s[iter] < '0' || s[iter] > '9') {
		iter++
	}
	if iter == n {
		output = ""

	} else {
		output = s[iter:]
	}
	return
}

func GetInt64(s string) (result int64, output string) {
	iter, n := 0, len(s)
	for iter < n && s[iter] >= '0' && s[iter] <= '9' {
		iter++
	}
	result, _ = strconv.ParseInt(s[:iter], 10, 64)
	// Skip the redundant characters
	for iter < n && (s[iter] < '0' || s[iter] > '9') {
		iter++
	}
	if iter == n {
		output = ""

	} else {
		output = s[iter:]
	}
	return
}

package main

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

var tc int64

func main() {
  var cin io.Reader = bufio.NewReader(os.Stdin)
  fmt.Fscan(cin, &tc)
  for tc>0{
    tc--
    var n,m int
    fmt.Fscan(cin, &n ,&m)
    fmt.Println(1,1,n,m)
  }
}

package main

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

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

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

    var t int

    fmt.Fscan(in, &t)

    type array []int

    for ; t > 0; t -= 1 {
        var n, m, x, y int
        fmt.Fscan(in, &n, &m, &x, &y)

        ax, ay, bx, by, ans := -1, -1, -1, -1, -1
        pos := []array{ { 1, 1 }, { n, 1 }, { 1, m }, { n, m } }

        for i := 0; i < 4; i += 1 {
            for j := 0; j < 4; j += 1 {
                if i == j {
                    continue
                }

                cur := abs(pos[i][0] - x) + abs(pos[i][1] - y) + abs(pos[i][0] - pos[j][0]) + abs(pos[i][1] - pos[j][1])

                if cur > ans {
                    ax, ay, bx, by = pos[i][0], pos[i][1], pos[j][0], pos[j][1]
                    ans = cur
                }
            }
        }

        fmt.Fprintln(out, ax, ay, bx, by)
    }
}

package main

import (
	"bufio"
	"fmt"
	"io/ioutil"
	"log"
	"os"
)

func init() {
	log.SetFlags(0)
	log.SetOutput(ioutil.Discard)
}

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

}
func max(a ...int64) int64 {
	m := a[0]
	v := m
	for _, v = range a[1:] {
		if v > m {
			m = v
		}
	}
	return v
}

func solve(n, m, i, j int64) (x1, y1, x2, y2 int64) {
	log.Printf("params: %d %d %d %d\n", n, m, i, j)
	points := [][]int64{
		{1, 1},
		{1, m},
		{n, 1},
		{n, m},
	}
	var lala int64 = 0
	for haha, p1 := range points {
		for _, p2 := range points[haha+1:] {
			z := abs(i-p1[0]) + abs(j-p1[1]) + abs(i-p2[0]) + abs(j-p2[1])
			if z > lala {
				lala = z
				x1, y1, x2, y2 = p1[0], p1[1], p2[0], p2[1]
			}
		}
	}
	return
}

func main() {
	log.Println("start")

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

	num := 0
	fmt.Fscan(in, &num)
	for i := 0; i < num; i++ {
		// a := make([]int, size)
		// for i := 0; i < size; i++ {
		// 	fmt.Fscan(in, &a[i])
		// }
		var n, m, i, j int64
		fmt.Fscan(in, &n, &m, &i, &j)

		x1, y1, x2, y2 := solve(n, m, i, j)
		fmt.Printf("%d %d %d %d\n", x1, y1, x2, y2)

		// z := 1000000000
		// log.Printf("z = %#v\n", z)
	}
	log.Println("__end__")
}

package main

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

func main() {
	var tcs int
	in := bufio.NewReader(os.Stdin)
	_, _ = fmt.Fscan(in, &tcs)

	for tc := 0; tc < tcs; tc++ {
		var n, m, dummy int
		_, _ = fmt.Fscan(in, &n, &m, dummy, dummy)

		fmt.Printf("1 1 %d %d \n", n, m)
	}
}


You are given the array $$$a$$$ consisting of $$$n$$$ positive (greater than zero) integers.In one move, you can choose two indices $$$i$$$ and $$$j$$$ ($$$i \ne j$$$) such that the absolute difference between $$$a_i$$$ and $$$a_j$$$ is no more than one ($$$|a_i - a_j| \le 1$$$) and remove the smallest of these two elements. If two elements are equal, you can remove any of them (but exactly one).Your task is to find if it is possible to obtain the array consisting of only one element using several (possibly, zero) such moves or not.You have to answer $$$t$$$ independent test cases.

The first line of the input contains one integer $$$t$$$ ($$$1 \le t \le 1000$$$) — the number of test cases. Then $$$t$$$ test cases follow. The first line of the test case contains one integer $$$n$$$ ($$$1 \le n \le 50$$$) — the length of $$$a$$$. The second line of the test case contains $$$n$$$ integers $$$a_1, a_2, \dots, a_n$$$ ($$$1 \le a_i \le 100$$$), where $$$a_i$$$ is the $$$i$$$-th element of $$$a$$$.

NoteIn the first test case of the example, we can perform the following sequence of moves:  choose $$$i=1$$$ and $$$j=3$$$ and remove $$$a_i$$$ (so $$$a$$$ becomes $$$[2; 2]$$$);  choose $$$i=1$$$ and $$$j=2$$$ and remove $$$a_j$$$ (so $$$a$$$ becomes $$$[2]$$$). In the second test case of the example, we can choose any possible $$$i$$$ and $$$j$$$ any move and it doesn't matter which element we remove.In the third test case of the example, there is no way to get rid of $$$2$$$ and $$$4$$$.

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"sync"
)
var out chan string
var in *bufio.Scanner
var outWg *sync.WaitGroup
func GetNum(p string)int64{
	var ans int64 = 0
	flag:=true
	i:=0
	n:=len(p)
	if p[i]=='-'{
		flag=false
		i++
	}
	for ;i<n;i++{
		ans=(ans<<1)+(ans<<3)+int64(p[i]-'0')
	}
	if !flag{
		ans=-ans
	}
	return ans
}
func ReadString() string {
	in.Scan()
	return in.Text()
}
func ReadStringSlice(n int) []string {
	s := make([]string, n)
	for i := 0; i < n; i++ {
		s[i] = ReadString()
	}
	return s
}
func ReadInt() int {
	intStr := ReadString()
	return int(GetNum(intStr))
}
func ReadIntSlice(n int) []int {
	arr := make([]int, n)
	for i := 0; i < n; i++ {
		arr[i] = ReadInt()
	}
	return arr
}
func ReadInt64() int64 {
	int64Str:=ReadString()
	return GetNum(int64Str)
}
func ReadInt64Slice(n int)[] int64{
	arr:=make([]int64,n)
	for i:=0;i<n;i++{
		arr[i] = ReadInt64()
	}
	return arr
}

func init() {

	in = bufio.NewScanner(os.Stdin)
	in.Buffer(make([]byte, 1<<10), int(2e+5))
	in.Split(bufio.ScanWords)

	out = make(chan string, 1<<4)
	outWg = &sync.WaitGroup{}
	outWg.Add(1)
	writer := bufio.NewWriterSize(os.Stdout, int(2e+5))
	go func(write *bufio.Writer) {
		defer outWg.Done()
		defer write.Flush()
		for line := range out {
			write.WriteString(line + "\n")
		}
	}(writer)
}
func work(){
	n:=ReadInt()
	a:=ReadIntSlice(n)
	sort.Ints(a)
	f:=true
	for i:=1;i<len(a);i++{
		if a[i]-a[i-1] >1{
			fmt.Println("NO")
			f=false
			break
		}
	}
	if f{
		fmt.Println("YES")
	}
}

func main(){
	for t:=ReadInt();t>0;t--{
		work()
	}
	close(out)
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var T int
	fmt.Scan(&T)
	for i := 0; i < T; i++ {
		var n int
		fmt.Scan(&n)
		var v []int
		for j := 0; j < n; j++ {
			var curr int
			fmt.Scan(&curr)
			v = append(v, curr)
		}
		sort.Ints(v)
		flag := true
		for j := n - 2; j >= 0; j-- {
			if v[j+1]-v[j] > 1 {
				flag = false
				break
			}
		}
		if flag == false {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}
	}
}

package main

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

func main() {
	var t, n, a int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		ans := "YES"
		input := make([]int, 0)
		fmt.Fscan(in, &n)
		for j := 0; j < n; j++ {
			fmt.Fscan(in, &a)
			input = append(input, a)
		}
		sort.Slice(input, func(i, j int) bool {
			return input[i] < input[j]
		})
		for j := 1; j < n; j++ {
			if abs(input[j]-input[j-1]) > 1 {
				ans = "NO"
			}
		}
		fmt.Println(ans)
	}

}

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

package main

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

func main() {
	var tn int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &tn)
	for i := 0; i < tn; i++ {
		var tsSize int
		fmt.Fscan(in, &tsSize)
		var ts []int
		for i := 0; i < tsSize; i++ {
			var item int
			fmt.Fscan(in, &item)
			ts = append(ts, item)
		}
		sort.Ints(ts)
		var yes = true
		for i := 0; i < tsSize-1; i++ {
			var dif =  ts[i+1] - ts[i]
			if dif > 1 {
				yes = false
			}
		}
		if yes {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var tn int
	fmt.Scan(&tn)
	for i := 0; i < tn; i++ {
		var tsSize int
		fmt.Scan(&tsSize)
		var ts []int
		for i := 0; i < tsSize; i++ {
			var item int
			fmt.Scan(&item)
			ts = append(ts, item)
		}
		sort.Ints(ts)
		 var yes = true
		for i := 0; i < tsSize-1; i++ {
			var dif =  ts[i+1] - ts[i]
			if dif > 1 {
				yes = false
			}
		}
		if yes {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

const MaxN int = 50 + 5

var read *bufio.Reader = bufio.NewReader(os.Stdin)
var write *bufio.Writer = bufio.NewWriter(os.Stdout)
var num []int

func quickSort(arr []int, left int, right int) {
	if left < right {
		partitionIndex := partition(arr, left, right)
		quickSort(arr, left, partitionIndex-1)
		quickSort(arr, partitionIndex+1, right)
	}
}

func partition(arr []int, left int, right int) int {
	var res = left + 1
	for i := res; i <= right; i++ {
		if arr[i] < arr[left] {
			swap(arr, i, res)
			res += 1
		}
	}
	swap(arr, left, res-1)
	return res - 1
}

func swap(arr []int, i int, j int) {
	arr[i], arr[j] = arr[j], arr[i]
}

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

func main() {
	defer write.Flush()
	var t int
	fmt.Fscan(read, &t)
	for ; t > 0; t-- {
		var n int
		fmt.Fscan(read, &n)
		num = make([]int, n, n)
		for i := 0; i < n; i++ {
			fmt.Fscan(read, &num[i])
		}
		quickSort(num, 0, n-1)
		var flag bool = true
		for i := 1; i < n; i++ {
			if abs(num[i]-num[i-1]) > 1 {
				flag = false
				break
			}
		}
		//fmt.Fprintln(write, num[0:n])
		if flag {
			fmt.Fprintln(write, "YES")
		} else {
			fmt.Fprintln(write, "NO")
		}
	}
}

package main

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

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

	T:= 0
	for Fscan(in, &T); T > 0; T-- {
		var n int
		Fscan(in, &n)
		a:=make([]int,n)
		for i:=0;i<n;i++{
			Fscan(in,&a[i])
		}
		sort.Ints(a)
		fl:=true
		for i:=0;i+1<n;i++{
			if a[i+1]-a[i]>1{
				fl=false
			}
		}
		// Fprintln(out,a)
		if fl{
			Fprintln(out,"YES")
		} else {
			Fprintln(out,"NO")
		}
	}
}

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

package main

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

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var t, n int
	fmt.Fscan(in, &t)
	a := make([]int, 50)
	for ; t > 0; t-- {
		fmt.Fscan(in, &n)
		for i := 0; i < n; i++ {
			fmt.Fscan(in, &a[i])
		}
		if solve(a[:n]) {
			fmt.Fprintln(out, "YES")
		} else {
			fmt.Fprintln(out, "NO")
		}

	}
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var t, n int
	fmt.Fscan(in, &t)
	for ; t > 0; t-- {
		fmt.Fscan(in, &n)
		a := make([]int, n)
		for i := 0; i < n; i++ {
			fmt.Fscan(in, &a[i])
		}
		sort.Ints(a)
		ans := "YES"
		for i, x := range a[1:] {
			if x-a[i] > 1 {
				ans = "NO"
				break
			}
		}
		fmt.Fprintln(out, ans)
	}
}

package main

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

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

	tc := readNum(reader)
	var buf bytes.Buffer
	for tc > 0 {
		tc--
		n := readNum(reader)
		A := readNNums(reader, n)
		if solve(n, A) {
			buf.WriteString("YES\n")
		} else {
			buf.WriteString("NO\n")
		}
	}
	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
}

func solve(n int, A []int) bool {
	sort.Ints(A)

	for i := 1; i < n; i++ {
		if A[i]-A[i-1] > 1 {
			return false
		}
	}

	return true
}

package main

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

func main() {

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

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

	for i := 0; i < t; i++ {

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

		a := make([]int, n)
		for j := 0; j < n; j++ {
			fmt.Fscan(in, &a[j])
		}

		sort.Ints(a)

		r := true
		for j := 0; j < n-1; j++ {
			if a[j+1]-a[j] > 1 {
				r = false
				break
			}
		}

		if r {
			fmt.Fprintln(out, "YES")
		} else {
			fmt.Fprintln(out, "NO")
		}

	}

}

package main

import (
    "fmt"
    "sort"
)

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

    for t > 0 {
        var n int
        fmt.Scan(&n)
        a := make([]int, n)
        for i := 0; i < n; i++ {
            fmt.Scan(&a[i])
        }

        valid := true

        sort.Ints(a[:])
        for i := 0; i < n - 1; i++ {
            if a[i + 1] - a[i] > 1 {
                valid = false
            }
        }

        if valid {
            fmt.Println("YES")
        } else {
            fmt.Println("NO")
        }

        t--
    }
}

package main

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

func main() {
	io := NewFastIO(os.Stdin, os.Stdout)
	defer io.Flush()

	for t := io.NextInt(); t > 0; t-- {
		n := io.NextInt()
		a := io.NextInts(n)
		sort.Ints(a)
		ans := "YES"
		for i, x := range a[1:] {
			if x-a[i] > 1 {
				ans = "NO"
			}
		}
		io.Println(ans)
	}
}

type FastIO struct {
	*bufio.Reader
	*bufio.Writer
	c [1]byte
}

func NewFastIO(r io.Reader, w io.Writer) *FastIO {
	return &FastIO{Reader: bufio.NewReader(r), Writer: bufio.NewWriter(w)}
}

func (f *FastIO) readC() byte {
	f.Read(f.c[:])
	return f.c[0]
}

func (f *FastIO) NextInt() int {
	c := f.readC()
	for ; c <= ' '; c = f.readC() {
	}
	neg := false
	if c == '-' {
		neg = true
		c = f.readC()
	}
	n := 0
	for ; '0' <= c && c <= '9'; c = f.readC() {
		n = n*10 + int(c) - '0'
	}
	if neg {
		return -n
	}
	return n
}

func (f *FastIO) NextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = f.NextInt()
	}
	return a
}

func (f *FastIO) Next() string {
	c := f.readC()
	for ; c <= ' '; c = f.readC() {
	}
	var s []byte
	for ; c > ' '; c = f.readC() {
		s = append(s, f.c[0])
	}
	return string(s)
}

func (f *FastIO) Println(a ...interface{}) {
	fmt.Fprintln(f.Writer, a...)
}

func (f *FastIO) Print(a ...interface{}) {
	fmt.Fprint(f.Writer, a...)
}

func (f *FastIO) PrintInts(a ...int) {
	if len(a) > 0 {
		f.Print(a[0])
		for _, x := range a[1:] {
			f.Print(' ', x)
		}
	}
}

func (f *FastIO) PrintlnInts(a ...int) {
	f.PrintInts(a...)
	f.Println()
}

package main

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

var out = bufio.NewWriter(os.Stdout)
func print(f string, args ...interface{}){
	fmt.Fprintf(out,f,args...)
}
func main(){
	defer out.Flush()
	var t,n int
	a := [55]int{}
	fmt.Scan(&t)
	for ;t>0;t--{
		fmt.Scan(&n)
		readN(a[:],0,n)
		if n==1{
			print("YES\n")
			continue
		}
		sort(a[:],0,n-1)
		var temp []int
		for i:=0;i<n-1;i++{
			temp = append(temp, a[i+1]-a[i])
		}
		sort(temp,0,len(temp)-1)
		if temp[len(temp)-1] > 1{
			print("NO\n")
		}else {
			print("YES\n")

		}
	}

}

func readN(all []int, i, n int) {
    if n == 0 {
        return
    }
    if m, err := scan(&all[i]); m != 1 {
        panic(err)
    }
    readN(all, i+1, n-1)
}

func scan(a *int) (int, error) {
    return fmt.Scan(a)
}

func merge(a []int, l, mid, h int) {
	la := make([]int, mid-l+1)
	ra := make([]int, h-mid)
	copy(la, a[l:mid+1])
	copy(ra, a[mid+1:h+1])
	var i, j int
	k := l
	for ; i < len(la) && j < len(ra); k++ {
		if la[i] < ra[j] {
			a[k] = la[i]
			i++
		} else {
			a[k] = ra[j]
			j++
		}
	}
	for ; i < len(la); i, k = i+1, k+1 {
		a[k] = la[i]
	}
	for ; j < len(ra); j, k = j+1, k+1 {
		a[k] = ra[j]
	}
}

func sort(a []int, l, h int) {
	if l >= h {
		return
	}
	mid := (l + h) / 2
	sort(a, l, mid)
	sort(a, mid+1, h)
	merge(a, l, mid, h)
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var t int
	fmt.Scan(&t)
	for ; t > 0; t-- {
		var n int
		fmt.Scan(&n)

		sli := make([]int, n)
		for i := 0; i < n; i++ {
			fmt.Scan(&sli[i])
		}

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

		ok := true
		for i := 1; i < n && ok; i++ {
			if sli[i]-sli[i-1] > 1 {
				ok = false
			}
		}

		if ok {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
"fmt"
"sort"
)

func main() {
	var t int
	fmt.Scan(&t)
	for ; t > 0; t-- {

		var n int
		var a []int
		fmt.Scan(&n)
		for i := 0; i < n; i++ {
			var x int
			fmt.Scan(&x)
			a = append(a, x)
		}
		sort.Ints(a)
		flag := true
		for i := 1; i < n; i++ {
			if a[i] - a[i - 1] > 1 {
				flag = false
				break
			}
		}

		if flag {
			fmt.Println("YES")
		} else {
		    fmt.Println("NO")
		}
	}
}

package main

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

var (
	reader = bufio.NewReader(os.Stdin)
	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 solve(arr []int) bool {
	sort.Slice(arr, func(i, j int) bool {
		return arr[i] > arr[j]
	})

	// fmt.Println(arr)
	for i := 1; i < len(arr); i++ {
		// fmt.Println(arr[i-1], arr[i], arr[i-1]-arr[i])
		if arr[i-1]-arr[i] > 1 {
			return false
		}
	}

	return true
}

func main() {
	defer writer.Flush()

	var (
		t, n int
		arr  []int
	)

	scanf("%d\n", &t)
	for ; t > 0; t-- {
		scanf("%d\n", &n)
		arr = make([]int, n)

		for i := 0; i < n; i++ {
			scanf("%d", &arr[i])
		}
		scanf("\n")

		if solve(arr) {
			printf("YES\n")
		} else {
			printf("NO\n")
		}
	}
}

package main

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

var t int

func main() {
	var input io.Reader = bufio.NewReader(os.Stdin)

	fmt.Fscan(input, &t)

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

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

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

		ok := true
		for i := 0; i < (n - 1); i++ {
			if arr[i+1]-arr[i] > 1 {
				ok = false
				break
			}
		}

		if ok == true {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var t int
	fmt.Scan(&t)
	for t > 0 {
		var n int
		fmt.Scan(&n)
		a := make([]int, n)
		for i := 0; i < n; i++ {
			fmt.Scan(&a[i])
		}
		sort.Ints(a)
		j := 0
		for j < n-1 && a[j+1]-a[j] <= 1 {
			j++
		}
		if j == n-1 {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		t--
	}

}

package main

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

func main() {
	var t, n int

	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &n)
		var s []int
		for j := 0; j < n; j++ {
			var inp int
			fmt.Fscan(in, &inp)
			s = append(s, inp)
		}
		var isNo bool
		sort.Ints(s)
		for i := 1; i < len(s); i++ {
			if s[i]-s[i-1] > 1 {
				isNo = true
				break
			}
		}
		if isNo {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}
	}
}

package main

import (
	"fmt"
	"sort"
)

func nxt() int {
	var x int
	fmt.Scan(&x)
	return x
}

func ok() {
	fmt.Println("YES")
}

func no() {
	fmt.Println("NO")
}

func solve() {
	n := nxt()
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nxt()
	}
	sort.Sort(sort.IntSlice(a))
	for i := 1; i < n; i++ {
		if a[i - 1] + 1 < a[i] {
			no()
			return
		}
	}
	ok()
}

func main() {
	var t int = nxt()
	for t > 0 {
		t--
		solve()
	}
	return
}

package main

import (
	"fmt"
	"sort"
)

func solve() {
	var massLen int
	fmt.Scan(&massLen)
	array := make([]int, massLen)
	for i := 0; i < massLen; i++ {
		fmt.Scan(&array[i])
	}
	sort.Ints(array)
	for i := 1; i < massLen; i++ {
		if array[i]-array[i-1] > 1 {
			fmt.Println("NO")
			return
		}
	}
	fmt.Println("YES")
	return
}

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

	for i := 0; i < n; i++ {
		solve()
	}
}

package main

import (
	"fmt"
	"sort"
	"strconv"
)

func checkArray(a []int) bool {
	for i:=0; i<len(a)-1; i++ {
		if a[i+1]-a[i]>1 {
			return false
		}
	}
	return true
}

func main() {
	var n, t int
	var s string
	fmt.Scan(&t)

	for k:=0; k<t; k++ {
		fmt.Scan(&n)

		var a []int
		for p:=0; p<n; p++ {
			fmt.Scan(&s)
			m, _ := strconv.Atoi(s)
			a = append(a, m)
		}

		sort.Sort(sort.IntSlice(a))

		if checkArray(a) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

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

func solver(arr []int) bool {
	if len(arr) < 2 {
		return true
	}
	sort.Slice(arr, func(i, j int) bool {
		return arr[i] < arr[j]
	})
	prev := arr[0]
	for _, v := range arr {
		if v-prev > 1 {
			return false
		}
		prev = v
	}
	return true
}

func main() {
	defer writer.Flush()
	var testCaseNum int
	fmt.Fscanf(reader, "%d\n", &testCaseNum)

	var arrSize int
	var text string
	var split []string
	for i := 0; i < testCaseNum; i++ {
		fmt.Fscanf(reader, "%d\n", &arrSize)
		text, _ = reader.ReadString('\n')
		split = strings.Fields(text)
		arr := make([]int, len(split))
		for i, v := range split {
			arr[i], _ = strconv.Atoi(v)
		}
		if solver(arr) {
			fmt.Fprintf(writer, "YES\n")
		} else {
			fmt.Fprintf(writer, "NO\n")
		}
	}
}

package main

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

var sc = bufio.NewScanner(os.Stdin)

func Scan() string {
	sc.Scan()
	return sc.Text()
}
func iScan() int {
	n, _ := strconv.Atoi(Scan())
	return n
}
func fScan() float64 {
	n, _ := strconv.ParseFloat(Scan(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func SScan(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scan()
	}
	return a
}
func iSScan(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = iScan()
	}
	return a
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func sum(a []int) int {
	x := 0
	for _, v := range a {
		x += v
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	//予備
	t := iScan()
	for i := 0; i < t; i++ {
		n := iScan()
		flag := true
		a := make([]int, n)
		for j := 0; j < n; j++ {
			a[j] = iScan()
		}
		sort.Slice(a, func(i int, j int) bool {
			return a[i] < a[j]
		})
		for i := 0; i < len(a)-1; i++ {
			if math.Abs(float64(a[i]-a[i+1])) > 1 {
				flag = false
				break
			}
		}
		if flag {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

var sc = bufio.NewScanner(os.Stdin)

func Scan() string {
	sc.Scan()
	return sc.Text()
}
func iScan() int {
	n, _ := strconv.Atoi(Scan())
	return n
}
func fScan() float64 {
	n, _ := strconv.ParseFloat(Scan(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func SScan(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scan()
	}
	return a
}
func iSScan(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = iScan()
	}
	return a
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func sum(a []int) int {
	x := 0
	for _, v := range a {
		x += v
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	//予備
	t := iScan()
	for i := 0; i < t; i++ {
		n := iScan()
		flag := 0
		a := make([]int, n)
		for j := 0; j < n; j++ {
			a[j] = iScan()
		}
		sort.Slice(a, func(i int, j int) bool {
			return a[i] < a[j]
		})
		for i := 0; i < len(a)-1; i++ {
			if a[i] == -1 {
				continue
			}
			if a[i] == a[i+1] {
				a[i] = -1
			} else if math.Abs(float64(a[i]-a[i+1])) <= 1 {
				a[i] = -1
			}
		}
		for i := 0; i < len(a); i++ {
			if a[i] != -1 {
				flag++
			}
		}
		if flag <= 1 {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

//Task -
type Task struct {
	Values []int
}

func (t *Task) Solve() string {
	if len(t.Values) == 1 {
		return "YES"
	}
	answer := "YES"
	sort.Ints(t.Values)
	for i := range t.Values {
		if i == 0 {
			continue
		}
		if t.Values[i]-t.Values[i-1] > 1 {
			answer = "NO"
			break
		}
	}
	return answer
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	counter := 0
	// tasksAmount := 0
	tasks := []Task{}

	for scanner.Scan() {
		if counter == 0 {
			_, _ = strconv.Atoi(scanner.Text())
		} else {
			if counter%2 == 1 {
				//Инициируем новое задание
				_ = scanner.Text()
			}
			if counter%2 == 0 {
				var currentTask Task
				//Заполняем новое задание
				currentTask = Task{
					Values: []int{},
				}
				text := scanner.Text()
				for _, i := range strings.Split(text, " ") {
					a, _ := strconv.Atoi(i)
					currentTask.Values = append(currentTask.Values, a)
				}
				tasks = append(tasks, currentTask)
			}

		}
		counter++
	}

	for _, t := range tasks {
		fmt.Println(t.Solve())
	}
}

package main

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

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

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

	for i := 0; i < tries; i++ {
		var count int
		fmt.Fscan(in, &count)
		adads := make([]int, count)

		for j := 0; j < count; j++ {
			fmt.Fscan(in, &adads[j])
		}

		sort.Ints(adads)
		flag := false
		for k := 0; k < count-1; k++ {
			if adads[k+1]-adads[k] >= 2 {
				flag = true
				break
			}
		}

		if flag {
			fmt.Fprintln(out, "NO")
		} else {
			_, _ = fmt.Fprintln(out, "YES")
		}
	}
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var tries int
	_, _ = fmt.Scan(&tries)

	for i := 0; i < tries; i++ {
		var count int
		_, _ = fmt.Scan(&count)
		adads := make([]int, count)

		for j := 0; j < count; j++ {
			_, _ = fmt.Scan(&adads[j])
		}

		sort.Ints(adads)
		flag := false
		for k := 0; k < count-1; k++ {
			if adads[k+1]-adads[k] >= 2 {
				flag = true
				break
			}
		}

		if flag {
			fmt.Println("NO")

		} else {
			fmt.Println("YES")
		}
	}
}

package main

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

// https://codeforces.com/problemset/problem/1399/A
// A. Remove Smallest
// time limit per test
// 1 second
// memory limit per test
// 256 megabytes
// input
// standard input
// output
// standard output

// You are given the array a
// consisting of n

// positive (greater than zero) integers.

// In one move, you can choose two indices i
// and j (i≠j) such that the absolute difference between ai and aj is no more than one (|ai−aj|≤1

// ) and remove the smallest of these two elements. If two elements are equal, you can remove any of them (but exactly one).

// Your task is to find if it is possible to obtain the array consisting of only one element using several (possibly, zero) such moves or not.

// You have to answer t

// independent test cases.
// Input

// The first line of the input contains one integer t
// (1≤t≤1000) — the number of test cases. Then t

// test cases follow.

// The first line of the test case contains one integer n
// (1≤n≤50) — the length of a. The second line of the test case contains n integers a1,a2,…,an (1≤ai≤100), where ai is the i-th element of a

// .
// Output

// For each test case, print the answer: "YES" if it is possible to obtain the array consisting of only one element using several (possibly, zero) moves described in the problem statement, or "NO" otherwise.

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

	var t int
	_, _ = fmt.Fscan(bufStdin, &t)

	tests := make([][]int, t)
	for i := 0; i < t; i++ {
		var n int
		_, _ = fmt.Fscan(bufStdin, &n)

		tests[i] = make([]int, n)
		for j := 0; j < n; j++ {
			_, _ = fmt.Fscan(bufStdin, &tests[i][j])
		}
	}

	for _, test := range tests {
		if canReduceTo1Elem(test) {
			_, _ = fmt.Println("YES")
		} else {
			_, _ = fmt.Println("NO")
		}

	}
}

func canReduceTo1Elem(nums []int) bool {
	sort.Ints(nums)

	for i := 0; i < len(nums)-1; i++ {
		if nums[i+1]-nums[i] > 1 {
			return false
		}
	}

	return true
}

package main
import (
    "bufio"
    "fmt"
    "os"
    "sort"
)
func main(){
    r := bufio.NewReader(os.Stdin)
    w := bufio.NewWriter(os.Stdout)
    defer w.Flush()

    var t int
    fmt.Fscan(r, &t)
    for i := 0; i < t; i++ {
        var n int
        fmt.Fscan(r, &n)
        a := make([]int, n)
        for j := 0; j < n; j++{
            fmt.Fscan(r, &a[j])
        }
        sort.Ints(a)
        flag := true
        for j := 1; j < n; j++ {
            if a[j] - a[j-1] > 1 {
                flag = false
                break
            }
        }
        if flag {
            fmt.Fprintln(w, "YES")
        } else {
            fmt.Fprintln(w, "NO")
        }
    }
}

package main

import (
	"fmt"
	"sort"
)

type test struct {
	a []int
}

const TEST_MAX_SIZE = 50

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

// https://codeforces.com/problemset/problem/1399/A
// комментарий к решению
// Т.к. от нас не требуется выводить результирующий элемент массива,
// то достаточно проверить, что из массива можно сделать неубывающий
// массив с разницей соседних любых двух элементов <= 1
func taskSolution(in []test) string {
	ans := make([]byte, 0, len(in)*4) //YES\n == 4 byte
	for i := 0; i < len(in); i += 1 {
		if is_editable(in[i].a) {
			ans = append(ans, []byte("YES\n")...)
		} else {
			ans = append(ans, []byte("NO\n")...)
		}
	}
	return string(ans[:len(ans)-1])
}

func main() {
	var t int
	if _, err := fmt.Scan(&t); err != nil {
		panic(err)
	}

	in := make([]test, 0, t)
	for i := 0; i < t; i += 1 {
		var n, ai int
		a := make([]int, 0, TEST_MAX_SIZE)
		if _, err := fmt.Scan(&n); err != nil {
			panic(err)
		}
		for j := 0; j < n; j += 1 {
			if _, err := fmt.Scan(&ai); err != nil {
				panic(err)
			}
			a = append(a, ai)
		}
		in = append(in, test{a})
	}

	fmt.Println(taskSolution(in))
}

package main

import (
	"fmt";
"sort"
)

func main() {
	var t int64
	fmt.Scan(&t)
	for t > 0 {
		var n int
		fmt.Scan(&n)
		a := make([]int, n)
		for i:=0;i<n;i++ {
			fmt.Scan(&a[i])
		}
		sort.Ints(a)
		j := 0
		for j<n-1 && a[j+1]-a[j]<=1 {
			j++
		}
		if j==n-1 {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		t--
	}
}

package main

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

const (
	SCANNER_BUF_SIZE = 2 << 20

	INF = int64(math.MaxInt64)
	MOD = 1e9 + 7
)

var (
	writer  *bufio.Writer
	scanner *bufio.Scanner
)

func init() {
	writer = bufio.NewWriter(os.Stdout)
	scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, SCANNER_BUF_SIZE), SCANNER_BUF_SIZE)
}

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

func sint64() int64 {
	scanner.Scan()
	bb := scanner.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 suint64() uint64 {
	scanner.Scan()
	bb := scanner.Bytes()
	i := uint64(0)
	for _, b := range bb {
		i *= 10
		i += uint64(b - '0')
	}
	return i
}

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

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

func lcm(a, b int64) int64 {
	return a * b / gcd(a, b)
}

func abs(a int64) int64 {
	if a < 0 {
		return a * -1
	}
	return a
}

func min(a int64, rest ...int64) int64 {
	for _, r := range rest {
		if r < a {
			a = r
		}
	}
	return a
}

func max(a int64, rest ...int64) int64 {
	for _, r := range rest {
		if r > a {
			a = r
		}
	}
	return a
}

func main() {
	defer writer.Flush()
	t := sint64()
	for ; t > 0; t-- {
		n := sint64()
		a := make([]int64, n)
		for i := range a {
			a[i] = sint64()
		}
		printf("%s\n", sol(a))
	}
}

func sol(a []int64) string {
	sort.Slice(a, func(idx1, idx2 int) bool {
		return a[idx1] < a[idx2]
	})
	prev := a[0]
	for i := 1; i < len(a); i++ {
		if a[i]-prev > 1 {
			return "NO"
		}
		prev = a[i]
	}
	return "YES"
}

package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"sync"
)
var out chan string
var in *bufio.Scanner
var outWg *sync.WaitGroup
func GetNum(p string)int64{
	var ans int64 = 0
	flag:=true
	i:=0
	n:=len(p)
	if p[i]=='-'{
		flag=false
		i++
	}
	for ;i<n;i++{
		ans=(ans<<1)+(ans<<3)+int64(p[i]-'0')
	}
	if !flag{
		ans=-ans
	}
	return ans
}
func ReadString() string {
	in.Scan()
	return in.Text()
}
func ReadStringSlice(n int) []string {
	s := make([]string, n)
	for i := 0; i < n; i++ {
		s[i] = ReadString()
	}
	return s
}
func ReadInt() int {
	intStr := ReadString()
	return int(GetNum(intStr))
}
func ReadIntSlice(n int) []int {
	arr := make([]int, n)
	for i := 0; i < n; i++ {
		arr[i] = ReadInt()
	}
	return arr
}
func ReadInt64() int64 {
	int64Str:=ReadString()
	return GetNum(int64Str)
}
func ReadInt64Slice(n int)[] int64{
	arr:=make([]int64,n)
	for i:=0;i<n;i++{
		arr[i] = ReadInt64()
	}
	return arr
}

func init() {

	in = bufio.NewScanner(os.Stdin)
	in.Buffer(make([]byte, 1<<10), int(2e+5))
	in.Split(bufio.ScanWords)

	out = make(chan string, 1<<4)
	outWg = &sync.WaitGroup{}
	outWg.Add(1)
	writer := bufio.NewWriterSize(os.Stdout, int(2e+5))
	go func(write *bufio.Writer) {
		defer outWg.Done()
		defer write.Flush()
		for line := range out {
			write.WriteString(line + "\n")
		}
	}(writer)
}
func work(){
	n:=ReadInt()
	a:=ReadIntSlice(n)
	sort.Ints(a)
	f:=true
	for i:=1;i<len(a);i++{
		if a[i]-a[i-1] >1{
			fmt.Println("NO")
			f=false
		}
	}
	if f{
		fmt.Println("YES")
	}
}

func main(){
	for t:=ReadInt();t>0;t--{
		work()
	}
	close(out)
}

package main

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

func main() {
	var t, n, a, la int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		ans := "YES"
		fmt.Fscan(in, &n, &la)
		for j := 1; j < n; j++ {
			fmt.Fscan(in, &a)
			if abs(a-la) > 1 {
				ans = "NO"
			}
			la = a
		}
		fmt.Println(ans)
	}

}

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

package main

import "fmt"

func main() {
	var tn int
	fmt.Scan(&tn)
	for i := 0; i < tn; i++ {
		var tsSize int
		fmt.Scan(&tsSize)
		var ts []int
		for i := 0; i < tsSize; i++ {
			var item int
			fmt.Scan(&item)
			ts = append(ts, item)
		}
		for i := 0; i < tsSize; i++ {
			for j := i+1; j < tsSize;  {
				var dif = ts[i] - ts[j]
				if dif == 1 || dif == 0 {
					ts[j] = ts[len(ts)-1]
					tsSize--
				} else if dif == -1 {
					ts[i] = ts[len(ts)-1]
					tsSize--
				} else {
					j++
				}
			}
		}
		if tsSize == 1 {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

const MaxN int = 50 + 5

var read *bufio.Reader = bufio.NewReader(os.Stdin)
var write *bufio.Writer = bufio.NewWriter(os.Stdout)
var num [MaxN]int

func quickSort(arr [MaxN]int, left int, right int) {
	if left < right {
		partitionIndex := partition(arr, left, right)
		quickSort(arr, left, partitionIndex-1)
		quickSort(arr, partitionIndex+1, right)
	}
}

func partition(arr [MaxN]int, left int, right int) int {
	var res = left + 1
	for i := res; i <= right; i++ {
		if arr[i] < arr[left] {
			swap(arr, i, res)
			res += 1
		}
	}
	swap(arr, res, res-1)
	return res - 1
}

func swap(arr [MaxN]int, i int, j int) {
	arr[i], arr[j] = arr[j], arr[i]
}

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

func main() {
	defer write.Flush()
	var t int
	fmt.Fscan(read, &t)
	for ; t > 0; t-- {
		var n int
		fmt.Fscan(read, &n)
		for i := 0; i < n; i++ {
			fmt.Fscan(read, &num[i])
		}
		quickSort(num, 0, n-1)
		var flag bool = true
		for i := 1; i < n; i++ {
			if abs(num[i]-num[i-1]) > 1 {
				flag = false
				break
			}
		}
		if flag {
			fmt.Fprintln(write, "YES")
		} else {
			fmt.Fprintln(write, "NO")
		}
	}
}

package main

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

func main() {

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

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

	for i := 0; i < t; i++ {

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

		a := make([]int, n)
		for j := 0; j < n; j++ {
			fmt.Fscan(in, &a[j])
		}

		r := true
		for l := 1; l < n; l++ {
			diff := a[0] - a[l]
			if diff < 0 {
				diff *= -1
			}
			if diff > 1 {
				r = false
				break
			}
		}

		if r {
			fmt.Fprintln(out, "YES")
		} else {
			fmt.Fprintln(out, "NO")
		}

	}

}

package main

import (
"fmt"
"sort"
)

func main() {
	var t int
	fmt.Scan(&t)
	for ; t > 0; t-- {

		var n int
		var a []int
		for i := 0; i < n; i++ {
			var x int
			fmt.Scan(&x)
			a = append(a, x)
		}
		sort.Ints(a)
		flag := true
		for i := 0; i < n; i++ {
			if a[i + 1] - a[i] > 1 {
				flag = false
				break
			}
		}

		if flag {
			fmt.Println("Yes")
		} else {
		    fmt.Println("No")
		}
	}
}

package main

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

func main() {
	var t, n int

	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &n)
		var s []int
		for j := 0; j < n; j++ {
			var inp int
			fmt.Fscan(in, &inp)
			s = append(s, inp)
		}
		var isNo bool
		for i := 1; i < len(s); i++ {
			if s[i]-s[i-1] > 1 {
				isNo = true
				break
			}
		}
		if isNo {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}
	}
}

package main

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

func main() {
	var n, t, inp uint16
	var s []uint16
	in := bufio.NewReader(os.Stdin)
	fmt.Fscanf(in, "%d\n", &n)
	for i := uint16(0); i < n; i++ {
		fmt.Fscanf(in, "%d\n", &t)
		for j := uint16(0); j < t; j++ {
			if t-1 == j {
				fmt.Fscanf(in, "%d\n", &inp)
				s = append(s, inp)
			} else {
				fmt.Fscanf(in, "%d", &inp)
				s = append(s, inp)
			}
		}

		if check(s) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		s = nil
	}
}
func check(s []uint16) bool {
	for k := 0; k < len(s)-1; k++ {
		if uint16(math.Abs(float64(s[k])-float64(s[k+1]))) > 1 {
			return false
		}
	}
	return true
}

package main

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

func main() {
	var t, n int

	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &n)
		var s []int
		for j := 0; j < n; j++ {
			var inp int
			fmt.Fscan(in, &inp)
			s = append(s, inp)
		}
		for i := 1; i < len(s); i++ {
			if s[i]-s[i-1] > 1 {
				fmt.Println("NO")
			}
		}
		fmt.Println("YES")
	}
}

package main

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

func main() {
	var t, n int
	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &n)
		var thisisNo bool = false
		var perv int
		for j := 0; j < n; j++ {
			var inp int
			fmt.Fscan(in, &inp)
			if perv != 0 {
				if int(math.Abs(float64(perv-inp))) > 1 {
					thisisNo = true
					//break
				}
			}
			perv = inp
		}
		if thisisNo == true {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}
	}
}

package main

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

func main() {
	var n, t, inp uint16
	var s []uint16
	in := bufio.NewReader(os.Stdin)
	fmt.Fscanf(in, "%d\n", &n)
	for i := uint16(0); i < n; i++ {
		fmt.Fscanf(in, "%d\n", &t)
		for j := uint16(0); j < t-1; j++ {
			fmt.Fscanf(in, "%d", &inp)
			s = append(s, inp)
		}
		fmt.Fscanf(in, "%d\n", &inp)
		s = append(s, inp)
		if check(s) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		s = nil
	}
}
func check(s []uint16) bool {
	for k := 0; k < len(s)-1; k++ {
		if uint16(math.Abs(float64(s[k])-float64(s[k+1]))) > 1 {
			return false
		}
	}
	return true
}

package main

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

func main() {
	var t, n int

	in := bufio.NewReader(os.Stdin)
	fmt.Fscan(in, &t)
	for i := 0; i < t; i++ {
		fmt.Fscan(in, &n)
		var s []int
		for j := 0; j < n; j++ {
			var inp int
			fmt.Fscan(in, &inp)
			s = append(s, inp)
		}
		var isNo bool
		for i := 1; i < len(s); i++ {
			if int(math.Abs(float64(s[i]-s[i-1]))) > 1 {
				isNo = true
				break
			}
		}
		if isNo {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}
	}
}

package main

import (
	"fmt"
	"sort"
)

func nxt() int {
	var x int
	fmt.Scan(&x)
	return x
}

func ok() {
	println("YES")
}

func no() {
	println("NO")
}

func solve() {
	n := nxt()
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nxt()
	}
	sort.Sort(sort.IntSlice(a))
	for i := 1; i < n; i++ {
		if a[i - 1] + 1 < a[i] {
			no()
			return
		}
	}
	ok()
}

func main() {
	var t int = nxt()
	for t > 0 {
		t--
		solve()
	}
	return
}

package main

import (
	"fmt"
	"sort"
)

func solve() {
	var massLen int
	fmt.Scanf("%d\n", &massLen)
	array := make([]int, massLen)
	for i := 0; i < massLen; i++ {
		fmt.Scanf("%d", &array[i])
	}
	sort.Ints(array)
	for i := 1; i < massLen; i++ {
		if array[i]-array[i-1] > 1 {
			fmt.Println("NO")
			return
		}
	}
	fmt.Println("YES")
	return
}

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

	for i := 0; i < n; i++ {
		solve()
	}
}

package main

import (
	"fmt"
	"strconv"
)

func checkArray(a []int) bool {
	for i:=0; i<len(a)-1; i++ {
		for j:=0; j<len(a); j++ {
			if a[j]-a[i]>1 {
				return false
			}
		}
	}
	return true
}

func main() {
	var n, t int
	var s string
	fmt.Scan(&t)

	for k:=0; k<t; k++ {
		fmt.Scan(&n)

		var a []int
		for p:=0; p<n; p++ {
			fmt.Scan(&s)
			m, _ := strconv.Atoi(s)
			a = append(a, m)
		}

		if checkArray(a) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"sort"
	"strconv"
)

func checkArray(a []int) bool {
	for i:=0; i<len(a)-1; i++ {
		for j:=i+1; j<len(a); j++ {
			if a[j]-a[i]>1 {
				return false
			}
		}
	}
	return true
}

func main() {
	var n, t int
	var s string
	fmt.Scan(&t)

	for k:=0; k<t; k++ {
		fmt.Scan(&n)

		var a []int
		for p:=0; p<n; p++ {
			fmt.Scan(&s)
			m, _ := strconv.Atoi(s)
			a = append(a, m)
		}

		sort.Ints(a)

		if checkArray(a) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

import (
	"fmt"
	"sort"
	"strconv"
)

func checkArray(a []int) bool {
	for i:=0; i<len(a)-1; i++ {
		for j:=i+1; j<len(a); j++ {
			if a[j]-a[i]>1 {
				return false
			}
		}
	}
	return true
}

func main() {
	var n, t int
	var s string
	fmt.Scan(&t)

	for k:=0; k<t; k++ {
		fmt.Scan(&n)

		var a []int
		for p:=0; p<n; p++ {
			fmt.Scan(&s)
			m, _ := strconv.Atoi(s)
			a = append(a, m)
		}

		sort.Sort(sort.IntSlice(a))

		if checkArray(a) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

package main

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

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

func solver(arr []int) bool {
	if len(arr) < 2 {
		return true
	}
	sort.Slice(arr, func(i, j int) bool {
		return arr[i] < arr[j]
	})
	prev := arr[0]
	for _, v := range arr {
		if v-prev > 1 {
			return false
		}
		prev = v
	}
	return true
}

func main() {
	defer writer.Flush()
	arr := []int{1, 2, 3, 4, 5, 6, 7, 4}
	if solver(arr) {
		fmt.Fprintf(writer, "YES\n")
	} else {
		fmt.Fprintf(writer, "NO\n")
	}
}

func temp() {
	defer writer.Flush()
	var testCaseNum int
	fmt.Fscanf(reader, "%d\n", &testCaseNum)

	var arrSize int
	var text string
	var split []string
	for i := 0; i < testCaseNum; i++ {
		fmt.Fscanf(reader, "%d\n", &arrSize)
		text, _ = reader.ReadString('\n')
		split = strings.Fields(text)
		arr := make([]int, len(split))
		for i, v := range split {
			arr[i], _ = strconv.Atoi(v)
		}
		if solver(arr) {
			fmt.Fprintf(writer, "YES\n")
		} else {
			fmt.Fprintf(writer, "NO\n")
		}
	}
}

package main

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

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

func solver(arr []int) bool {
	if len(arr) < 2 {
		return true
	}
	sort.Slice(arr, func(i, j int) bool {
		return arr[i] < arr[j]
	})
	prev := arr[0]
	for _, v := range arr {
		if v-prev > 1 {
			return false
		}
	}
	return true
}

func main() {
	defer writer.Flush()
	var testCaseNum int
	fmt.Fscanf(reader, "%d\n", &testCaseNum)

	var arrSize int
	var text string
	var split []string
	for i := 0; i < testCaseNum; i++ {
		fmt.Fscanf(reader, "%d\n", &arrSize)
		text, _ = reader.ReadString('\n')
		split = strings.Fields(text)
		arr := make([]int, arrSize)
		for i, v := range split {
			arr[i], _ = strconv.Atoi(v)
		}
		if solver(arr) {
			fmt.Fprintf(writer, "YES\n")
		} else {
			fmt.Fprintf(writer, "NO\n")
		}
	}
}

package main

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

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

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

	for i := 0; i < tries; i++ {
		var count int
		fmt.Fscan(in, &count)
		adads := make([]int, count)

		for j := 0; j < count; j++ {
			fmt.Fscan(in, &adads[j])
		}

		sort.Ints(adads)
		flag := false
		for k := 0; k < count-1; k++ {
			if adads[k+1]-adads[k] >= 2 {
				flag = true
				break
			}
		}

		if flag {
			fmt.Fprintln(out, "NO")
		} else {
			fmt.Fprintln(out, "YES")
		}
	}
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var tries int
	_, _ = fmt.Scan(&tries)

	for i := 0; i < tries; i++ {
		var count int
		_, _ = fmt.Scan(&count)
		adads := make([]int, count)

		for j := 0; j < count; j++ {
			_, _ = fmt.Scanf("%d", &adads[j])
		}

		sort.Ints(adads)
		flag := false
		for k := 0; k < count; k++ {
			if k+1 < count {
				if adads[k+1]-adads[k] >= 2 {
					println("NO")
					flag = true
					break
				}
			}
		}

		if !flag {
			fmt.Println("YES")
		}
	}
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var tries int
	_, _ = fmt.Scan(&tries)
	answers := make([]string, tries)

	for i := 0; i < tries; i++ {
		var count int
		_, _ = fmt.Scan(&count)
		adads := make([]int, count)

		for j := 0; j < count; j++ {
			_, _ = fmt.Scanf("%d", &adads[j])
		}

		sort.Ints(adads)
		flag := false
		for k := 0; k < count; k++ {
			if k+1 < count {
				if adads[k+1]-adads[k] >= 2 {
					answers[i]="NO"
					flag = true
					break
				}
			}
		}

		if !flag {
			answers[i]="YES"
		}
	}

	for j := 0; j < tries; j++ {
		println(answers[j])
	}
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	var tries int
	_, _ = fmt.Scan(&tries)

	for i := 0; i < tries; i++ {
		var count int
		_, _ = fmt.Scan(&count)
		adads := make([]int, count)

		for j := 0; j < count; j++ {
			_, _ = fmt.Scan(&adads[j])
		}

		sort.Ints(adads)
		flag := false
		for k := 0; k < count-1; k++ {
			if adads[k+1]-adads[k] >= 2 {
				println("NO")
				flag = true
				break
			}
		}

		if !flag {
			fmt.Println("YES")
		}
	}
}


In the Main Berland Bank n people stand in a queue at the cashier, everyone knows his/her height hi, and the heights of the other people in the queue. Each of them keeps in mind number ai — how many people who are taller than him/her and stand in queue in front of him.After a while the cashier has a lunch break and the people in the queue seat on the chairs in the waiting room in a random order.When the lunch break was over, it turned out that nobody can remember the exact order of the people in the queue, but everyone remembers his number ai.Your task is to restore the order in which the people stood in the queue if it is possible. There may be several acceptable orders, but you need to find any of them. Also, you need to print a possible set of numbers hi — the heights of people in the queue, so that the numbers ai are correct.

The first input line contains integer n — the number of people in the queue (1 ≤ n ≤ 3000). Then n lines contain descriptions of the people as "namei ai" (one description on one line), where namei is a non-empty string consisting of lowercase Latin letters whose length does not exceed 10 characters (the i-th person's name), ai is an integer (0 ≤ ai ≤ n - 1), that represents the number of people who are higher and stand in the queue in front of person i. It is guaranteed that all names are different.

If there's no acceptable order of the people in the queue, print the single line containing "-1" without the quotes. Otherwise, print in n lines the people as "namei hi", where hi is the integer from 1 to 109 (inclusive), the possible height of a man whose name is namei. Print the people in the order in which they stand in the queue, starting from the head of the queue and moving to its tail. Numbers hi are not necessarily unique.

// Codeforces 141 C not done XXX
package main

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

// Man no women because of misogynism.
type Man struct {
    name string
    h int       // height
    hb int      // higher before
}
// Men array of Man for sorting sorting.
type Men []Man

func (slice Men) Len() int {
	return len(slice)
}
func (slice Men) Less(i, j int) bool {
	return slice[i].hb < slice[j].hb;
}
func (slice Men) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

var a Men

func main() {
    // reading n
    var n int
    in    := bufio.NewReader(os.Stdin)
    s,err := in.ReadString('\n')
    if err != nil {
        fmt.Println("first read failure", err)
    }
    ss := strings.Split(strings.Trim(s," \n\r")," ")
    n,err = strconv.Atoi(ss[0])
    a = Men(make([]Man,n))
    for i:=0; i<n; i++ {
        s,err := in.ReadString('\n')
        if err != nil {
            fmt.Println("first read failure", err)
        }
        ss = strings.Split(strings.Trim(s," \n\r")," ")
        var m Man
        m.name = ss[0]
        m.h = 0
        m.hb,err = strconv.Atoi(ss[1])
        a[i] = m
    }
    sort.Sort(a)

    // setting h
    for i:=0; i<n; i++ {
        a[i].h = i+1 - a[i].hb
        if a[i].h<=0 {
            fmt.Println(-1)
            return
        }
        for j:=0; j<i; j++ {
            if a[j].h>=a[i].h {
                a[j].h++
            }
        }
    }

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

package main

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

func main() {
	s := bufio.NewScanner(os.Stdin)
	s.Scan()
	n, _ := strconv.Atoi(s.Text())

	var input []*pair
	for i := 0; i < n; i++ {
		s.Scan()
		line := s.Text()
		tokens := strings.Split(line, " ")
		a, _ := strconv.Atoi(tokens[1])
		input = append(input, &pair{tokens[0], a})
	}

	output := findOrder(input)
	if output == nil {
		fmt.Println(-1)
		return
	}

	for _, o := range output {
		fmt.Println(o.key, o.value)
	}
}

type pair struct {
	key   string
	value int
}

func findOrder(input []*pair) []*pair {
	// Sort the input by their a values. This will be the ordering in the queue.
	sort.Slice(input, lessPair(input))
	index := make(map[string]*pair)

	// Keep the height ordering in this separate slice.
	// The earlier the name appears in the slice, the taller.
	h := make([]string, 0, len(input))

	for _, p := range input {
		if p.value > len(h) {
			return nil
		}

		index[p.key] = p

		// Insert this person at the i-th position in the height ordering.
		h = append(h[:p.value], append([]string{p.key}, h[p.value:]...)...)
	}

	// Determine all the people's heights.
	tallest := len(h)
	for i, name := range h {
		index[name].value = tallest - i
	}

	return input
}

func lessPair(p []*pair) func(i, j int) bool {
	return func(i, j int) bool {
		return p[i].value < p[j].value
	}
}

// Codeforces 635 E, with podskazki, done
package main

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

// Man no women because of misogynism.
type Man struct {
    name string
    h int       // height
    hb int      // higher before
}
// Men array of Man for sorting sorting.
type Men []Man

func (slice Men) Len() int {
	return len(slice)
}
func (slice Men) Less(i, j int) bool {
	return slice[i].hb < slice[j].hb;
}
func (slice Men) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

var a Men

func main() {
    // reading n
    var n int
    in    := bufio.NewReader(os.Stdin)
    s,err := in.ReadString('\n')
    if err != nil {
        fmt.Println("first read failure", err)
    }
    ss := strings.Split(strings.Trim(s," \n\r")," ")
    n,err = strconv.Atoi(ss[0])
    a = Men(make([]Man,n))
    for i:=0; i<n; i++ {
        s,err := in.ReadString('\n')
        if err != nil {
            fmt.Println("first read failure", err)
        }
        ss = strings.Split(strings.Trim(s," \n\r")," ")
        var m Man
        m.name = ss[0]
        m.h = 0
        m.hb,err = strconv.Atoi(ss[1])
        a[i] = m
    }
    sort.Sort(a)

    // setting h
    for i:=0; i<n; i++ {
        j := 0
        cnt := a[i].hb
        for j=i-1; j>=0 && cnt>0; j-- {
            a[j].h++
            cnt--
        }
        if cnt>0 {
            fmt.Println(-1)
            return
        }
        a[i].h = j+1
    }

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

// Codeforces 635 E, with podskazki, done
package main

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

// Man no women because of misogynism.
type Man struct {
    name string
    h int       // height
    hb int      // higher before
}
// Men array of Man for sorting sorting.
type Men []Man

func (slice Men) Len() int {
	return len(slice)
}
func (slice Men) Less(i, j int) bool {
	return slice[i].hb < slice[j].hb;
}
func (slice Men) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

var a Men

func main() {
    // reading n
    var n int
    in    := bufio.NewReader(os.Stdin)
    s,err := in.ReadString('\n')
    if err != nil {
        fmt.Println("first read failure", err)
    }
    ss := strings.Split(strings.Trim(s," \n\r")," ")
    n,err = strconv.Atoi(ss[0])
    a = Men(make([]Man,n))
    for i:=0; i<n; i++ {
        s,err := in.ReadString('\n')
        if err != nil {
            fmt.Println("first read failure", err)
        }
        ss = strings.Split(strings.Trim(s," \n\r")," ")
        var m Man
        m.name = ss[0]
        m.h = 0
        m.hb,err = strconv.Atoi(ss[1])
        a[i] = m
    }
    sort.Sort(a)

    // setting h
    for i:=0; i<n; i++ {
        j := 0
        cnt := a[i].hb
        for j=i-1; j>=0 && cnt>0; j-- {
            a[j].h++
            cnt--
        }
        if cnt>0 {
            fmt.Println(-1)
            return
        }
        a[i].h = j+2
    }

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


You have n distinct points on a plane, none of them lie on OY axis. Check that there is a point after removal of which the remaining points are located on one side of the OY axis.

The first line contains a single positive integer n (2 ≤ n ≤ 105). The following n lines contain coordinates of the points. The i-th of these lines contains two single integers xi and yi (|xi|, |yi| ≤ 109, xi ≠ 0). No two points coincide.

Print "Yes" if there is such a point, "No" — otherwise. You can print every letter in any case (upper or lower).

NoteIn the first example the second point can be removed.In the second example there is no suitable for the condition point.In the third example any point can be removed.

package main

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

func solve() {
	n := readInt()
	nleft := 0
	nright := 0
	for i := 0; i < n; i++ {
		x := readInt()
		_ = readInt()
		if x < 0 {
			nleft++
		} else if x > 0 {
			nright++
		}
	}

	if nleft == 1 || nleft == 0 || nright == 0 || nright == 1 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

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

package main

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

var scanner *bufio.Scanner

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

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

func main() {
	init_scanner()
	n := readInt()
	a, b := 0, 0
	for i := 0; i < n; i++ {
		x, _ := readInt(), readInt()
		if x < 0 {
			a++
		} else {
			b++
		}
	}

	if a <= 1 || b <= 1 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

package main

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

func main() {
	var n int
	var left, right int
	bs, err := ioutil.ReadAll(os.Stdin)
	if err != nil {
		panic(err.Error())
	}
	file := bytes.NewReader(bs)
	fmt.Fscan(file, &n)
	for i := 0; i < n; i++ {
		var a, b int
		n, err := fmt.Fscan(file, &a, &b)
		if n != 2 {
			panic("n!=2")
		} else if err != nil {
			panic(err.Error())
		}
		if a > 0 {
			right++
		} else {
			left++
		}
	}
	if right <= 1 || left <= 1 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

// Codeforces helper functions
// 20 Jan 18
// samadhi

package main

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

func main() {
	reader := bufio.NewReader(os.Stdin)
	//fmt.Println("Hello, world!")

	n := gsli(reader)[0]

	neg := 0
	pos := 0

	for i := 0; i < n; i++ {
		cur := gsli(reader)
		if cur[0] > 0 {
			pos += 1
		} else {
			neg += 1
		}
	}

	if neg <= 1 || pos <= 1 {
		fmt.Printf("Yes")
		return
	} else {
		fmt.Printf("No")
	}

	//fmt.Printf("%#v", points)

}

// Input helpers

// If you don't pass in a reference to the reader, and just instantiate a new
// one every time, it will work locally, with IO typed at human-speed, but not
// on Codeforces.

// Get Space-separated Line as Strings
//
// Example input:
// 1 test 382.0
// Example output:
// ["1", "test", "382.0"]

func gsls(reader *bufio.Reader) (arr []string) {
	// Get a full line
	input, _ := reader.ReadString('\n')

	//Strip newline and return chars, if any
	input = strings.TrimSuffix(input, "\n")
	input = strings.TrimSuffix(input, "\r")

	// Split at the spaces into an array
	arr = strings.Split(input, " ")

	return
}

// Get Space-separated Line as Integers
// Any non-valid integers will be 0
//
// Example input:
// test 1 12.3 -117
// Example output:
// [0, 1, 0, -117]

func gsli(reader *bufio.Reader) (arr []int) {
	stringArr := gsls(reader)

	for _, e := range stringArr {
		cur, _ := strconv.Atoi(e)
		arr = append(arr, cur)
	}

	return
}

// Get Space-separated Line as 64-bit Floats
// Any non-valid floats will be 0
//
// Example input:
// test 128.328 12 -11.0
// Example output:
// [0, 128.328, 12, -11]

func gslf(reader *bufio.Reader) (arr []float64) {
	stringArr := gsls(reader)

	for _, e := range stringArr {
		cur, _ := strconv.ParseFloat(e, 64)
		arr = append(arr, cur)
	}

	return
}

// Math helpers

// Positve Modulo
// Returns x mod y, but always positive

func posMod(x, y int) int {
	return (x%y + y) % y
}

package main

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

func solve() {
	n := readInt()
	cnt0 := 0
	cnt1 := 0
	for i := 0; i < n; i++ {
		x := readInt()
		readInt()
		if x > 0 {
			cnt0++
		} else {
			cnt1++
		}
	}
	if cnt0 <= 1 || cnt1 <= 1 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

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 abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func min(a int, 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"
)

var inf int = 0x3f3f3f3f
var reader *bufio.Reader

func init() {
	stdin := os.Stdin
	// stdin, _ = os.Open("1.in")
	reader = bufio.NewReaderSize(stdin, 1<<20)
}

var n int

func main() {
	fmt.Fscan(reader, &n)
	var l, r int
	for ; n != 0; n-- {
		var x, y int
		fmt.Fscan(reader, &x, &y)
		if x <= 0 {
			l++
		} else {
			r++
		}
	}
	if l <= 1 || r <= 1 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

package main

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

// -----------------------------------------------------------------------------

// IO helper functions

// Returns next token from input.  It must be initialized by SetInput()
// before the first call.
var nextToken func() ([]byte, error)
var nextLine func() ([]byte, error)

// Holds a buffer for output.  It must be initialized by SetOutput().
// All IO fucntions (read*() and [e]print*()) should write to OutputWriter
// instead of this.
var OutputBuffer *bufio.Writer

// Holds an io.Writer.  It must be initialized by SetOutput()
var OutputWriter io.Writer

// Set IO functions for interactive input/output.
func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

// Setup OutputBuffer and OutputWriter.
func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

// Flushes OutputBuffer
func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

// Returns true if c is a white space
func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

func IsNewLine(c byte) bool {
	switch c {
	case '\n', '\r':
		return true
	}
	return false
}

// Setup nextToken with input buffer.
func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial

	restLn := func() ([]byte, error) {
		for i < len(b) && IsNewLine(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsNewLine(b[i]) {
			i++
		}
		return b[j:i], nil
	}

	initialLn := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextLine = restLn
		return restLn()
	}
	nextLine = initialLn
}

// Setup nextToken without input buffer.
func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

// -----------------------------------------------------------------------------

// IO functions

// Reads next token and return it as []byte
func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b[:len(b):len(b)]
}

// Reads next token and return it as string
func reads() string {
	return string(readb())
}

// Read next line as []byte.  Trailing '\n' will not be included.
// See also comments on readb()
func readbln() []byte {
	b, err := nextLine()
	if err != nil {
		panic(err)
	}
	return b[:len(b):len(b)]
}

// Read next line as string
func readsln() string {
	return string(readbln())
}

// Reads next token and return it as int64
func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// Reads next token and return it as int
func readi() int {
	return int(readll())
}

// Reads next token and return it as float64
func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// Write args to OutputWriter with the format f
func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

// Write args to OutputWriter without format
func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

// Write args to stderr with the format f
func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// Write args to stderr without format
func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

// -----------------------------------------------------------------------------

// Utilities

func sumSlice(a []int) int {
	var res int
	for _, v := range a {
		res += v
	}
	return res
}

func sumSlicell(a []int64) int64 {
	var res int64
	for _, v := range a {
		res += v
	}
	return res
}

func readInts(N int) (int, []int) {
	if N == 0 {
		N = readi()
	}
	a := make([]int, N)
	for i := range a {
		a[i] = readi()
	}
	return N, a
}

func readIntsll(N int) (int, []int64) {
	if N == 0 {
		N = readi()
	}
	a := make([]int64, N)
	for i := range a {
		a[i] = readll()
	}
	return N, a
}

// reverse slice in place
func reverse(a []int) {
	for i, j := 0, len(a)-1; i < j; i, j = i+1, j-1 {
		a[i], a[j] = a[j], a[i]
	}
}

// areverse: allocating reverse
func areverse(a []int) []int {
	b := make([]int, len(a))
	for i := range a {
		b[i] = a[len(a)-i-1]
	}
	return b
}

// -----------------------------------------------------------------------------

// Simple math functions

const (
	// big prime
	INF  = 1000000007
	INF2 = 1000000009
	INF3 = 998244353
)

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

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

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

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

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

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

// egcd(a, b) returns d, x, y:
//   d is gcd(a,b)
//   x, y are  integers that satisfy ax + by = d
func egcd(a, b int) (int, int, int) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcd(b, a%b)
	return d, y, x - a/b*y
}

func egcdll(a, b int64) (int64, int64, int64) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcdll(b, a%b)
	return d, y, x - a/b*y
}

func gcd(a, b int) int {
	d, _, _ := egcd(a, b)
	return d
}

func gcdll(a, b int64) int64 {
	d, _, _ := egcdll(a, b)
	return d
}

// set up IO functions
func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}

func main() {
	defer Flush()

	n := readi()
	var pos, neg int
	for i := 0; i < n; i++ {
		x := readi()
		_ = readi()
		if x < 0 {
			neg++
		} else {
			pos++
		}
	}

	if neg < 2 || pos < 2 {
		println("Yes")
	} else {
		println("No")
	}
}

package main

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

func readInt64(scanner *bufio.Scanner) int64 {
	scanner.Scan()
	value, _ := strconv.ParseInt(scanner.Text(), 10, 64)
	return value
}

func main() {
	var n int
	var c int
	var a int64

	fmt.Scan(&n)

	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)

	for i := 0; i < n; i++ {
		a = readInt64(scanner)
		_ = readInt64(scanner)
		if a > 0 {
			c++
		}
	}

	if c < 2 || n-c < 2 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

package main

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

func main() {
	sc := NewScanner()
	N := sc.NextInt()
	A := []int{0, 0}
	for i := 0; i < N; i++ {
		a, _ := sc.NextInt(), sc.NextInt()
		if a < 0 {
			A[0]++
		} else {
			A[1]++
		}
	}
	sort.Ints(A)
	if A[0] <= 1 {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}

}

type Scanner struct {
	r   *bufio.Reader
	buf []byte
	p   int
}

func NewScanner() *Scanner {
	rdr := bufio.NewReaderSize(os.Stdin, 1000)
	return &Scanner{r: rdr}
}
func (s *Scanner) Next() string {
	s.pre()
	start := s.p
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			break
		}
	}
	result := string(s.buf[start:s.p])
	s.p++
	return result
}
func (s *Scanner) NextLine() string {
	s.pre()
	start := s.p
	s.p = len(s.buf)
	return string(s.buf[start:])
}
func (s *Scanner) NextInt() int {
	v, _ := strconv.Atoi(s.Next())
	return v
}
func (s *Scanner) NextInt64() int64 {
	v, _ := strconv.ParseInt(s.Next(), 10, 64)
	return v
}

func (s *Scanner) NextIntArray() []int {
	s.pre()
	start := s.p
	result := []int{}
	for ; s.p < len(s.buf)+1; s.p++ {
		if s.p == len(s.buf) || s.buf[s.p] == ' ' {
			v, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 0)
			result = append(result, int(v))
			start = s.p + 1
		}
	}

	return result
}
func (s *Scanner) NextInt64Array() []int64 {
	s.pre()
	start := s.p
	result := []int64{}
	for ; s.p < len(s.buf)+1; s.p++ {
		if s.p == len(s.buf) || s.buf[s.p] == ' ' {
			v, _ := strconv.ParseInt(string(s.buf[start:s.p]), 10, 64)
			result = append(result, v)
			start = s.p + 1
		}
	}
	return result
}

func (s *Scanner) NextMap() map[int]bool {
	s.pre()
	start := s.p
	mp := map[int]bool{}
	for ; s.p < len(s.buf); s.p++ {
		if s.buf[s.p] == ' ' {
			v, _ := strconv.Atoi(string(s.buf[start:s.p]))
			mp[v] = true
			start = s.p + 1
		}
	}
	v, _ := strconv.Atoi(string(s.buf[start:s.p]))
	mp[v] = true

	return mp
}

func (s *Scanner) pre() {
	if s.p >= len(s.buf) {
		s.readLine()
		s.p = 0
	}
}
func (s *Scanner) readLine() {
	s.buf = make([]byte, 0)
	for {
		l, p, e := s.r.ReadLine()
		if e != nil {
			panic(e)
		}
		s.buf = append(s.buf, l...)
		if !p {
			break
		}
	}
}

package main

import (
	"fmt"
)

func main() {
	/*file, err := os.Open("stdin.txt")
	if err != nil {
		panic(err.Error())
	}*/
	var n int
	var left, right int
	fmt.Scanf("%d", &n)
	for i := 0; i < n; i++ {
		var a, b int
		fmt.Scanf("%d%d", &a, &b)
		if a > 0 {
			right++
		} else {
			left++
		}
	}
	if right <= 1 || left <= 1 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}

package main

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

func readInt64(scanner *bufio.Scanner) int64 {
	scanner.Scan()
	value, _ := strconv.ParseInt(scanner.Text(), 10, 64)
	return value
}

func main() {
	var n int
	var c int
	var a int64

	fmt.Scan(&n)

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

	for i := 0; i < n; i++ {
		a = readInt64(scanner)
		_ = readInt64(scanner)
		if a > 0 {
			c++
		}
	}

	fmt.Println(c)
	if c < 2 || n-c < 2 {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}