/*
URL:
https://codeforces.com/contest/1352/problem/F
*/

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
	a, b, c int
)

func main() {
	t = ReadInt()
	for i := 0; i < t; i++ {
		a, b, c = ReadInt3()
		solve(a, b, c)
	}
}

func solve(a, b, c int) {
	A := []rune{}

	if c > 0 {
		for i := 0; i < c+1; i++ {
			A = append(A, '1')
		}
	}

	if a > 0 {
		if len(A) > 0 {
			b--
		}
		for i := 0; i < a+1; i++ {
			A = append(A, '0')
		}
	}

	if len(A) > 0 && A[len(A)-1] == '0' {
		for i := 0; i < b; i++ {
			if i%2 == 0 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	} else if len(A) > 0 && A[len(A)-1] == '1' {
		for i := 0; i < b; i++ {
			if i%2 == 1 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	} else {
		for i := 0; i < b+1; i++ {
			if i%2 == 0 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	}

	if len(A) > 0 {
		fmt.Println(string(A))
	} else {
		fmt.Println("10")
	}
}

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

/*********** 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"

	//"os"
	"strconv"
	"strings"
)

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

func Assert(b bool) {
	if !b {
		panic("Assertion error")
	}
}

func main() {
	input := os.Stdin
	/*
		  input := strings.NewReader(`7
		1 3 5
		1 1 1
		3 9 3
		0 1 0
		3 1 2
		0 0 3
		2 0 0`)
	*/
	scanner := bufio.NewScanner(input)

	getLine := func() string {
		if !scanner.Scan() {
			panic("expected line")
		}
		return scanner.Text()
	}

	parseNumber := func(s string) int {
		t, err := strconv.ParseInt(s, 10, 64)
		CheckError(err)
		return int(t)
	}

	getNumber := func() int {
		return parseNumber(getLine())
	}

	t := getNumber()
	for i := 0; i < t; i++ {
		lst := strings.Split(getLine(), " ")
		n0 := parseNumber(lst[0])
		n1 := parseNumber(lst[1])
		n2 := parseNumber(lst[2])

		//fmt.Println(n0, n1, n2)
		constructBinary(n0, n1, n2)
	}

}

func constructBinary(n0, n1, n2 int) {
	var lst []byte
	if n0 > 0 {
		for i := 0; i < n0+1; i++ {
			lst = append(lst, '0')
		}
	}

	if n2 > 0 {
		for i := 0; i < n2+1; i++ {
			lst = append(lst, '1')
		}
	}

	if n0 > 0 && n2 > 0 {
		n1 -= 1
	}

	if len(lst) == 0 {
		for i := 0; i < n1+1; i++ {
			b := byte('0')
			if i%2 == 0 {
				b = '1'
			}
			lst = append(lst, b)
		}
	} else {
		bb := [2]byte{'0', '1'}
		if lst[len(lst)-1] == '0' {
			bb = [2]byte{'1', '0'}
		}

		for i := 0; i < n1; i++ {
			lst = append(lst, bb[i%2])
		}
	}

	fmt.Println(string(lst))
}

package main

import (
	"fmt"
	"strings"
)

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

	for t > 0 {
		var n0, n1, n2 int
		var output string
		fmt.Scan(&n0, &n1, &n2)

		if n1 == 0 {
			if n0 != 0 {
				output = strings.Repeat("0", n0+1)
			} else {
				output = strings.Repeat("1", n2+1)
			}
		} else if n1&1 == 1 {
			output = strings.Repeat("0", n0) + strings.Repeat("01", (n1+1)/2) + strings.Repeat("1", n2)
		} else {
			output = strings.Repeat("0", n0) + strings.Repeat("01", n1/2) + strings.Repeat("1", n2) + "0"
		}

		fmt.Println(output)
		t--
	}
}

package main

import (
	"bytes"
	"fmt"
)

func dfs(state [3]int) string {
	path := make([]byte, 0)
	var dfsInner func(byte, [3]int) bool
	dfsInner = func(prev byte, state [3]int) bool {
		if state[0] < 0 || state[1] < 0 || state[2] < 0 {
			return false
		}
		if state[0] == 0 && state[1] == 0 && state[2] == 0 {
			path = append(path, prev)
			return true
		}
		// state graph
		// 00 -> 00, 01
		// 01 -> 11, 10
		// 10 -> 00, 01
		// 11 -> 11, 10
		if prev == '1' {
			if dfsInner('0', [3]int{state[0], state[1]-1, state[2]}) || dfsInner('1', [3]int{state[0], state[1], state[2]-1}) {
				path = append(path, '1')
				return true
			}
		} else if prev == '0' {
			if dfsInner('0', [3]int{state[0]-1, state[1], state[2]}) || dfsInner('1', [3]int{state[0], state[1]-1, state[2]}) {
				path = append(path, '0')
				return true
			}
		}

		return false
	}

	if !dfsInner('0', state) {
		dfsInner('1', state)
	}

	buf := bytes.NewBuffer(path)
	return buf.String()
}

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

	for i := 0; i < t; i++ {
		// pairs with 0 ones, pairs with 1 one, pairs with 2 ones
		var state [3]int
		fmt.Scan(&state[0], &state[1], &state[2])

		// find a path through that hits nodes
		// with the required counts
		// dfs, state is remaining allowed transitions
		fmt.Println(dfs(state))
	}
}

package main

import (
	"bufio"
	. "fmt"
	"io"
	"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()

	var t, n0, n1, n2 int
	f := func() (s string) {
		if n1 == 0 {
			if n0 > 0 {
				return strings.Repeat("0", n0+1)
			}
			return strings.Repeat("1", n2+1)
		}
		s = strings.Repeat("0", n0)
		if n1&1 == 1 {
			s += strings.Repeat("01", (n1+1)/2) + strings.Repeat("1", n2)
		} else {
			s += strings.Repeat("01", n1/2) + strings.Repeat("1", n2) + "0"
		}
		return
	}
	for Fscan(in, &t); t > 0; t-- {
		Fscan(in, &n0, &n1, &n2)
		Fprintln(out, f())
	}
}

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

package main

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

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

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

func solve() {
	var n0, n1, n2 int
	scanf("%d %d %d\n", &n0, &n1, &n2)

	ans := ""

	if n1 == 0 {
		if n2 > 0 {
			ans = "1"
			for n2 > 0 {
				ans = ans + "1"
				n2--
			}
		}
		if n0 > 0 {
			ans = "0"
			for n0 > 0 {
				ans = ans + "0"
				n0--
			}
		}
	} else {
		if n1 & 1 == 0 {
			ans = "10"
			for n0 > 0 {
				ans = ans + "0"
				n0--
			}
			ans = ans + "1"
			n1 -= 2
			for n1 > 0 {
				ans = ans + "01"
				n1 -= 2
			}
			for n2 > 0 {
				ans = ans + "1"
				n2--
			}
		} else {
			ans = "1"
			for n2 > 0 {
				ans = ans + "1"
				n2--
			}
			ans = ans + "0"
			n1--
			for n1 > 0 {
				ans = ans + "10"
				n1 -= 2
			}
			for n0 > 0 {
				ans = ans + "0"
				n0--
			}
		}
	}
	printf("%s\n", ans)
	writer.Flush()
}

func main() {
	t := 0
	scanf("%d\n", &t)
	for t > 0 {
		solve()
		t--
	}
}

package main

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

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

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

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

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
}

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

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

func main() {
	defer writer.Flush()
	t := reader.NextInt64()
	for ; t > 0; t-- {
		n0 := reader.NextInt64() // 00
		n1 := reader.NextInt64() // 01 or 10
		n2 := reader.NextInt64() // 11
		writer.Printf("%s\n", sol(n0, n1, n2))
	}
}

func sol(n0, n1, n2 int64) string {
	ret := ""
	for ; n1 > 0; n1-- {
		if ret == "" {
			ret += "10"
		} else {
			last := ret[len(ret)-1]
			if last == '0' {
				ret += "1"
			} else {
				ret += "0"
			}
		}
	}
	// 00
	if n0 > 0 {
		if len(ret) == 0 {
			ret = strings.Repeat("0", int(n0)+1)
		} else {
			for i := 0; i < len(ret); i++ {
				if ret[i] == '0' {
					ret = ret[:i] + strings.Repeat("0", int(n0)) + ret[i:]
					break
				}
			}
		}
	}
	// 11
	if n2 > 0 {
		if len(ret) == 0 {
			ret = strings.Repeat("1", int(n2)+1)
		} else {
			for i := 0; i < len(ret); i++ {
				if ret[i] == '1' {
					ret = ret[:i] + strings.Repeat("1", int(n2)) + ret[i:]
					break
				}
			}
		}
	}
	return ret
}

package main

import (
	"fmt"
	"strings"
)

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

	for t > 0 {
		var n0, n1, n2 int
		var output string
		fmt.Scan(&n0, &n1, &n2)

		if n1 == 0 {
			if n0 != 0 {
				output = strings.Repeat("0", n0+1)
			} else {
				output = strings.Repeat("1", n2+1)
			}
		}

		if n1&1 == 1 {
			output = strings.Repeat("0", n0) + strings.Repeat("01", (n1+1)/2) + strings.Repeat("1", n2)
		} else {
			output = strings.Repeat("0", n0) + strings.Repeat("01", n1/2) + strings.Repeat("1", n2) + "0"
		}

		fmt.Println(output)
		t--
	}
}

/*
URL:
https://codeforces.com/contest/1352/problem/F
*/

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
	a, b, c int
)

func main() {
	t = ReadInt()
	for i := 0; i < t; i++ {
		a, b, c = ReadInt3()
		solve(a, b, c)
	}
}

func solve(a, b, c int) {
	A := []rune{}

	if c > 0 {
		for i := 0; i < c+1; i++ {
			A = append(A, '1')
		}
	}

	if a > 0 {
		for i := 0; i < a+1; i++ {
			A = append(A, '0')
		}
	}

	if len(A) > 0 && A[len(A)-1] == '0' {
		for i := 0; i < b-1; i++ {
			if i%2 == 0 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	} else if len(A) > 0 && A[len(A)-1] == '1' {
		for i := 0; i < b-1; i++ {
			if i%2 == 1 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	} else {
		for i := 0; i < b; i++ {
			if i%2 == 0 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	}

	if len(A) > 0 {
		fmt.Println(string(A))
	} else {
		fmt.Println("10")
	}
}

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

/*********** 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/contest/1352/problem/F
*/

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
	a, b, c int
)

func main() {
	t = ReadInt()
	for i := 0; i < t; i++ {
		a, b, c = ReadInt3()
		solve(a, b, c)
	}
}

func solve(a, b, c int) {
	A := []rune{}

	if c > 0 {
		for i := 0; i < c+1; i++ {
			A = append(A, '1')
		}
	}

	if a > 0 {
		for i := 0; i < a+1; i++ {
			A = append(A, '0')
		}
	}

	if len(A) > 0 && A[len(A)-1] == '0' {
		for i := 0; i < b-1; i++ {
			if i%2 == 0 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	} else if len(A) > 0 && A[len(A)-1] == '1' {
		for i := 0; i < b-1; i++ {
			if i%2 == 1 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	} else {
		for i := 0; i < b+1; i++ {
			if i%2 == 0 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	}

	if len(A) > 0 {
		fmt.Println(string(A))
	} else {
		fmt.Println("10")
	}
}

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

/*********** 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/contest/1352/problem/F
*/

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
	a, b, c int
)

func main() {
	t = ReadInt()
	for i := 0; i < t; i++ {
		a, b, c = ReadInt3()
		solve(a, b, c)
	}
}

func solve(a, b, c int) {
	A := []rune{}

	if c > 0 {
		for i := 0; i < c+1; i++ {
			A = append(A, '1')
		}
	}

	if a > 0 {
		for i := 0; i < a+1; i++ {
			A = append(A, '0')
		}
	}

	if a > 0 {
		for i := 0; i < b-1; i++ {
			if i%2 == 0 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	} else {
		for i := 0; i < b-1; i++ {
			if i%2 == 1 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	}

	if len(A) > 0 {
		fmt.Println(string(A))
	} else {
		fmt.Println("10")
	}
}

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

/*********** 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/contest/1352/problem/F
*/

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
	a, b, c int
)

func main() {
	t = ReadInt()
	for i := 0; i < t; i++ {
		a, b, c = ReadInt3()
		solve(a, b, c)
	}
}

func solve(a, b, c int) {
	A := []rune{}

	if c > 0 {
		for i := 0; i < c+1; i++ {
			A = append(A, '1')
		}
	}

	if a > 0 {
		for i := 0; i < a+1; i++ {
			A = append(A, '0')
		}
	}

	if len(A) > 0 && A[len(A)-1] == '0' {
		for i := 0; i < b-1; i++ {
			if i%2 == 0 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	} else {
		for i := 0; i < b-1; i++ {
			if i%2 == 1 {
				A = append(A, '1')
			} else {
				A = append(A, '0')
			}
		}
	}

	if len(A) > 0 {
		fmt.Println(string(A))
	} else {
		fmt.Println("10")
	}
}

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

/*********** 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/contest/1352/problem/F
*/

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
	a, b, c int
)

func main() {
	t = ReadInt()
	for i := 0; i < t; i++ {
		a, b, c = ReadInt3()
		solve(a, b, c)
	}
}

func solve(a, b, c int) {
	A := []rune{}

	if c > 0 {
		for i := 0; i < c+1; i++ {
			A = append(A, '1')
		}
	}

	if a > 0 {
		for i := 0; i < a+1; i++ {
			A = append(A, '0')
		}
	}

	for i := 0; i < b-1; i++ {
		if i%2 == 0 {
			A = append(A, '1')
		} else {
			A = append(A, '0')
		}
	}

	if len(A) > 0 {
		fmt.Println(string(A))
	} else {
		fmt.Println("10")
	}
}

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

/*********** 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"

// Educational Codeforces Round 76
// B. Magic Stick
// https://codeforces.com/contest/1257/problem/B

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

package main

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

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

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

func init() {
	ReadString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	// r.Buffer(make([]byte, 1024), int(1e+11)) // for AtCoder
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	// Split sets the split function for the Scanner. The default split function is ScanLines.
	// Split panics if it is called after scanning has started.
	r.Split(bufio.ScanWords)

	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
}

/*********** DP sub-functions ***********/

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

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

// NthBit returns nth bit value of an argument.
// n starts from 0.
func NthBit(num, nth int) int {
	return num >> uint(nth) & 1
}

// OnBit returns the integer that has nth ON bit.
// If an argument has nth ON bit, OnBit returns the argument.
func OnBit(num, nth int) int {
	return num | (1 << uint(nth))
}

// OffBit returns the integer that has nth OFF bit.
// If an argument has nth OFF bit, OffBit returns the argument.
func OffBit(num, nth int) int {
	return num & ^(1 << uint(nth))
}

// PopCount returns the number of ON bit of an argument.
func PopCount(num int) int {
	res := 0

	for i := 0; i < 70; i++ {
		if ((num >> uint(i)) & 1) == 1 {
			res++
		}
	}

	return res
}

/*********** Arithmetic ***********/

// Max returns the max integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Max(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m < integer {
			m = integer
		}
	}
	return m
}

// Min returns the min integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Min(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m > integer {
			m = integer
		}
	}
	return m
}

// Sum returns multiple integers sum.
func Sum(integers ...int) int {
	s := 0

	for _, i := range integers {
		s += i
	}

	return s
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int) int {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

// AbsInt is integer version of math.Abs
func AbsInt(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

// Gcd returns the Greatest Common Divisor of two natural numbers.
// Gcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Gcd uses the Euclidean Algorithm.
func Gcd(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}
	if a < b {
		a, b = b, a
	}

	// Euclidean Algorithm
	for b > 0 {
		div := a % b
		a, b = b, div
	}

	return a
}

// Lcm returns the Least Common Multiple of two natural numbers.
// Lcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Lcd uses the Euclidean Algorithm indirectly.
func Lcm(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}

	// a = a'*gcd, b = b'*gcd, a*b = a'*b'*gcd^2
	// a' and b' are relatively prime numbers
	// gcd consists of prime numbers, that are included in a and b
	gcd := Gcd(a, b)

	// not (a * b / gcd), because of reducing a probability of overflow
	return (a / gcd) * b
}

// 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])
		// 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)
}

/********** 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 MOD = 1000000000 + 7
const ALPHABET_NUM = 26
const INF_INT64 = math.MaxInt64
const INF_BIT60 = 1 << 60

var t int
var x, y int64

func main() {
	t = ReadInt()

	for tc := 0; tc < t; tc++ {
		x, y = ReadInt64_2()
		solve()
	}
}

func solve() {
	if x >= y {
		fmt.Println("YES")
		return
	}

	if x == 1 {
		if x >= y {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		return
	}

	if x == 2 || x == 3 {
		if y <= 3 {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		return
	}

	fmt.Println("YES")

	// if x%2 == 1 {
	// 	// xが奇数
	// 	xx := (x - 1) / 2 * 3
	// 	if xx > x {
	// 		fmt.Println("YES")
	// 	} else {
	// 		fmt.Println("NO")
	// 	}
	// } else {
	// 	// xが偶数
	// 	xx := x / 2 * 3
	// 	if xx > x {
	// 		fmt.Println("YES")
	// 	} else {
	// 		fmt.Println("NO")
	// 	}
	// }
}

// func solve() {
// 	if x >= y {
// 		fmt.Println("YES")
// 		return
// 	}

// 	p := int64(1)
// 	c := int64(0)
// 	for p <= x {
// 		if p*2 > x {
// 			break
// 		} else {
// 			p *= 2
// 			c++
// 		}
// 	}
// 	// fmt.Printf("p: %d, c: %d\n", p, c)

// 	tmp := x / p
// 	xx := p * tmp
// 	// fmt.Printf("xx: %d\n", xx)
// 	for i := int64(0); i < c; i++ {
// 		xx /= 2
// 		xx *= 3
// 		if xx >= y {
// 			fmt.Println("YES")
// 			return
// 		}
// 	}

// 	if xx >= y {
// 		fmt.Println("YES")
// 	} else {
// 		fmt.Println("NO")
// 	}
// }

// func solve() {
// 	if x >= y {
// 		fmt.Println("YES")
// 		return
// 	}

// 	twoCount := 0
// 	for x%2 == 0 {
// 		twoCount++
// 		x /= 2
// 	}

// 	for i := 0; i < twoCount; i++ {
// 		x *= 3
// 		if x >= y {
// 			fmt.Println("YES")
// 			return
// 		}
// 	}

// 	if x >= y {
// 		fmt.Println("YES")
// 	} else {
// 		fmt.Println("NO")
// 	}
// }

// MODはとったか？
// 遷移だけじゃなくて最後の最後でちゃんと取れよ？

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

package main

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

var in = bufio.NewReader(os.Stdin)

func solve() {
	var x, y int
	_, _ = fmt.Fscanf(in, "%d %d\n", &x, &y)
	if x == 1 && y != 1 {
		_, _ = fmt.Println("NO")
		return
	}
	if x == 2 && y > 3 {
		_, _ = fmt.Println("NO")
		return
	}
	if x == 3 && y > 3 {
		_, _ = fmt.Println("NO")
		return
	}
	_, _ = fmt.Println("YES")
}

func main() {
	var t int
	_, _ = fmt.Fscanf(in, "%d\n", &t)
	for i := 0; i < t; i++ {
		solve()
	}
}

package main

import "fmt"

func main() {
	var caseNum int
	fmt.Scanf("%d\n", &caseNum)
	for i := 0; i < caseNum; i++ {
		var x, y int
		fmt.Scanf("%d %d\n", &x, &y)
		if x == 1 {
			if y == 1 {
				fmt.Println("YES")
			} else {
				fmt.Println("NO")
			}
		} else if x <= 3 {
			if y <= 3 {
				fmt.Println("YES")
			} else {
				fmt.Println("NO")
			}
		} else {
			fmt.Println("YES")
		}
	}
}

package main

import "fmt"

func min(a, b int) int {
    if a < b {
        return a
    } else {
        return b
    }
}
func main() {
    var T int
    fmt.Scanf("%d\n", &T)
    for T > 0 {
        T--
        var x, y int
        fmt.Scanf("%d %d\n", &x, &y)
        if x == 1 && y == 1 {
            fmt.Print("YES\n")
        } else if x == 2 && y <= 3 {
            fmt.Print("YES\n")
        } else if x == 3 && y <= 3 {
            fmt.Print("YES\n")
        } else if x >= 4 {
            fmt.Print("YES\n")
        } else {
            fmt.Print("NO\n")
        }
    }
}

package main

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

func main() {
	var res string
	reader := bufio.NewReader(os.Stdin)
	cases := readOneInt64(reader)
	for i := int64(0); i < cases; i++ {
		tmp := readInt64Slice(reader, 2)
		x, y := tmp[0], tmp[1]
		switch {
		case x == y, x > 3, x < 4 && y < 4 && x != 1:
			res = "YES"
		default:
			res = "NO"
		}
		fmt.Println(res)
	}
}

func readOneInt64(r *bufio.Reader) (n int64) {
	bytes, _ := r.ReadBytes('\n')
	n, _ = strconv.ParseInt(string(bytes[:len(bytes)-2]), 10, 64)
	return
}

func readInt64Slice(r *bufio.Reader, n int) (slice []int64) {
	var bytes []byte
	slice = make([]int64, n)
	n--
	for i := 0; i < n; i++ {
		bytes, _ = r.ReadBytes(' ')
		slice[i], _ = strconv.ParseInt(string(bytes[:len(bytes)-1]), 10, 64)
	}
	slice[n] = readOneInt64(r)
	return
}

//func readOneString(r *bufio.Reader) []byte {
//	bytes, _ := r.ReadBytes('\n')
//	return bytes[:len(bytes)-2]
//}

package main

import "fmt"

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

func solve() string {
	var x, y uint64
	fmt.Scanf("%d %d\n", &x, &y)
	if x == y {
		return "YES"
	}
	if x == 1 && y != 0 {
		return "NO"
	}
	if x == 2 && y > 3 {
		return "NO"
	}
	if x == 3 && y > 3 {
		return "NO"
	}
	return "YES"
}

package main

import (
	"bufio"
	"os"
	"runtime"
	"strconv"
)

/* solution */

func solve() {
	t := readInt()
	for i := 0; i < t; i++ {
		print(solveOne(readInt(), readInt()))
	}
}

func solveOne(x, y int) string {
	if x == 1 {
		if y == 1 {
			return "YES"
		} else {
			return "NO"
		}
	} else if x < 4 {
		if y >= 1 && y <= 3 {
			return "YES"
		} else {
			return "NO"
		}
	} else {
		return "YES"
	}
}

/* stubs */

func main() {

	var f *os.File
	if runtime.GOROOT() == "C:\\Soft\\Go" {
		f, _ = os.Open("input.txt")
		defer f.Close()
	} else {
		f = os.Stdin
	}

	writer = bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	reader = bufio.NewScanner(f)

	const maxCapacity = 1024 * 1024
	buf := make([]byte, maxCapacity)
	reader.Buffer(buf, maxCapacity)

	reader.Split(bufio.ScanWords)

	solve()

}

var reader *bufio.Scanner
var writer *bufio.Writer

func read() string {
	reader.Scan()
	return reader.Text()
}

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

func print(s string) {
	writer.WriteString(s)
	writer.WriteString("\n")
}

func printInt(i int) {
	print(strconv.Itoa(i))
}

func printInt64(i int64) {
	print(strconv.FormatInt(i, 10))
}

func readInt64() int64 {
	reader.Scan()
	ret, _ := strconv.ParseInt(reader.Text(), 10, 64)
	return ret
}

package main

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

var reader = bufio.NewReader(os.Stdin)

func main() {
	text, _ := reader.ReadString('\n')
	t, _ := strconv.ParseInt(strings.TrimSpace(text), 10, 64)
	for i := int64(0); i < t; i++ {
		text, _ = reader.ReadString('\n')
		parts := strings.Split(text, " ")
		x, _ := strconv.ParseInt(strings.TrimSpace(parts[0]), 10, 64)
		y, _ := strconv.ParseInt(strings.TrimSpace(parts[1]), 10, 64)
		solve(x, y)
	}
}

func solve(x, y int64) {
	if y <= x ||
		(x == 1 && y == 1) ||
		(x == 2 && y == 3) {
		fmt.Println("YES")
	} else if x <= 3 {
		fmt.Println("NO")
	} else {
		fmt.Println("YES")
	}
}

package main

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

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

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

func init() {
	ReadString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	// r.Buffer(make([]byte, 1024), int(1e+11)) // for AtCoder
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	// Split sets the split function for the Scanner. The default split function is ScanLines.
	// Split panics if it is called after scanning has started.
	r.Split(bufio.ScanWords)

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

func main() {
	t := ReadInt()

	for t > 0 {
		a, b := ReadInt2()
		if a == 1 && b != 1 {
			fmt.Println("NO")
		} else if a == 2 && b > 3 {
			fmt.Println("NO")
		} else if a == 3 && b > 3 {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}
		t--
	}
}

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

	return x
}

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

	return b
}

package main

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

var reader = bufio.NewReader(os.Stdin)

func readInt() int {
	var ch byte
	var err error
	for {
		ch, err = reader.ReadByte()
		if err != nil {
			return 0
		}
		if unicode.IsDigit(rune(ch)) {
			break
		}
	}
	result := int(ch & 0xf)
	for {
		ch, err = reader.ReadByte()
		if err != nil || !unicode.IsDigit(rune(ch)) {
			return result
		}
		result = result*10 + int(ch&0xf)
	}
}

func main() {
	t := readInt()

	for t > 0 {
		a, b := readInt(), readInt()
		if a == 1 && b != 1 {
			fmt.Println("NO")
		} else if a == 2 && b > 3 {
			fmt.Println("NO")
		} else if a == 3 && b > 3 {
			fmt.Println("NO")
		} else {
			fmt.Println("YES")
		}
		t--
	}
}

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

	return x
}

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

	return b
}

package main

import "fmt"

func main() {
	var t int
	fmt.Scanf("%d", &t)
	for i := 0; i < t; i++ {
		ans := solve()
		fmt.Println(ans)
	}
}

func solve() string {
	var x, y uint64
	fmt.Scanf("%d %d", &x, &y)
	if x == y {
		return "YES"
	}
	if x == 1 && y != 0 {
		return "NO"
	}
	if x == 2 && y != 3 {
		return "NO"
	}
	if x == 3 && y != 2 {
		return "NO"
	}
	return "YES"
}

package main

import "fmt"

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

func solve() string {
	var x, y uint64
	fmt.Scanf("%d %d\n", &x, &y)
	if x == y {
		return "YES"
	}
	if x == 1 && y != 0 {
		return "NO"
	}
	if x == 2 && y != 3 {
		return "NO"
	}
	if x == 3 && y != 2 {
		return "NO"
	}
	return "YES"
}

package main

import "fmt"

func main() {
	var t int
	fmt.Scanf("%d", &t)
	for i := 0; i < t; i++ {
		ans := solve()
		fmt.Println(ans)
	}
}

func solve() string {
	var x, y uint64
	fmt.Scanf("%d %d", &x, &y)
	for i := 0; i < 200; i++ {
		if x == y {
			return "YES"
		}
		switch x % 2 {
		case 0:
			x = x / 2 * 3
		case 1:
			x = x - 1
		}
	}
	return "NO"
}

package main

import "fmt"

func pow(b, n int) (r int) {
	r = 1
	for i := 0; i < n; i++ {
		r *= b
	}
	return r
}

func main() {
	var n int
	fmt.Scan(&n)
	ans := make([]string, 0)
	for i := 0; i < n; i++ {
		var x, y int
		var t string
		fmt.Scan(&x, &y)
		if x == y {
			t = "YES"
		} else if x > 1 {
			if y < x {
				t = "YES" // yから1ずつ減らせば良い
			} else { // y > x
				// xを増やしてyにしないといけない
				// 偶数なら1.5倍できる
				// 奇数でも1減らすと偶数にできるので1.5倍できる
				// ただし再現なく1.5倍できるわけではなく、1回1.5倍するごとに2を使ってしまう。
				// xを超えない最大の2の冪乗を求める
				p, q := 1, 0
				for {
					if pow(2, p) > x {
						break
					}
					p++
					q++
				}
				// fmt.Println("i", i, "q", q)
				ok := false
				tx := x
				for j := 0; j < q; j++ {
					x = x * 3 / 2
					if x >= y {
						ok = true
					}
				}
				if ok {
					t = "YES"
				} else {
					t = "NO"
					for {
						if tx%2 == 0 {
							tx = tx * 3 / 2
						} else {
							break
						}
					}
					if tx >= y {
						t = "YES"
					}
				}
			}
		} else { // x == 1 && y != 1
			t = "NO"
		}
		// fmt.Println("x", x, "y", y, "t", t)
		ans = append(ans, t)
	}
	for i := range ans {
		fmt.Println(ans[i])
	}
}

package main

import "fmt"

func pow(b, n int) (r int) {
	r = 1
	for i := 0; i < n; i++ {
		r *= b
	}
	return r
}

func main() {
	var n int
	fmt.Scan(&n)
	ans := make([]string, 0)
	for i := 0; i < n; i++ {
		var x, y int
		var t string
		fmt.Scan(&x, &y)
		if x == y {
			t = "YES"
		} else if x > 1 {
			if y < x {
				t = "YES"
			} else { // y > x
				p, q := 1, 0
				for {
					if pow(2, p) > x {
						break
					}
					p++
					q++
				}
				ok := false
				for j := 0; j < q; j++ {
					x = x * 3 / 2
					if x >= y {
						ok = true
					}
				}
				if ok {
					t = "YES"
				} else {
					t = "NO"
				}
			}
		} else { // x == 1 && y != 1
			t = "NO"
		}
		ans = append(ans, t)
	}
	for i := range ans {
		fmt.Println(ans[i])
	}
}

package main

import "fmt"

func pow(b, n int) (r int) {
	r = 1
	for i := 0; i < n; i++ {
		r *= b
	}
	return r
}

func main() {
	var n int
	fmt.Scan(&n)
	ans := make([]string, 0)
	for i := 0; i < n; i++ {
		var x, y int
		var t string
		fmt.Scan(&x, &y)
		if x == y {
			t = "YES"
		} else if x > 1 {
			if y < x {
				t = "YES" // yから1ずつ減らせば良い
			} else { // y > x
				// xを増やしてyにしないといけない
				// 偶数なら1.5倍できる
				// 奇数でも1減らすと偶数にできるので1.5倍できる
				// ただし再現なく1.5倍できるわけではなく、1回1.5倍するごとに2を使ってしまう。
				// xを超えない最大の2の冪乗を求める
				p, q := 1, 0
				for {
					if pow(2, p) > x {
						break
					}
					p++
					q++
				}
				// fmt.Println("i", i, "q", q, "x", x, "y", y)
				ok := false
				tx := x
				for j := 0; j < q; j++ {
					x = (x / 2) * 3
					if x >= y {
						ok = true
					}
				}
				// fmt.Println("i", i, "q", q, "x", x, "y", y, "ok", ok)
				if ok {
					t = "YES"
				} else {
					t = "NO"
					for {
						if tx%2 == 0 {
							tx = (tx / 2) * 3
						} else {
							break
						}
					}
					if tx >= y {
						t = "YES"
					}
				}
			}
		} else { // x == 1 && y != 1
			t = "NO"
		}
		// fmt.Println("x", x, "y", y, "t", t)
		ans = append(ans, t)
	}
	for i := range ans {
		fmt.Println(ans[i])
	}
}

package main

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

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

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

func init() {
	ReadString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	// r.Buffer(make([]byte, 1024), int(1e+11)) // for AtCoder
	r.Buffer(make([]byte, 1024), int(1e+9)) // for Codeforces
	// Split sets the split function for the Scanner. The default split function is ScanLines.
	// Split panics if it is called after scanning has started.
	r.Split(bufio.ScanWords)

	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
}

/*********** DP sub-functions ***********/

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

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

// NthBit returns nth bit value of an argument.
// n starts from 0.
func NthBit(num, nth int) int {
	return num >> uint(nth) & 1
}

// OnBit returns the integer that has nth ON bit.
// If an argument has nth ON bit, OnBit returns the argument.
func OnBit(num, nth int) int {
	return num | (1 << uint(nth))
}

// OffBit returns the integer that has nth OFF bit.
// If an argument has nth OFF bit, OffBit returns the argument.
func OffBit(num, nth int) int {
	return num & ^(1 << uint(nth))
}

// PopCount returns the number of ON bit of an argument.
func PopCount(num int) int {
	res := 0

	for i := 0; i < 70; i++ {
		if ((num >> uint(i)) & 1) == 1 {
			res++
		}
	}

	return res
}

/*********** Arithmetic ***********/

// Max returns the max integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Max(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m < integer {
			m = integer
		}
	}
	return m
}

// Min returns the min integer among input set.
// This function needs at least 1 argument (no argument causes panic).
func Min(integers ...int) int {
	m := integers[0]
	for i, integer := range integers {
		if i == 0 {
			continue
		}
		if m > integer {
			m = integer
		}
	}
	return m
}

// Sum returns multiple integers sum.
func Sum(integers ...int) int {
	s := 0

	for _, i := range integers {
		s += i
	}

	return s
}

// PowInt is integer version of math.Pow
// PowInt calculate a power by Binary Power (二分累乗法(O(log e))).
func PowInt(a, e int) int {
	if a < 0 || e < 0 {
		panic(errors.New("[argument error]: PowInt does not accept negative integers"))
	}

	if e == 0 {
		return 1
	}

	if e%2 == 0 {
		halfE := e / 2
		half := PowInt(a, halfE)
		return half * half
	}

	return a * PowInt(a, e-1)
}

// AbsInt is integer version of math.Abs
func AbsInt(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

// Gcd returns the Greatest Common Divisor of two natural numbers.
// Gcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Gcd uses the Euclidean Algorithm.
func Gcd(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}
	if a < b {
		a, b = b, a
	}

	// Euclidean Algorithm
	for b > 0 {
		div := a % b
		a, b = b, div
	}

	return a
}

// Lcm returns the Least Common Multiple of two natural numbers.
// Lcd only accepts two natural numbers (a, b >= 1).
// 0 or negative number causes panic.
// Lcd uses the Euclidean Algorithm indirectly.
func Lcm(a, b int) int {
	if a <= 0 || b <= 0 {
		panic(errors.New("[argument error]: Gcd only accepts two NATURAL numbers"))
	}

	// a = a'*gcd, b = b'*gcd, a*b = a'*b'*gcd^2
	// a' and b' are relatively prime numbers
	// gcd consists of prime numbers, that are included in a and b
	gcd := Gcd(a, b)

	// not (a * b / gcd), because of reducing a probability of overflow
	return (a / gcd) * b
}

// 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])
		// 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)
}

/********** 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 MOD = 1000000000 + 7
const ALPHABET_NUM = 26
const INF_INT64 = math.MaxInt64
const INF_BIT60 = 1 << 60

var t int
var x, y int64

func main() {
	t = ReadInt()

	for tc := 0; tc < t; tc++ {
		x, y = ReadInt64_2()
		solve()
	}
}

func solve() {
	if x >= y {
		fmt.Println("YES")
		return
	}

	if x == 1 {
		if x >= y {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		return
	}

	if x%2 == 1 {
		// xが奇数
		xx := (x - 1) / 2 * 3
		if xx > x {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	} else {
		// xが偶数
		xx := x / 2 * 3
		if xx > x {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

// func solve() {
// 	if x >= y {
// 		fmt.Println("YES")
// 		return
// 	}

// 	p := int64(1)
// 	c := int64(0)
// 	for p <= x {
// 		if p*2 > x {
// 			break
// 		} else {
// 			p *= 2
// 			c++
// 		}
// 	}
// 	// fmt.Printf("p: %d, c: %d\n", p, c)

// 	tmp := x / p
// 	xx := p * tmp
// 	// fmt.Printf("xx: %d\n", xx)
// 	for i := int64(0); i < c; i++ {
// 		xx /= 2
// 		xx *= 3
// 		if xx >= y {
// 			fmt.Println("YES")
// 			return
// 		}
// 	}

// 	if xx >= y {
// 		fmt.Println("YES")
// 	} else {
// 		fmt.Println("NO")
// 	}
// }

// func solve() {
// 	if x >= y {
// 		fmt.Println("YES")
// 		return
// 	}

// 	twoCount := 0
// 	for x%2 == 0 {
// 		twoCount++
// 		x /= 2
// 	}

// 	for i := 0; i < twoCount; i++ {
// 		x *= 3
// 		if x >= y {
// 			fmt.Println("YES")
// 			return
// 		}
// 	}

// 	if x >= y {
// 		fmt.Println("YES")
// 	} else {
// 		fmt.Println("NO")
// 	}
// }

// MODはとったか？
// 遷移だけじゃなくて最後の最後でちゃんと取れよ？

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

package main

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

var in = bufio.NewReader(os.Stdin)

func solve() {
	var x, y int
	_, _ = fmt.Fscanf(in, "%d%d", &x, &y)
	if x == 1 && y != 1 {
		_, _ = fmt.Println("NO")
		return
	}
	if x == 2 && y > 3 {
		_, _ = fmt.Println("NO")
		return
	}
	_, _ = fmt.Println("YES")
}

func main() {
	var t int
	_, _ = fmt.Fscanf(in, "%d", &t)
	for i := 0; i < t; i++ {
		solve()
	}
}

package main

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

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

func solve() {
	var x, y int
	_, _ = fmt.Fscanf(in, "%d%d", &x, &y)
	if x == 1 && y != 1 {
		_, _ = fmt.Fprintln(out, "NO")
		return
	}
	if x == 2 && y > 3 {
		_, _ = fmt.Fprintln(out, "NO")
		return
	}
	_, _ = fmt.Fprintln(out, "YES")
}

func main() {
	var t int
	_, _ = fmt.Fscanf(in, "%d", &t)
	for i := 0; i < t; i++ {
		solve()
	}
}


package main

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

/*

 */

//goland:noinspection GoUnhandledErrorResult
func main() {
	//defer writer.Flush()
	//
	//var t = 1
	//scanf("%d\n", &t)
	//
	//for ; t > 0; t-- {
	//	var n, k int
	//	scanf("%d %d\n", &n, &k)
	//
	//}

	for true {
		_, err := fmt.Fscanf(reader, "Is it rated?\n")
		if err != nil {
			break
		}

		fmt.Println("NO")
	}
}

const maxUint = ^uint(0)

//goland:noinspection GoUnusedConst
const minUint = 0
const maxInt = int(maxUint >> 1)

//goland:noinspection GoUnusedConst
const minInt = -maxInt - 1

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

func scanf(f string, a ...interface{}) {
	if _, err := fmt.Fscanf(reader, f, a...); err != nil {
		panic(err)
	}
}

//goland:noinspection GoUnusedFunction
func min(x, y int) int {
	if x < y {
		return x
	}
	return y
}

//goland:noinspection GoUnusedFunction
func max(nums ...int) int {
	maximum := nums[0]
	for _, num := range nums {
		if num > maximum {
			maximum = num
		}
	}
	return maximum
}

//goland:noinspection GoUnusedFunction
func abs(x int) int {
	if x < 0 {
		return -x
	}
	return x
}

//goland:noinspection GoUnusedFunction
func isPrime(n int) bool {
	if n == 2 || n == 3 {
		return true
	}

	if n <= 1 || n%2 == 0 || n%3 == 0 {
		return false
	}

	for i := 5; i*i <= n; i += 6 {
		if n%i == 0 || n%(i+2) == 0 {
			return false
		}
	}

	return true
}

//goland:noinspection GoUnusedFunction
func gcd(a, b int) int {
	for b != 0 {
		a, b = b, a%b
	}
	return a
}

//goland:noinspection GoUnusedFunction
func lcm(a, b int) int {
	return abs(a) / gcd(a, b) * abs(b)
}

// Examples:
//	digitAt(1234, -1) -> panic!
//	digitAt(1234, 0) -> 4
//	digitAt(1234, 1) -> 3
//	digitAt(1234, 2) -> 2
//	digitAt(1234, 3) -> 1
//	digitAt(1234, 4) -> panic!
//goland:noinspection GoUnusedFunction
func digitAt(num, pos int) int {
	if num == 0 {
		return 0
	}

	num = abs(num)

	lenNum := int(math.Log10(float64(num))) + 1
	if pos < 0 || pos >= lenNum {
		err := fmt.Sprintf("Out of bound access for digit. Position passed %d, number %d", pos, num)
		panic(err)
	}

	rem := num % int(math.Pow10(pos+1))
	return rem / int(math.Pow10(pos))
}

package main

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

var reader *bufio.Reader = bufio.NewReaderSize(os.Stdin, 1024*1024)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)

func scanf(f string, args ...interface{})  { fmt.Fscanf(reader, f, args...) }
func printf(f string, args ...interface{}) { fmt.Fprintf(writer, f, args...) }

type Pair struct {
	x, y int
}

type Pairs []Pair

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

func main() {
	var s string
	for {
		_, err := fmt.Scan(&s)
		writer.Flush()
		if err == io.EOF {
			break
		}
		printf("%s\n", "NO")
		writer.Flush()
	}
}

package main

import (
	"fmt"
	"os"
)

func main() {

	buf := make([]byte, 1024)
	line := make([]byte, 0)
	for {
		n, err := os.Stdin.Read(buf)

		if err != nil {
			break
		}

		if n == 0 {
			break
		}

		for _, c := range buf {
			if c == '\n' {
				fmt.Println("NO")
				line = line[:0]
				continue
			}
			line = append(line, c)
		}
	}
}

package main

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

func main() {
	for s := bufio.NewScanner(os.Stdin); s.Scan(); {
		fmt.Println("NO")
	}
}

package main

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

func main() {

	for s := bufio.NewScanner(os.Stdin); s.Scan(); {
		q := s.Text()

		switch q {
		case "Is it rated?":
			fmt.Println("NO")
		default:
			panic(q)
		}

	}
}

package main
import ."fmt"

// github.com/EndlessCheng/codeforces-go
func main() {
	s := new(string)
	for {
		if n, _ := Scanln(s, s, s); n == 0 {
			break
		}
		Println("NO")
	}
}

package main

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

func main(){
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan(){
		_ = scanner.Text()
		fmt.Println("NO")
	}
}

package main

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

func CFa(_r io.Reader, _w io.Writer) {
	in := bufio.NewScanner(_r)
	out := bufio.NewWriter(_w)

	// single test case

	for in.Scan() {
		_ = in.Text()
		Fprintln(out, "NO")
		out.Flush()
	}

	// 입력 에러 방지
}

// LETYLETYLETY
func main() { CFa(os.Stdin, os.Stdout) }

// YTELYTELYTEL

package main

import (
	"bufio"
	"os"
)

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

	for q, err := reader.ReadString('\n'); err != nil; q, err = reader.ReadString('\n') {
		switch q {
		case "":
		case "Is it rated?":
			writer.WriteString("NO")
			writer.Flush()
		default:
			panic(q)
		}

	}
}

package main

import (
	"bufio"
	"os"
)

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

	for q, err := reader.ReadString('\n'); err != nil; q, err = reader.ReadString('\n') {
		switch q {
		case "Is it rated?":
			writer.WriteString("NO")
		default:
			panic(q)
		}

		writer.Flush()
	}
}

package main

import (
	"bufio"
	"os"
)

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

	for q, err := reader.ReadString('\n'); err != nil; q, err = reader.ReadString('\n') {
		writer.WriteString(q)
		writer.Flush()
	}
}

package main

import (
	"bufio"
	"os"
)

func main() {
	//os.Stdin, _ = os.Open("in.txt")

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

	for {
		q, err := reader.ReadString('\n')

		if err != nil {
			writer.WriteString(err.Error())
			writer.Flush()
			return
		}

		writer.WriteString(q)
		writer.Flush()
	}
}

package main

import(
  "fmt"
)

func main(){
	var n int
	fmt.Scan(&n)
	cnt:=0
	for n!=0 {
		cnt+=n%10
		n/=10
	}
	fmt.Println(cnt)
}


package main

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

func rotateStr(str string, k int) string {
	totalRotationsReq := k
	if k >= len(str) {
		totalRotationsReq = k % len(str)
	}

	resp := make([]byte, len(str))
	for idx := range str {
		respIdx := idx + totalRotationsReq
		if respIdx >= len(str) {
			respIdx -= len(str)
		}
		resp[respIdx] = str[idx]
	}
	return string(resp)
}

func main() {

	scanner := bufio.NewScanner(os.Stdin)
	//for scanner.Scan() {
	//	line := scanner.Text()
	//	fmt.Printf("::%v::\n", line)
	//}
	//if err := scanner.Err(); err != nil {
	//	panic(err)
	//}
	//
	//os.Exit(0)

	var s string
	if !scanner.Scan() || scanner.Err() != nil {
		panic(scanner.Err())
	}
	s = scanner.Text()

	var mStr string
	if !scanner.Scan() || scanner.Err() != nil {
		panic(scanner.Err())
	}
	mStr = scanner.Text()
	m, err := strconv.Atoi(mStr)
	if err != nil {
		panic(err)
	}

	resp := s

	for i := 0; i < m; i++ {
		var lrkStr string
		if !scanner.Scan() || scanner.Err() != nil {
			panic(scanner.Err())
		}
		lrkStr = scanner.Text()
		lrkArr := strings.Split(lrkStr, " ")
		l, err := strconv.Atoi(lrkArr[0])
		if err != nil {
			panic(err)
		}
		r, err := strconv.Atoi(lrkArr[1])
		if err != nil {
			panic(err)
		}
		k, err := strconv.Atoi(lrkArr[2])
		if err != nil {
			panic(err)
		}
		//fmt.Printf("l: %v, r: %v, k: %v, resp: %v\n",
		//	l, r, k, resp)
		rotated := rotateStr(resp[l-1:r], k)
		//fmt.Printf("l: %v, r: %v, k: %v, resp: %v, resp[0:l-1]: %v, rotated: %v, resp[r:]: %v\n",
		//	l, r, k, resp, resp[0:l-1], rotated, resp[r:])
		resp = resp[0:l-1] + rotated + resp[r:]
	}

	fmt.Println(resp)

}

package main

import (
	"bytes"
	"fmt"
)

func main() {
	var s string
	fmt.Scanln(&s)
	buf := bytes.NewBufferString(s)
	var n int
	fmt.Scanf("%d\n", &n)
	for i := 0; i < n; i++ {
		var l, r, k int
		fmt.Scanf("%d %d %d\n", &l, &r, &k)
		k = k % (r - l + 1)
		k = (r - l + 1) - k
		rotate(buf.Bytes(), l-1, r, k)
	}
	fmt.Println(buf.String())
}

func rotate(s []byte, l, r, k int) {
	if k == 0 || r-l == 0 {
		return
	}
	rev(s[l : l+k])
	rev(s[l+k : r])
	rev(s[l:r])
}

func rev(in []byte) {
	l := len(in)
	for i := 0; i < l/2; i++ {
		in[i], in[l-1-i] = in[l-1-i], in[i]
	}
	return
}

package main

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

func readOneLineInts(inputreader *bufio.Reader, n int) (res chan int64) {
	res = make(chan int64)
	go func() {
		input, _ :=	inputreader.ReadString('\n')
		ints := strings.Split(strings.TrimSpace(input), " ")
		for i := range ints{
			x, _ := strconv.ParseInt(ints[i],10,64)
			res <- x
		}
		close(res)
	}()

	return
}

func gcd(a, b int64) int64 {
	if b==0 {
		return a;
	} else {
		return gcd(b, a%b);
	}
}

func rotate(nums []byte, k int64) {
    if k < 0 || len(nums) == 0 {
        return
	}

	ln := int64(len(nums))

	k = k%ln
	k = ln - k

	var d,i,j int64;
	var temp byte
	d = -1
	for i = int64(0); i<gcd(ln,k); i++ {
		j=i;
		temp = nums[i];
		for {
			d=(j+k)%ln;
			if(d==i) {
				break;
			}
			nums[j] = nums[d];
			j=d;
		}
		nums[j]=temp;
	}
}
func main(){
	rs := bufio.NewReader(os.Stdin)
	ws := bufio.NewWriter(os.Stdout)

	input, _ := rs.ReadString('\n')
	mission := []byte(strings.TrimSpace(input))

	input, _ = rs.ReadString('\n')
	m, _ := strconv.ParseInt(strings.TrimSpace(input), 10, 64)

	for i := int64(0); i < m; i++ {
		ch := readOneLineInts(rs, 3);
		l := <-ch; r := <-ch; k := <-ch;
		l--; r--;
		rotate(mission[l:r+1], k)
	}

	ws.WriteString(string(mission))

	ws.Flush()
}

package main

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

var scanner = bufio.NewScanner(os.Stdin)

func init() {
	scanner.Split(bufio.ScanWords)
}

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

func scanBytes() []byte {
	scanner.Scan()
	return scanner.Bytes()
}

func scanInt64() int64 {
	scanner.Scan()
	v, _ := strconv.ParseInt(scanner.Text(), 10, 64)
	return v
}

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

func scanInts(n int) []int {
	l := make([]int, n)
	for i := 0; i < n; i++ {
		scanner.Scan()
		l[i], _ = strconv.Atoi(scanner.Text())
	}

	return l
}

func scanInts64(n int64) []int64 {
	l := make([]int64, n)
	for i := int64(0); i < n; i++ {
		scanner.Scan()
		l[i], _ = strconv.ParseInt(scanner.Text(), 10, 64)
	}

	return l
}

func scanBool() bool {
	scanner.Scan()
	v, _ := strconv.ParseInt(scanner.Text(), 10, 64)
	return v == 1
}

func scanBools(n int64) []bool {
	l := make([]bool, n)
	for i := int64(0); i < n; i++ {
		scanner.Scan()
		v, _ := strconv.ParseInt(scanner.Text(), 10, 64)
		l[i] = v == 1
	}

	return l
}

func main() {
	s, m := scanString(), scanInt()

	for i := 0; i < m; i++ {
		l, r, k := scanInt(), scanInt(), scanInt()

		sz := r - l + 1
		k %= sz

		// fmt.Println("sz=", sz, ", k=", k)

		s = s[:l-1] + s[r-k:r] + s[l-1:r-k] + s[r:]
	}

	fmt.Println(s)
}

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

	return -a
}

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

	return b
}

package main

import "fmt"

func main() {
    var s string
    fmt.Scanln(&s)

    var m int
    fmt.Scanln(&m)

    for i := 0; i < m; i++ {
        var l, r, k int
        fmt.Scanln(&l, &r, &k)
        //fmt.Println(l, r, k)
        shift(&s, l, r, k)
    }

    fmt.Println(s)

    /*var t = "abacaba"
    shift(&t, 3, 6, 1)
    fmt.Println(t)*/
}

func shift(s *string, l, r, k int) {
    i := k % (r - l + 1)
    b := []byte(*s)
    *s = string(b[:l-1]) + string(b[r-i:r]) + string(b[l-1:r-i]) + string(b[r:])
}

package main

import (
	"bytes"
	"fmt"
)

func main() {
	var s string
	fmt.Scanln(&s)
	buf := bytes.NewBufferString(s)
	var n int
	fmt.Scanf("%d\n", &n)
	for i := 0; i < n; i++ {
		var l, r, k int
		fmt.Scanf("%d %d %d\n", &l, &r, &k)
		k = k % (r - l + 1)
		k = (r - l + 1) - k
		rotate(buf.Bytes(), l-1, r, k)
	}
	fmt.Println(s)

}

func rotate(s []byte, l, r, k int) {
	if k == 0 || r-l == 0 {
		return
	}
	rev(s[l : l+k])
	rev(s[l+k : r])
	rev(s[l:r])
}

func rev(in []byte) {
	l := len(in)
	for i := 0; i < l/2; i++ {
		in[i], in[l-1-i] = in[l-1-i], in[i]
	}
	return
}

package main

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

var ps = fmt.Printf
var ss = fmt.Scanf

func gcd(a, b int64) int64 {
	if b==0 {
		return a;
	} else {
		return gcd(b, a%b);
	}
}

func rotate(nums []byte, k int64) {
    if k < 0 || len(nums) == 0 {
        return
	}

	ln := int64(len(nums))

	k = k%ln
	k = ln - k

	var d,i,j int64;
	var temp byte
	d = -1
	for i = int64(0); i<gcd(ln,k); i++ {
		j=i;
		temp = nums[i];
		for {
			d=(j+k)%ln;
			if(d==i) {
				break;
			}
			nums[j] = nums[d];
			j=d;
		}
		nums[j]=temp;
	}
}
func main(){
	// ws := bufio.NewWriter(os.Stdout)

	var str string
	ss("%s", &str)
	mission := []byte(str)

	var m int64
	ss("%l", &m)

	for i := int64(0); i < m; i++ {
		var l,r,k int64
		ss("%l %l %l", &l, &r, &k)
		l--; r--;
		rotate(mission[l:r+1], k)
	}

	ps("%s", string(mission))
	// ws.WriteString(string(mission))
	// ws.Flush()
}

package main

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

var ps = fmt.Printf
var ss = fmt.Scanf

func gcd(a, b int64) int64 {
	if b==0 {
		return a;
	} else {
		return gcd(b, a%b);
	}
}

func rotate(nums []byte, k int64) {
    if k < 0 || len(nums) == 0 {
        return
	}

	ln := int64(len(nums))

	k = k%ln
	k = ln - k

	var d,i,j int64;
	var temp byte
	d = -1
	for i = int64(0); i<gcd(ln,k); i++ {
		j=i;
		temp = nums[i];
		for {
			d=(j+k)%ln;
			if(d==i) {
				break;
			}
			nums[j] = nums[d];
			j=d;
		}
		nums[j]=temp;
	}
}
func main(){
	// ws := bufio.NewWriter(os.Stdout)

	var str string
	ss("%s", &str)
	mission := []byte(str)

	var m int64
	ss("%d", &m)

	for i := int64(0); i < m; i++ {
		var l,r,k int64
		ss("%d %d %d", &l, &r, &k)
		l--; r--;
		rotate(mission[l:r+1], k)
	}

	ps("%s", string(mission))
	// ws.WriteString(string(mission))
	// ws.Flush()
}


package main

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

type intSlice []int

func (d intSlice) Less(i, j int) bool { return d[i] > d[j] }
func (d intSlice) Len() int           { return len(d) }
func (d intSlice) Swap(i, j int)      { d[i], d[j] = d[j], d[i] }

type dataSlice []intSlice

func (d dataSlice) Less(i, j int) bool { return len(d[i]) > len(d[j]) }
func (d dataSlice) Len() int           { return len(d) }
func (d dataSlice) Swap(i, j int)      { d[i], d[j] = d[j], d[i] }

type Cin struct {
	scanner *bufio.Scanner
}

func newCin() *Cin {
	return &Cin{
		scanner: bufio.NewScanner(os.Stdin),
	}
}

func (c *Cin) NextInt() int {
	c.scanner.Scan()
	line := c.scanner.Text()
	return c.convertInt(line)
}

func (c *Cin) NextIntSlice() []int {
	c.scanner.Scan()
	line := strings.Split(c.scanner.Text(), " ")
	var ret []int
	for _, s := range line {
		ret = append(ret, c.convertInt(s))
	}
	return ret
}

func (c *Cin) NextTwoInt() (int, int) {
	line := c.NextIntSlice()
	return line[0], line[1]
}

func (c *Cin) convertInt(data string) int {
	i, _ := strconv.Atoi(data)
	return i
}

func main() {
	//t0 := time.Now()
	cin := newCin()
	n, m := cin.NextTwoInt()
	var (
		data dataSlice
	)
	for i := 0; i < m; i++ {
		data = append(data, intSlice{})
	}
	for i := 0; i < n; i++ {
		s, r := cin.NextTwoInt()
		data[s-1] = append(data[s-1], r)
	}
	//fmt.Printf("read:%v\n", time.Since(t0))
	//t0 = time.Now()

	sort.Sort(data)
	for i := range data {
		sort.Sort(data[i])
	}
	//fmt.Printf("%+v\n", data)
	//fmt.Printf("sort:%v\n", time.Since(t0))
	//t0 = time.Now()

	var sum dataSlice
	for i := 0; i < m; i++ {
		sum = append(sum, intSlice{})
		for j := 0; j < len(data[i]); j++ {
			if j == 0 {
				sum[i] = append(sum[i], data[i][j])
			} else {
				sum[i] = append(sum[i], sum[i][j-1]+data[i][j])
			}
		}
	}

	ans := 0
	for level := 1; level <= len(data[0]); level++ {
		currentSum := 0
		for i := 0; i < m && len(data[i]) >= level; i++ {
			if sum[i][level-1] > 0 {
				currentSum += sum[i][level-1]
			}
		}
		if currentSum > ans {
			ans = currentSum
		}
	}
	fmt.Printf("%v\n", ans)
	//fmt.Printf("scan:%v\n", time.Since(t0))
}

package main

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

var scanner = bufio.NewScanner(os.Stdin)

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

func main() {
	scanner.Split(bufio.ScanWords)
	n, m := scanNum(), scanNum()
	M := make([][]int, m+1)

	for i := 0; i < n; i++ {
		key, score := scanNum(), scanNum()
		if M[key] == nil {
			M[key] = []int{}
		}
		M[key] = append(M[key], score)
	}

	maxLen := 0
	for i := 0; i <= m; i++ {
		if len(M[i]) > maxLen {
			maxLen = len(M[i])
		}
	}
	bestScore := make([]int, maxLen+1)
	for i := 0; i <= m; i++ {
		sort.Ints(M[i])
		for j := len(M[i]) - 2; j >= 0; j-- {
			M[i][j] = M[i][j] + M[i][j+1]
		}
		for j := len(M[i]) - 1; j >= 0; j-- {
			if M[i][j] > 0 {
				bestScore[len(M[i])-j] += M[i][j]
			}
		}
	}

	max := 0
	for i := 1; i <= maxLen; i++ {
		if bestScore[i] > max {
			max = bestScore[i]
		}
	}

	fmt.Println(max)
}

package main

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

func main(){
	buf := bufio.NewReader(os.Stdin)
	var n,m int
	fmt.Fscanf(buf, "%d %d\n", &n,&m)
	mat := make(map[int][]int)
	for i:=1;i <= n;i++{
		var s,r int
		fmt.Fscanf(buf, "%d %d\n", &s,&r)
		v,ok := mat[s]
		if !ok{
			v = make([]int,0)
		}
		v = append(v,r)
		mat[s] = v
	}
//	fmt.Println(mat)
	var ans int64 = 0
	dp := make([]int64,n+1)
	for i:=1;i <= m;i++{
		v,ok := mat[i]
		if ok{
			sort.Ints(v)
		//	fmt.Println("i=",i,"v=",v)
			var len int  = len(v)
			var sum int64 = 0
			for j:=len-1;j >= 0;j--{
				sum += int64(v[j])
				if sum <= 0{
					break
				}
				dp[len-j] += sum
				if ans < dp[len-j]{
					ans = dp[len-j]
				}
			}
		}
	}
//	fmt.Println(dp)
	fmt.Printf("%d\n",ans)

}

package main

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

func main(){
	buf := bufio.NewReader(os.Stdin)
	var n,m int
	fmt.Fscanf(buf, "%d %d\n", &n,&m)
	mat := make(map[int][]int)
	for i:=1;i <= n;i++{
		var s,r int
		fmt.Fscanf(buf, "%d %d\n", &s,&r)
		if r <= 0{
			continue
		}
		v,ok := mat[s]
		if !ok{
			v = make([]int,0)
		}
		v = append(v,r)
		mat[s] = v
	}
//	fmt.Println(mat)
	var ans int64 = 0
	dp := make([]int64,n+1)
	for i:=1;i <= m;i++{
		v,ok := mat[i]
		if ok{
			sort.Ints(v)
//			fmt.Println("i=",i,"v=",v)
			var len int  = len(v)
			var sum int64 = 0
			for j:=len-1;j >= 0;j--{
				sum += int64(v[j])
				dp[len-j] += sum
				if ans < dp[len-j]{
					ans = dp[len-j]
				}
			}
		}
	}
	fmt.Printf("%d\n",ans)

}

package main

import (
	"fmt"
	"sort"
)

type intSlice []int

func (d intSlice) Less(i, j int) bool { return d[i] > d[j] }
func (d intSlice) Len() int           { return len(d) }
func (d intSlice) Swap(i, j int)      { d[i], d[j] = d[j], d[i] }

type dataSlice []intSlice

func (d dataSlice) Less(i, j int) bool { return len(d[i]) > len(d[j]) }
func (d dataSlice) Len() int           { return len(d) }
func (d dataSlice) Swap(i, j int)      { d[i], d[j] = d[j], d[i] }

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

func main() {
	var n, m int
	_, _ = fmt.Scanln(&n, &m)
	var (
		data dataSlice
		s, r int
	)
	for i := 0; i < m; i++ {
		data = append(data, intSlice{})
	}
	for i := 0; i < n; i++ {
		_, _ = fmt.Scanln(&s, &r)
		data[s-1] = append(data[s-1], r)
	}

	sort.Sort(data)
	for i := range data {
		sort.Sort(data[i])
	}
	//fmt.Printf("%+v\n", data)

	var sum dataSlice
	for i := 0; i < m; i++ {
		sum = append(sum, intSlice{})
		for j := 0; j < len(data[i]); j++ {
			val := data[i][j]
			if j > 0 {
				val += sum[i][j-1]
			}
			if i > 0 && j > 0 {
				val -= sum[i-1][j-1]
			}
			if i > 0 {
				val += sum[i-1][j]
			}
			sum[i] = append(sum[i], val)
		}
	}
	ans := 0
	for i := m - 1; i >= 0; i-- {
		ans = maxInt(ans, sum[i][len(sum[i])-1])
	}
	//fmt.Printf("%+v\n", sum)
	fmt.Printf("%v\n", ans)
}