package main

import ."fmt"
//import "sort"
import "bufio"
import "os"
//import "strconv"
//import "math"
//import "string"
//import "time"
//import ."math"

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

func main() {
    defer writer.Flush()

    t := sint64()
    for i := int64(0); i < t; i++ {
        solve()
    }

}
func solve() {
    n := sint64()
    ans := n / 10
    if n % 10 == 9 {ans++}
    printf("%d ", ans)
}
func resh(n int64) []int64 {
    p := make([]bool, n + 1)
    for i := int64(2); i <= n; i++ {
        p[i] = true
    }
    for i := int64(0); i <= n; i++ {
		if p[i] {
			for j := i * i; j <= n; j += i {
				p[j] = false
				//Print(j, " ")
			}
		}
	}
	ans := make([]int64, 0)
	for i := int64(0); i < n; i++ {
	    if p[i] {
	        ans = append(ans, i)
	    }
	}
	return ans
}
func printf(f string, a ...interface{}) {
	Fprintf(writer, f, a...)
}
func sstring() string {
	scanner.Scan()
	return scanner.Text()
}
func sint64() int64 {
	s := sstring()
	i := int64(0)
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int64(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int64(r - '0')
	}
	return i
}

func sum(a []int64) int64{
    ans := int64(0)
    for _, i := range a {
        ans += i
    }
    return ans
}
func abs(x int64) int64 {
    if x < 0 {
        return 0 - x
    }
    return x
}
func min(x, y int64) int64 {
    if x < y {
        return x
    }
    return y
}
func max(x, y int64) int64 {
    if x > y {
        return x
    }
    return y
}
func ceil(a, b int64) int64{
    s := a / b
    if a % b >= 0 {
        s++
    }
    if s == 0 {
        s = 1
    }
    return s
}
func init() {
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 4096), 1e9)
}

	package main

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

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

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

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

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

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

	/**
	Run solve the problem CF1553A
	Date: 8/11/21
	User: pepradere
	URL: https://codeforces.com/problemset/problem/1553/A
	Problem: CF1553A
	**/
	func (in *CF1553A) Run() {
		t := in.NextInt()
		for ; t > 0; t-- {
			num := in.NextInt()
			str := fmt.Sprintf("%d", num)
			if str[len(str)-1] == '9' {
				num++
			}
			fmt.Println(num / 10)
		}
	}

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

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

package main

import (
	"fmt"
	"os"
)

var ins = os.Stdin
var out = os.Stdout

func scan(a ...interface{}) (int, error)             { return fmt.Fscan(ins, a...) }
func printf(s string, a ...interface{}) (int, error) { return fmt.Fprintf(out, s, a...) }

func main() {
	var a int
	scan(&a)
	for c:=0; c<a;c++{
		var n int64
		scan(&n)
		printf("%d\n", fn(n))
	}
}

func fn(n int64) (res int64){
	if n<9{
		return 0
	}
	if (n%10) != 9 {
		n = (n - (n % 10)) - 1
	}
	res = n/10 +1

	return res
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var a int
		fmt.Scan(&a)
		fmt.Println(gg(a))
	}
}

func gg(a int) int {
	if a < 9 {
		return 0
	}
	if a == 9 {
		return 1
	}
	return (a + 1) / 10
}

package main

import (
    "fmt"
)

func main() {
    var tC int
    fmt.Scanln(&tC)

    for i := 0; i < tC; i++ {
        var n int
        fmt.Scan(&n)
        fmt.Println((n+1)/10)
    }
}

package main

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

var (
	t      int
	input  io.Reader = bufio.NewReader(os.Stdin)
	output           = bufio.NewWriter(os.Stdout)
)

func solve() {
	var n int
	fmt.Fscan(input, &n)

	fmt.Println((n + 1) / 10)
}

func main() {
	// t = 1
	fmt.Fscan(input, &t)

	for t > 0 {
		t--
		solve()
	}

	defer output.Flush()
}

package main

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

var (
	t      int
	input  io.Reader = bufio.NewReader(os.Stdin)
	output           = bufio.NewWriter(os.Stdout)
)

func solve() {
	var n int
	fmt.Fscan(input, &n)

	fmt.Fprintln(output, (n+1)/10)
}

func main() {
	// t = 1
	fmt.Fscan(input, &t)

	for t > 0 {
		t--
		solve()
	}

	defer output.Flush()
}

package main

import ."fmt"
//import "sort"
import "bufio"
import "os"
//import "strconv"
//import "math"
//import "string"
//import "time"
//import ."math"

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

func main() {
    defer writer.Flush()

    t := sint64()
    for i := int64(0); i < t; i++ {
        solve()
    }

}
func solve() {
    n := sint64()
    ans := n / 10
    if n % 10 == 9 {ans++}
    printf("%d\n", ans)
}
func resh(n int64) []int64 {
    p := make([]bool, n + 1)
    for i := int64(2); i <= n; i++ {
        p[i] = true
    }
    for i := int64(0); i <= n; i++ {
		if p[i] {
			for j := i * i; j <= n; j += i {
				p[j] = false
				//Print(j, " ")
			}
		}
	}
	ans := make([]int64, 0)
	for i := int64(0); i < n; i++ {
	    if p[i] {
	        ans = append(ans, i)
	    }
	}
	return ans
}
func printf(f string, a ...interface{}) {
	Fprintf(writer, f, a...)
}
func sstring() string {
	scanner.Scan()
	return scanner.Text()
}
func sint64() int64 {
	s := sstring()
	i := int64(0)
	if s[0] == '-' {
		for _, r := range s[1:] {
			i *= 10
			i -= int64(r - '0')
		}
		return i
	}
	for _, r := range s {
		i *= 10
		i += int64(r - '0')
	}
	return i
}

func sum(a []int64) int64{
    ans := int64(0)
    for _, i := range a {
        ans += i
    }
    return ans
}
func abs(x int64) int64 {
    if x < 0 {
        return 0 - x
    }
    return x
}
func min(x, y int64) int64 {
    if x < y {
        return x
    }
    return y
}
func max(x, y int64) int64 {
    if x > y {
        return x
    }
    return y
}
func ceil(a, b int64) int64{
    s := a / b
    if a % b >= 0 {
        s++
    }
    if s == 0 {
        s = 1
    }
    return s
}
func init() {
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 4096), 1e9)
}

package main
import(
    "fmt"
    "bufio"
    "os"
)
func main() {
	in:= bufio.NewReader(os.Stdin)
	out:= bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var t int
	fmt.Fscan(in,&t)
	for i:=0;i<t;i++{
		var x int
		fmt.Fscan(in,&x)
		fmt.Fprintln(out,(x+1)/10)
	}
}

// https://codeforces.com/problemset/problem/1553/A

// 1553A - Digits Sum

// Let's define S(x) to be the sum of digits of number x written in decimal system. For example, S(5)=5, S(10)=1, S(322)=7.
// We will call an integer x interesting if S(x+1)<S(x). In each test you will be given one integer n. Your task is to calculate the number of integers x such that 1≤x≤n and x is interesting.

// Input
// The first line contains one integer t (1≤t≤1000)  — number of test cases.
// Then t lines follow, the i-th line contains one integer n (1≤n≤109) for the i-th test case.

// Output
// Print t integers, the i-th should be the answer for the i-th test case.

// Example
// input
// 5
// 1
// 9
// 10
// 34
// 880055535
// output
// 0
// 1
// 1
// 3
// 88005553

// Note

// The first interesting number is equal to 9.

// Tutorial

// Let's think: what properties do all interesting numbers have? Well, if a number x does not end with 9, we can say for sure that f(x+1)=f(x)+1, because the last digit will get increased. What if the number ends with 9? Then the last digit will become 0, so, no matter what happens to other digits, we can say that f(x+1) will surely be less than f(x).
// So the problem asks us to count all numbers 1≤x≤n with the last digit equal to 9. It is not hard to see that the answer is equal to ⌊n+1/10⌋.
// This concludes the solution, as we are now able to answer all testcases in O(1), resulting in total O(t) runtime.

package main

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

func main() {
	var reader = bufio.NewReader(os.Stdin)
	var writer = bufio.NewWriter(os.Stdout)
	var c int
	var t, n uint

	for c, _ = fmt.Fscan(reader, &t); c == 1; c, _ = fmt.Fscan(reader, &t) {
		for ; t > 0; t-- {
			fmt.Fscan(reader, &n)
			fmt.Fprintln(writer, (n+1)/10)
		}
	}

	writer.Flush()
}

package main

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

func main()  {
    in := bufio.NewReader(os.Stdin)
    var t int
    fmt.Fscan(in, &t)
    for i := 0; i < t; i++ {
        var n int
        fmt.Fscan(in, &n)
        n++
        res := n / 10
        fmt.Println(res)
    }
}

package main

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

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

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

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

		tot := n / 10
		if n%10 == 9 {
			tot++
		}
		fmt.Fprintln(out, tot)
	}
}

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

)
func main(){
	r := bufio.NewReader(os.Stdin)
    w := bufio.NewWriter(os.Stdout)
    defer w.Flush()
    var t int
    fmt.Fscan(r, &t)
    for j := 0; j < t; j++ {
		var x int
		fmt.Fscan(r, &x)
        fmt.Fprintln(w, (x + 1)/ 10)
	}

}

package main

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

func solve() {
	f := bufio.NewReader(os.Stdin)
	w := bufio.NewWriter(os.Stdout)
	N, n := 0, 0
	fmt.Fscan(f, &N)
	for i := 0; i < N; i++ {
		fmt.Fscan(f, &n)
		fmt.Fprintln(w, (n+1)/10)
	}
	w.Flush()
}

func main() {
	solve()
}

package main

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

func (in *A) run() {
	T := in.nextInt()
	for t := 0; t < T; t++ {
		n := in.nextInt()
		fmt.Println(int(float64(n+1) / 10.0))
	}
}

func main() {
	file, err := os.Open("input.txt")
	var F *bufio.Reader
	if err == nil {
		F = bufio.NewReader(file)
		os.Stdin = file
	} else {
		F = bufio.NewReader(os.Stdin)
	}
	defer func(file *os.File) {
		_ = file.Close()
	}(file)
	NewA(F).run()
}

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

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

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

func (in *A) load() {
	if len(in.split) <= in.index {
		in.split = strings.Split(in.GetLine(), in.separator)
		in.index = 0
	}
}

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

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

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

package main

import (
	"fmt"
)

func solve() {
	n := readInt()
	x := n / 10
	if n%10 == 9 {
		x++
	}
	fmt.Println(x)
}

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

func readInt() int {
	var n int
	fmt.Scan(&n)
	return n
}
func readIntN(n int) []int {
	arr := make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&arr[i])
	}
	return arr
}

func readIntNN(n, m int) [][]int {
	arr := make([][]int, n)
	for i := 0; i < n; i++ {
		arr[i] = readIntN(m)
	}
	return arr
}

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

func minMax(a ...int) (min int, max int) {
	min, max = a[0], a[0]
	for _, v := range a {
		if v < min {
			min = v
		}
		if v > max {
			max = v
		}
	}
	return
}

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

package main

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

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

func solve(n int) int {
	k := n / 10
	if n%10 == 9 {
		k++
	}
	return k
}

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

package main

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

func main() {
	defer wr.Flush()
	t := scanInt()

	for ti := 0; ti < t; ti++ {
		n := scanInt()

		fmt.Println((n+1)/10)
	}
}

var (
	sc *bufio.Scanner
	wr *bufio.Writer
)

func init() {
	sc = bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)

	wr = bufio.NewWriter(os.Stdout)
}

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

func scanWord() string {
	sc.Scan()
	ret := sc.Text()
	return ret
}

package main

import "fmt"

func main() {

	// fmt.Println("awd")
	// var a int
	// fmt.Scan(&a)
	// fmt.Println(a)
	var t int
	fmt.Scan(&t)
	var n int
	for i := 0; i < t; i++ {
		fmt.Scan(&n)
		n += 1
		fmt.Println(n / 10)
	}
}

package main

import "fmt"

func main() {
	var t, n int
	fmt.Scan(&t)
	for i:=0;i<t;i++ {
		fmt.Scan(&n)
		if n%10<9 {
			fmt.Println(n/10)
		} else {
			fmt.Println(n/10 +1)
		}
	}
}

package main

import ."fmt"

func main() {
    var t, n int
    for Scan(&t); t > 0; t-- {
        Scan(&n)
        Println((n + 1) / 10)
    }
}

package main

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

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

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

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

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

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

		}
		return initial
	}
}

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

	}
	return m
}

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

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

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

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

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

	return
}

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

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

	return num
}

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

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

var t int

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

	for o := 0; o < t; o++ {
		var n int64

		fmt.Fscan(input, &n)
		if n%10 == 9 {
			fmt.Println(n/10 + 1)
		} else {
			fmt.Println(n / 10)
		}

	}

}

package main

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

var (
	read = bufio.NewReader(os.Stdin)
	write = bufio.NewWriter(os.Stdout)
)

func solve() {
	n := 0
	fmt.Fscan(read, &n)
	ans := (n + 1 ) / 10
	fmt.Fprintln(write, ans)
}

func main() {
	defer write.Flush()
	t :=  0
	fmt.Fscan(read, &t)
	for i := 0; i < t; i++ {
		solve()
	}
}

package main

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

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

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

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

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

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

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

func main() {
	defer writer.Flush()
	for t := _int(); t > 0; t-- {
		n := _int64()
		printf("%d\n", (n+1)/10)
	}
}

	package main

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

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

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

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

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

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

	/**
	Run solve the problem CF1553A
	Date: 8/11/21
	User: pepradere
	URL: https://codeforces.com/problemset/problem/1553/A
	Problem: CF1553A
	**/
	func (in *CF1553A) Run() {
		t := in.NextInt()
		for ; t > 0; t-- {
			num := in.NextInt()
			if num == 9 {
				num++
			}
			fmt.Println(num / 10)
		}
	}

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

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

package main

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

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

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

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

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

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

/**
Run solve the problem CF1553A
Date: 8/11/21
User: pepradere
URL: https://codeforces.com/problemset/problem/1553/A
Problem: CF1553A
**/
func (in *CF1553A) Run() {
	t := in.NextInt()
	for ; t > 0; t-- {
		num := in.NextInt()
		if num % 9 == 0 {
			num++
		}
		fmt.Println(num / 10)
	}
}

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

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

package main

import (
	"fmt"
	"os"
)

var ins = os.Stdin
var out = os.Stdout

func scan(a ...interface{}) (int, error)             { return fmt.Fscan(ins, a...) }
func printf(s string, a ...interface{}) (int, error) { return fmt.Fprintf(out, s, a...) }

func main() {
	var a int
	scan(&a)
	for c:=0; c<a;c++{
		var n int64
		scan(&n)
		printf("%d\n", fn(n))
	}
}

func fn(n int64) (res int64){
	if n<9{
		return 0
	}
	n=(n-(n%10))-1
	res = n/10 +1

	return res
}

package main

import (
	"fmt"
	"os"
)

var ins = os.Stdin
var out = os.Stdout

func scan(a ...interface{}) (int, error)             { return fmt.Fscan(ins, a...) }
func printf(s string, a ...interface{}) (int, error) { return fmt.Fprintf(out, s, a...) }

func main() {
	var a int
	scan(&a)
	for c:=0; c<a;c++{
		var n int
		scan(&n)
		printf("%d\n", fn(n))
	}
}

func fn(n int) (res int){
	if n<9{
		return 0
	}
	n=(n-(n%10))-1
	res = n/10 +1

	return res
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var a int
		fmt.Scan(&a)
		fmt.Println(gg(a))
	}
}

func gg(a int) int {
	if a < 9 {
		return 0
	}
	if a == 9 {
		return 1
	}
	return a / 10
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	for i := 0; i < n; i++ {
		var a int
		fmt.Scan(&a)
		fmt.Println(gg(a))
	}
}

func gg(a int) int {
	if a < 9 {
		return 0
	}
	return a / 10
}

package main

import (
    "fmt"
)

func main() {
    var tC int
    fmt.Scanln(&tC)

    for i := 0; i < tC; i++ {
        var n int
        fmt.Scan(&n)
        if n == 9 {
            fmt.Println(1)
        } else {
            fmt.Println(n/10)
        }
    }
}


package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var T, n int64
	var c string = "NO"
	set := make(map[int64]bool)
	for i := int64(1); i < 1e4; i++ {
		set[i*i*i] = true
	}
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n)
		for i := int64(1); i*i*i < n; i++ {
			if set[n-i*i*i] == true {
				c = "YES"
			}
		}
		Fprintln(out, c)
		c = "NO"
	}
}

package main

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

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

 	dp := make(map[int64]bool);
 	for j:=int64(1);j<=10000;j++ {
 		dp[j*j*j] = true;
 	}

 	var t int;
 	Fscan(in, &t);

 	for i:=0;i<t;i++ {
 		var x int64;
 		Fscan(in, &x);

 		ans := false;
 		for j:=int64(1);j<=10000;j++ {
 			if j*j*j > x {
 				break;
 			} else{
 				if _, ok := dp[x-j*j*j]; ok {
 					ans = true;
 				}
 			}
 		}

 		if ans {
 			Fprint(out, "YES\n");
 		} else{
 			Fprint(out, "NO\n");
 		}
 	}
 }

package main

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

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

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

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

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

func sint64s(n int64) []int64 {
	a := make([]int64, n)
	for i := range a {
		a[i] = sint64()
	}
	return a
}

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

func main() {
	defer writer.Flush()
	for t := sint64(); t > 0; t-- {
		printf("%s\n", sol(sint64()))
	}
}

var ans = map[int64]bool{}

func init() {
	for i := int64(1); i < 1e12; i++ {
		cube := i * i * i
		if cube > 1e12 {
			break
		}
		ans[cube] = true
	}
}

func sol(x int64) string {
	for i := range ans {
		if ans[x-i] {
			return "YES"
		}
	}
	return "NO"
}

package main

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

var set = make(map[int64]bool)

func init() {
	for i := int64(1); i < 1e4; i++ {
		set[i*i*i] = true
	}
}
func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var T, n int64
	var c string = "NO"

	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n)
		for i := int64(1); i*i*i < n; i++ {
			if set[n-i*i*i] == true {
				c = "YES"
			}
		}
		Fprintln(out, c)
		c = "NO"
	}
}

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	var T, n int64
	var c string
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &n)
		for i := int64(1); i*i*i < n; i++ {
			var s1 int64 = n - (i * i * i)
			s2 := int64(Cbrt(float64(s1)))
			if i*i*i+s2*s2*s2 == n {
				c = "YES"
				break
			}
		}
		if c != "YES" {
			c = "NO"
		}

		Fprintln(out, c)
		c = ""
	}
}

package main

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

func Readln(r *bufio.Reader) (string, error) {
	var (
		isPrefix bool  = true
		err      error = nil
		line, ln []byte
	)
	for isPrefix && err == nil {
		line, isPrefix, err = r.ReadLine()
		ln = append(ln, line...)
	}
	return string(ln), err
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	pk, _ := Readln(reader)
	k, _ := strconv.Atoi(pk)
	m := make(map [int64] int64)
	mainloop: for oi:=0; oi<k; oi++ {

		num,_ := Readln(reader)
		n,_:= strconv.ParseInt(num,10,64)

		bound := int64(math.Pow(float64(n), float64(1)/float64(3)))
		for i:=int64(1); i<=bound; i++ {
			m[i*i*i] = 1
		}

		for i:=int64(1); i<=bound; i++ {
			_, exists := m[n-i*i*i]
			if exists {
				fmt.Println("YES")
				continue mainloop
			}
		}
		fmt.Println("NO")

	}

}

package main

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

var bytes []byte

func nextByte() byte {
	b := bytes[0]
	bytes = bytes[1:]
	return b
}

func ScanInt64() int64 {
	var negative bool
	var result int64

	b := nextByte()

	for ; b < '0' || b > '9'; b = nextByte() {
		if b == '-' {
			negative = true
		}
	}

	for ; '0' <= b && b <= '9'; b = nextByte() {
		result = (result << 3) + (result << 1) + int64(b-'0')
	}

	if negative {
		return -result
	} else {
		return result
	}
}

func ScanInt() int {
	return int(ScanInt64())
}

func ScanString() string {
	builder := strings.Builder{}

	for b := nextByte(); b != '\r'; b = nextByte() {
		if b != '\n' {
			builder.WriteByte(b)
		}
	}

	return builder.String()
}

func init() {
	f, err := os.Open("in.txt")

	if err == nil {
		defer f.Close()
	} else {
		f = os.Stdin
	}

	bytes, _ = ioutil.ReadAll(bufio.NewReader(f))
}

type Package struct {
	x, y int
}

type Packages []Package

func (p Packages) Len() int { return len(p) }

func (p Packages) Swap(i, j int) { p[i], p[j] = p[j], p[i] }

func (p Packages) Less(i, j int) bool {
	if p[i].x != p[j].x {
		return p[i].x < p[j].x
	} else {
		return p[i].y < p[j].y
	}
}

func main() {
	for t := ScanInt(); t > 0; t-- {
		x := ScanInt64()
		cubes := map[int64]bool{}
		res := "NO"

		for i := int64(1); i*i*i <= x; i++ {
			cubes[i*i*i] = true

			if cubes[x-i*i*i] {
				res = "YES"
				break
			}
		}

		fmt.Println(res)
	}
}

package main

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

var sc = bufio.NewScanner(os.Stdin)
var wr = bufio.NewWriter(os.Stdout)
var dict = make(map[int64]int64)

func init() {
	max := int64(0)
	for i := int64(1); max <= 1e12; i++ {
		max = i * i * i
		dict[max] = i
	}
}

func main() {
	defer wr.Flush()
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 4096), 1e9)
	// this template is new version.
	// use getI(), getS(), getInts(), getF()

	cases := getI()
	forEach(cases, func(i int64) {
		num := getI()
		ans := "NO"
		for i := int64(1); i*i*i < num; i++ {
			if _, ok := dict[num-(i*i*i)]; ok {
				ans = "YES"
				break
			}
		}
		out(ans)
	})
}

// !------- HELPERS -------!

func out(x ...interface{}) {
	fmt.Fprintln(wr, x...)
}

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

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

func getF() float64 {
	sc.Scan()
	i, e := strconv.ParseFloat(sc.Text(), 64)
	if e != nil {
		panic(e)
	}
	return i
}

func getInts(N int64) []int64 {
	ret := make([]int64, N)
	for i := range ret {
		ret[i] = getI()
	}
	return ret
}

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

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

func joinInts(s []int64) string {
	return strings.Trim(fmt.Sprintf("%v", s), "[]")
}

func forEach(n int64, fn func(int64)) {
	for i := int64(0); i < n; i++ {
		fn(i)
	}
}

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

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

// min for n entry
func nmin(a ...int64) int64 {
	ret := a[0]
	for _, e := range a {
		ret = min(ret, e)
	}
	return ret
}

// max for n entry
func nmax(a ...int64) int64 {
	ret := a[0]
	for _, e := range a {
		ret = max(ret, e)
	}
	return ret
}

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

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

func lowerBound(a []int64, x int64) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int64, x int64) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

package main

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

var sc = bufio.NewScanner(os.Stdin)
var wr = bufio.NewWriter(os.Stdout)

func main() {
	defer wr.Flush()
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 4096), 1e9)
	// this template is new version.
	// use getI(), getS(), getInts(), getF()
	dict := make(map[int64]int64)

	max := int64(0)
	for i := int64(1); max <= 1e12; i++ {
		max = i * i * i
		dict[max] = i
	}

	cases := getI()
	forEach(cases, func(i int64) {
		num := getI()
		ans := "NO"
		for i := int64(1); i*i*i < num; i++ {
			if _, ok := dict[num-(i*i*i)]; ok {
				ans = "YES"
				break
			}
		}
		out(ans)
	})
}

// !------- HELPERS -------!

func out(x ...interface{}) {
	fmt.Fprintln(wr, x...)
}

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

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

func getF() float64 {
	sc.Scan()
	i, e := strconv.ParseFloat(sc.Text(), 64)
	if e != nil {
		panic(e)
	}
	return i
}

func getInts(N int64) []int64 {
	ret := make([]int64, N)
	for i := range ret {
		ret[i] = getI()
	}
	return ret
}

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

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

func joinInts(s []int64) string {
	return strings.Trim(fmt.Sprintf("%v", s), "[]")
}

func forEach(n int64, fn func(int64)) {
	for i := int64(0); i < n; i++ {
		fn(i)
	}
}

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

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

// min for n entry
func nmin(a ...int64) int64 {
	ret := a[0]
	for _, e := range a {
		ret = min(ret, e)
	}
	return ret
}

// max for n entry
func nmax(a ...int64) int64 {
	ret := a[0]
	for _, e := range a {
		ret = max(ret, e)
	}
	return ret
}

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

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

func lowerBound(a []int64, x int64) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] >= x
	})
	return idx
}

func upperBound(a []int64, x int64) int {
	idx := sort.Search(len(a), func(i int) bool {
		return a[i] > x
	})
	return idx
}

package main

import (
    "bufio"
    "io"
    "os"
    . "fmt"
    . "math"
)
var input io.Reader = bufio.NewReader(os.Stdin)
func main() {
    var t int
    Fscan(input, &t)
    for i := 0; i < t; i++ {
        var x int64
        Fscan(input, &x)

        flg := false
        for i := int64(1); i <= 10000; i++ {
            rest := x - i*i*i
            pred := int64(Cbrt(float64(rest)))
            if pred >= 1 && pred*pred*pred + i*i*i == x {
                flg = true
                break
            }
        }

        if flg {
            Println("YES")
        } else {
            Println("NO")
        }
    }
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	a := make([]uint64, 10000)
	var i uint64 = 0
	for i < 10000 {
		a[i] = (i + 1) * (i + 1) * (i + 1)
		i++
	}
	c := 0
	fmt.Scan(&c)
	for i := 0; i < c; i++ {
		var s uint64 = 0
		b := false
		fmt.Scan(&s)
		for i := 0; i < 10000; i++ {
			r := s - a[i]
			i := sort.Search(len(a), func(i int) bool { return a[i] >= r })
			if i < len(a) && a[i] == r {
				b = true
			}
		}
		t := "NO"
		if b {
			t = "YES"
		}
		fmt.Println(t)
	}
}

package main

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

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

	m := make(map[int64]bool)
	for i := int64(1); i <= 10000; i++ {
		m[i*i*i] = true
	}

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

		var f bool
		for i := int64(1); i*i*i < n; i++ {
			if m[n-(i*i*i)] {
				f = true
				break
			}
		}
		if !f {
			fmt.Fprintln(out, "NO")
		} else {
			fmt.Fprintln(out, "YES")
		}
	}
}

package main

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

var (
	reader = bufio.NewReader(os.Stdin)
	t      int
	x      int64
)

func solve(n int64) string {
	var k, l, r, m int64
	for i := int64(1); 2*i*i*i <= n; i++ {
		k = n - i*i*i
		if k > 0 {
			l = 1
			r = 10000
			for (r - l) > 1 {
				m = (l + r) / 2
				if m*m*m <= k {
					l = m
				} else {
					r = m
				}
			}
			if l*l*l == k {
				return "YES"
			}
		}
	}
	return "NO"
}

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

package main

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

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

	// Read number of test
	test, _ := GetInt(input)

	for i:=0; i<test; i++ {
		// Get num
		input, _ = reader.ReadString('\n')
		num, _ := GetInt64(input)

		left, right := int64(0), int64(10000)
		for left < right {
			mid := left + (right - left + 1) >> 1
			if mid*mid*mid < num {
				left = mid

			} else {
				right = mid - 1
			}
		}

		// Two pointers
		l, r := int64(1), left
		for l <= r {
			if l*l*l + r*r*r < num {
				l++

			} else if l*l*l + r*r*r > num {
				r--

			} else {
				fmt.Println("YES")
				break
			}
		}
		if l > r {
			fmt.Println("NO")
		}
	}
}

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

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

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

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

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

package main

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

const MAX_B = 10010

func solve(x int64) bool {
	var a int64 = 1
	for {
		a3 := a * a * a
		b3 := x - a3
		if a3 == b3 && a3+b3 == x {
			return true
		}
		if a3 > b3 {
			return false
		}
		// a3 < b3
		b := search(MAX_B, func(y int64) bool {
			return y*y*y+a3 >= x
		})
		if b*b*b == b3 {
			return true
		}
		a++
	}
}

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

	tc := readNum(reader)

	var buf bytes.Buffer

	for tc > 0 {
		tc--
		var x uint64
		s, _ := reader.ReadBytes('\n')
		readUint64(s, 0, &x)
		res := solve(int64(x))
		if res {
			buf.WriteString("YES\n")
		} else {
			buf.WriteString("NO\n")
		}
	}

	fmt.Print(buf.String())
}

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

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

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

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

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

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

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

	return i
}

func search(n int64, fn func(int64) bool) int64 {
	var left int64 = 1
	var right = n
	for left < right {
		mid := (left + right) / 2
		if fn(mid) {
			right = mid
		} else {
			left = mid + 1
		}
	}
	return right
}

package main

import . "fmt"

// github.com/EndlessCheng/codeforces-go
func main() {
	c := map[int64]bool{}
	for i := int64(1); i*i*i < 1e12; i++ {
		c[i*i*i] = true
	}
	T, x := 0, int64(0)
o:
	for Scan(&T); T > 0; T-- {
		Scan(&x)
		for v := range c {
			if c[x-v] {
				Println("YES")
				continue o
			}
		}
		Println("NO")
	}
}

package main

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

func Readln(r *bufio.Reader) (string, error) {
	var (
		isPrefix bool  = true
		err      error = nil
		line, ln []byte
	)
	for isPrefix && err == nil {
		line, isPrefix, err = r.ReadLine()
		ln = append(ln, line...)
	}
	return string(ln), err
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	pk, _ := Readln(reader)
	k, _ := strconv.Atoi(pk)
	m := make(map [int64] int64)
	mainloop: for oi:=0; oi<k; oi++ {

		num,_ := Readln(reader)
		nx,_:= strconv.Atoi(num)
		n := int64(nx)

		bound := int64(math.Pow(float64(n), float64(1)/float64(3)))
		for i:=int64(1); i<=bound; i++ {
			m[i*i*i] = 1
		}

		for i:=int64(1); i<=bound; i++ {
			_, exists := m[n-i*i*i]
			if exists {
				fmt.Println("YES")
				continue mainloop
			}
		}
		fmt.Println("NO")

	}

}

package main

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

var bytes []byte

func nextByte() byte {
	b := bytes[0]
	bytes = bytes[1:]
	return b
}

func ScanInt64() int64 {
	var negative bool
	var result int64

	b := nextByte()

	for ; b < '0' || b > '9'; b = nextByte() {
		if b == '-' {
			negative = true
		}
	}

	for ; '0' <= b && b <= '9'; b = nextByte() {
		result = (result << 3) + (result << 1) + int64(b-'0')
	}

	if negative {
		return -result
	} else {
		return result
	}
}

func ScanInt() int {
	return int(ScanInt64())
}

func ScanString() string {
	builder := strings.Builder{}

	for b := nextByte(); b != '\r'; b = nextByte() {
		if b != '\n' {
			builder.WriteByte(b)
		}
	}

	return builder.String()
}

func init() {
	f, err := os.Open("in.txt")

	if err == nil {
		defer f.Close()
	} else {
		f = os.Stdin
	}

	bytes, _ = ioutil.ReadAll(bufio.NewReader(f))
}

type Package struct {
	x, y int
}

type Packages []Package

func (p Packages) Len() int { return len(p) }

func (p Packages) Swap(i, j int) { p[i], p[j] = p[j], p[i] }

func (p Packages) Less(i, j int) bool {
	if p[i].x != p[j].x {
		return p[i].x < p[j].x
	} else {
		return p[i].y < p[j].y
	}
}

func main() {
	for t := ScanInt(); t > 0; t-- {
		x := ScanInt()
		cubes := map[int]bool{}
		res := "NO"

		for i := 1; i*i*i <= x; i++ {
			cubes[i*i*i] = true

			if cubes[x-i*i*i] {
				res = "YES"
				break
			}
		}

		fmt.Println(res)
	}
}

package main

import (
    "bufio"
    "io"
    "os"
    . "fmt"
    . "math"
)
var input io.Reader = bufio.NewReader(os.Stdin)
func main() {
    var t int
    Fscan(input, &t)
    for i := 0; i < t; i++ {
        var x int64
        Fscan(input, &x)

        flg := false
        for i := int64(1); i <= 10000; i++ {
            rest := x - i*i*i
            pred := int64(Cbrt(float64(rest)))
            if pred >= 1 && pred*pred*pred + i*i*i == x {
                flg = true
                break
            }
        }

        if flg {
            println("YES")
        } else {
            println("NO")
        }
    }
}

package main

import (
	"fmt"
	"sort"
)

func main() {
	a := make([]int, 10000)
	for i := 0; i < 10000; i++ {
		a[i] = (i + 1) * (i + 1) * (i + 1)
	}
	c := 0
	fmt.Scan(&c)
	for i := 0; i < c; i++ {
		s := 0
		b := false
		fmt.Scan(&s)
		for i := 0; i < 10000; i++ {
			r := s - a[i]
			i := sort.Search(len(a), func(i int) bool { return a[i] >= r })
			if i < len(a) && a[i] == r {
				b = true
			}
		}
		t := "NO"
		if b {
			t = "YES"
		}
		fmt.Println(t)
	}
}


package main

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

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

    ScanInts := func(a... *int) {
        for i := 0; i < len(a); i++ {
            scanner.Scan()
            *(a[i]), _ = strconv.Atoi(scanner.Text())
        }
    }

    var m int
    ScanInts(&m)
    a := make([]int,m)
    for i := 0; i < m; i++ {
        ScanInts(&a[i])
    }
    sort.Ints(a)
    ans := int64(0)
    for i := 1; i <= m; i*=4 {
        for j := m-i; j < m; j++ {
            ans += int64(a[j])
        }
    }
    fmt.Println(ans)
}

package main

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

var w *bufio.Writer = bufio.NewWriter(os.Stdout)
var scanner *bufio.Scanner = bufio.NewScanner(os.Stdin)

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

func main() {
	scanner.Split(bufio.ScanWords)
	n := NextInt()
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = NextInt()
	}
	sort.Ints(a)
	ans := int64(0)
	cnt := int64(1)
	for i, j := 0, 1; j <= n; i, j = j, j*4 {
		for k := n - 1 - i; k > n-1-j; k-- {
			ans -= int64(a[k]) * cnt
		}
		cnt++
	}
	for _, x := range a {
		ans += int64(x) * int64(cnt)
	}
	w.WriteString(strconv.FormatInt(ans, 10))
	w.WriteByte('\n')
	w.Flush()
}

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

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

func main() {
	var i,j,k int64
	input := bufio.NewScanner(os.Stdin)
	input.Split(bufio.ScanWords)
	fmt.Scan(&k)
	a:=make([]int64,k)
	for i=0;i<k;i++ {
		input.Scan()
		aa,_:=strconv.ParseInt(input.Text(),0,64)
		a[i]=aa
		a[i]=-a[i]
	}
	sort.Sort(int64arr(a))
	for i=0;i<k;i++ {
		a[i]=-a[i]
	}
	for ;k>0;k/=4 {
		for i=0;i<k;i++ {
			j+=a[i]
		}
	}
	fmt.Println(j)
}

// 313C-mic
package main

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

func main() {
	var i, j, n, res int64
	z := bufio.NewScanner(os.Stdin)
	z.Split(bufio.ScanWords)
	var num []int
	fmt.Scan(&n)
	for i = 0; i < n; i++ {
		z.Scan()
		aa, _ := strconv.Atoi(z.Text())
		num = append(num, aa)
	}
	sort.Sort(sort.Reverse(sort.IntSlice(num)))
	for j = n; j >= 1; j /= 4 {
		for i = 0; i < j; i++ {
			res += int64(num[i])
		}
	}
	fmt.Println(res)
}

package main

import "os"
import "bufio"
import "strconv"
import "sort"

func main(){
	var n int
	r := bufio.NewScanner(os.Stdin)
	r.Split(bufio.ScanWords)
	w := bufio.NewWriter(os.Stdout)
	r.Scan()
	n, _ = strconv.Atoi(r.Text())
	a := make([]int, n)
	for i:=0; i<n; i++ {
		r.Scan()
		a[i], _ = strconv.Atoi(r.Text())
	}
	sort.Ints(a)
	var sum int64
	for i:=1; i<=n; i*=4 {
		for j:=1; j<=i; j++ {
			sum += int64(a[n-j])
		}
	}
	w.WriteString(strconv.FormatInt(sum, 10)+"\n")
	w.Flush()
}

package main

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

var w *bufio.Writer = bufio.NewWriter(os.Stdout)
var scanner *bufio.Scanner = bufio.NewScanner(os.Stdin)

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

func main() {
	scanner.Split(bufio.ScanWords)
	n := NextInt()
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = NextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(a)))
	ans := int64(0)
	cnt := int64(1)
	for i, j := 0, 1; j <= n; i, j = j, j*4 {
		for k := i; k < j; k++ {
			ans -= int64(a[k]) * cnt
		}
		cnt++
	}
	for _, x := range a {
		ans += int64(x) * int64(cnt)
	}
	w.WriteString(strconv.FormatInt(ans, 10))
	w.WriteByte('\n')
	w.Flush()
}

package main

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

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

    ScanInts := func(a... *int) {
        for i := 0; i < len(a); i++ {
            scanner.Scan()
            *(a[i]), _ = strconv.Atoi(scanner.Text())
        }
    }

    var m int
    ScanInts(&m)
    a := make([]int,m)
    for i := 0; i < m; i++ {
        ScanInts(&a[i])
    }
    sort.Ints(a)
    ans := int64(0)
    for i := 1; i <= m; i*=4 {
        for j := i-1; j < m; j++ {
            ans += int64(a[j])
        }
    }
    fmt.Println(ans)
}

// 313C-mic
package main

import (
	"fmt"
	"sort"
)

func main() {
	var i, j, n, res int
	var num []int
	fmt.Scan(&n)
	for i = 0; i < n; i++ {
		fmt.Scan(&j)
		num = append(num, j)
	}
	sort.Sort(sort.Reverse(sort.IntSlice(num)))
	for j = n; j >= 1; j /= 4 {
		for i = 0; i < j; i++ {
			res += num[i]
		}
	}
	fmt.Println(res)
}


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

package main

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

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

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

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

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

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

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

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

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

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

var (
	n, m, k        int
	sx, sy, fx, fy []int
)

func main() {
	n, m, k = ReadInt3()
	for i := 0; i < k; i++ {
		a, b := ReadInt2()
		a--
		b--
		sy = append(sy, a)
		sx = append(sx, b)
	}
	for i := 0; i < k; i++ {
		a, b := ReadInt2()
		a--
		b--
		fy = append(fy, a)
		fx = append(fx, b)
	}

	answers := []rune{}
	for i := 0; i < m-1; i++ {
		answers = append(answers, 'L')
	}
	for i := 0; i < n-1; i++ {
		answers = append(answers, 'U')
	}

	for i := 0; i < n; i++ {
		var r rune
		if i%2 == 0 {
			r = 'R'
		} else {
			r = 'L'
		}

		for j := 0; j < m-1; j++ {
			answers = append(answers, r)
		}
		if i < n-1 {
			answers = append(answers, 'D')
		}
	}

	fmt.Println(len(answers))
	fmt.Println(string(answers))
}

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

/*********** 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"
	"io"
	"os"
	"strings"
)

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

	var n, m, k int
	Fscan(in, &n, &m, &k)
	s := []byte{}
	s = append(s, strings.Repeat("R", m-1)...)
	s = append(s, strings.Repeat("D", n-1)...)
	left := true
	for i := n;i>=1;i-- {
		if left {
			s = append(s, strings.Repeat("L", m-1)...)
		} else {
			s = append(s, strings.Repeat("R", m-1)...)
		}
		left = !left
		if i >1 {
			s = append(s, "U"...)
		}
	}
	Fprintln(out, len(s))
	Fprintln(out, string(s))
}

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

package main

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

func main() {
	n := ReadInt()
	m := ReadInt()
	if n == 1 && m == 1 {
		fmt.Printf("1\nU\n");
	} else {
		fmt.Printf("%d\n", n + m - 2 + n * m - 1)
		for i := 1; i < m; i++ {
			fmt.Print("L")
		}
		for i := 1; i < n; i++ {
			fmt.Print("U")
		}
		for i := 1; i <= n; i++ {
			for j := 1; j < m; j++ {
				if i%2 == 1 {
					fmt.Print("R")
				} else {
					fmt.Print("L")
				}
			}
			if i < n {
				fmt.Print("D")
			}
		}
	}
}

////////////////////////////////////

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

var out chan string
var in *bufio.Scanner
var outWg *sync.WaitGroup

func ReadString() string {
	in.Scan()
	return in.Text()
}
func ReadStringSlice(n int) []string {
	s := make([]string, n)
	for i := 0; i < n; i++ {
		s[i] = ReadString()
	}
	return s
}
func ReadInt() int {
	intStr := ReadString()
	i, _ := strconv.ParseInt(intStr, 10, 32)
	return int(i)
}
func ReadInt64() int64 {
	intstr := ReadString()
	i, _ := strconv.ParseInt(intstr, 10, 64)
	return int64(i)
}
func ReadIntSlice(n int) []int {
	arr := make([]int, n)
	for i := 0; i < n; i++ {
		arr[i] = ReadInt()
	}
	return arr
}
func init() {
	//set input
	in = bufio.NewScanner(os.Stdin)
	in.Buffer(make([]byte, 1024), int(2e+5))
	in.Split(bufio.ScanWords)

	//set output
	out = make(chan string, 16)
	outWg = &sync.WaitGroup{}
	outWg.Add(1)

	writer := bufio.NewWriterSize(os.Stdout, int(2e+5))
	go func(write *bufio.Writer) {
		defer outWg.Done()
		defer write.Flush()

		for line := range out {
			write.WriteString(line + "\n")
		}
	}(writer)
}

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

func Reader() func() int {
	var input []byte
	var idx int = 0
	scanner := bufio.NewReader(os.Stdin)
	return func() int {
		var ret, sign int = 0, 1
		for flag := true; flag; {
			for ; idx < len(input); idx++ {
				if (input[idx] >= '0' && input[idx] <= '9') || input[idx] == '-' {
					if input[idx] == '-' {
						sign = -1
						idx += 1
					}
					flag = false
					break
				}
			}
			if !flag {
				break
			}

			var err error
			input, _, err = scanner.ReadLine()
			idx = 0
			if err == io.EOF {
				return -1
			}
		}
		for ; idx < len(input) && input[idx]>='0' && input[idx]<='9'; idx++ {
			ret = ret * 10 + int(input[idx] -'0');
		}
		return ret * sign
	}
}

type Vec struct {
	x int
	y int
}

func PrintDir(n int, ch byte) {
	for i := 0; i < n; i++ {
		fmt.Printf("%c", ch)
	}
}

func main() {
	reader := Reader()
	n, m := reader(), reader()
	fmt.Println( n-1 + m-1 + n*m-1 )
	PrintDir(n-1, 'U')
	PrintDir(m-1, 'L')

	for i := 0; i < n; i++ {
		if i%2 == 0 {
			PrintDir(m-1, 'R')
		} else {
			PrintDir(m-1, 'L')
		}
		if i != n-1 {
			PrintDir(1, 'D')
		}
	}
}

// Author: sighduck
// URL: https://codeforces.com/problemset/problem/1327/C

package main

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

type Position struct {
	X int
	Y int
}

func check(x, y, n, m int) bool {
	if n%2 == 0 {
		return x != n-1 || y != 0
	}
	return x != n-1 || y != m-1
}

func Solve(n, m, k int, start, end []Position) string {
	answer := []string{}
	for i := 1; i <= n-1; i++ {
		answer = append(answer, "U")
	}
	for i := 1; i <= m-1; i++ {
		answer = append(answer, "L")
	}
	x := 0
	y := 0
	d := "R"
	for check(x, y, n, m) {
		if d == "R" && y != m-1 {
			answer = append(answer, "R")
			y += 1
		} else if d == "R" {
			answer = append(answer, "D")
			x += 1
			d = "L"
		} else if d == "L" && y != 0 {
			answer = append(answer, "L")
			y -= 1
		} else if d == "L" {
			answer = append(answer, "D")
			x += 1
			d = "R"
		}
	}
	return strings.Join(answer, "")
}

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

	var n, m, k int
	fmt.Fscanf(reader, "%d %d %d\n", &n, &m, &k)
	start := make([]Position, k)
	for i := 0; i < k; i++ {
		fmt.Fscanf(reader, "%d %d\n", &start[i].X, &start[i].Y)
	}
	end := make([]Position, k)
	for i := 0; i < k; i++ {
		fmt.Fscanf(reader, "%d %d\n", &end[i].X, &end[i].Y)
	}

	answer := Solve(n, m, k, start, end)
	fmt.Fprintf(writer, "%d\n%s\n", len(answer), answer)
}

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

package main

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

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

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

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

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

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

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

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

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

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

var (
	n, m, k        int
	sx, sy, fx, fy []int
)

func main() {
	n, m, k = ReadInt3()
	for i := 0; i < k; i++ {
		a, b := ReadInt2()
		a--
		b--
		sy = append(sy, a)
		sx = append(sx, b)
	}
	for i := 0; i < k; i++ {
		a, b := ReadInt2()
		a--
		b--
		fy = append(fy, a)
		fx = append(fx, b)
	}

	answers := []rune{}
	for i := 0; i < m-1; i++ {
		answers = append(answers, 'L')
	}
	for i := 0; i < n-1; i++ {
		answers = append(answers, 'U')
	}

	for i := 0; i < n; i++ {
		var r rune
		if i%2 == 0 {
			r = 'R'
		} else {
			r = 'L'
		}

		for j := 0; j < m-1; j++ {
			answers = append(answers, r)
		}
		if i < n-1 {
			answers = append(answers, 'U')
		}
	}

	fmt.Println(len(answers))
	fmt.Println(string(answers))
}

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

/*********** 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"
	"bufio"
	"os"
)
var reader *bufio.Reader = bufio.NewReader(os.Stdin)
var writer *bufio.Writer = bufio.NewWriter(os.Stdout)
func printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }
var XOR [1000000]int
func init(){
	for i:=1;i<1000000;i++{
		XOR[i]=XOR[i-1]^i
	}
}

func main(){
	defer writer.Flush()

	var t int
	scanf("%d\n",&t)
	for t>0{
		var mex,xor,ans int
		scanf("%d %d\n",&mex,&xor)
		currXor:=XOR[mex-1]
		needed:=currXor^xor
		if currXor==xor{
			ans=mex
		}else if needed==mex{
			ans=mex+2
		}else{
			ans=mex+1
		}
		printf("%d\n",ans)
		t--
	}

}

package main

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

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

func scan(a ...interface{}) {
	fmt.Fscan(in, a...)
}
func printf(f string, a ...interface{}) {
	fmt.Fprintf(out, f, a...)
}
func computeXor(n int) int {
	switch n % 4 {
	case 0:
		return n
	case 1:
		return 1
	case 2:
		return n + 1
	case 3:
		return 0
	}
	return 0
}
func solve() {
	var a, b int
	scan(&a, &b)
	n := a - 1
	xor := computeXor(n)
	result := a
	neededXor := (b ^ xor)
	if neededXor > 0 {
		if neededXor == a {
			result += 2
		} else {
			result += 1
		}
	}
	printf("%d\n", result)
}
func main() {
	defer out.Flush()
	n := 0
	scan(&n)
	for i := 0; i < n; i++ {
		solve()
	}
}

package main

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

func xorTo(n int) int {
	switch {
	case n%4 == 0:
		return n
	case n%4 == 1:
		return 1
	case n%4 == 2:
		return n + 1
	default:
		return 0
	}
}

func main() {
	reader := bufio.NewReader(os.Stdin)
	var t int
	_, _ = fmt.Fscan(reader, &t)
	for ; t > 0; t-- {
		var a, b int
		_, _ = fmt.Fscan(reader, &a, &b)
		if xorTo(a-1) == b {
			fmt.Println(a)
		} else {
			need := b ^ xorTo(a-1)
			if need != a {
				fmt.Println(a + 1)
			} else {
				fmt.Println(a + 2)
			}
		}
	}
}

package main

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

func xorUpto(n int) int {
	return []int{n, 1, n + 1, 0}[n%4]
}

func solve(a, b int) int {
	x := xorUpto(a - 1)
	if x == b {
		return a
	}
	if x^b == mex {
		return a + 2
	}
	return a + 1
}

var (
	reader      = bufio.NewReader(os.Stdin)
	t, mex, xor int
)

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

package main

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

func main() {
	stdin := bufio.NewReader(os.Stdin)
	stdout := bufio.NewWriter(os.Stdout)
	defer stdout.Flush()
	xorsum := make([]int, 310000)
	for i := 1; i < 310000; i++ {
		xorsum[i] = i ^ xorsum[i-1]
	}

	var tc int
	fmt.Fscanf(stdin, "%d\n", &tc)
	for ; tc > 0; tc-- {
		var mex, xor int
		fmt.Fscanf(stdin, "%d %d\n", &mex, &xor)
		ln := mex
		xor ^= xorsum[mex-1]
		if xor == 0 {
		} else if xor == mex {
			ln += 2
		} else {
			ln++
		}
		fmt.Fprintf(stdout, "%d\n", ln)
	}
}

package main

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

func main() {
	var t int64
	r := bufio.NewReader(os.Stdin)
	fmt.Fscan(r, &t)

	for i := int64(0); i < t; i++ {
		var a int64
		var b int64
		fmt.Fscan(r, &a)
		fmt.Fscan(r, &b)

		var xor int64

		switch a % 4 {
		case 0:
			xor = 0
		case 1:
			xor = a - 1
		case 2:
			xor = (a - 1) ^ (a - 2)
		case 3:
			xor = (a - 1) ^ (a - 2) ^ (a - 3)
		}

		if xor == b {
			fmt.Printf("%d\n", a)
			continue
		}
		if b^xor == a {
			fmt.Printf("%d\n", a+2)
			continue
		}
		fmt.Printf("%d\n", a+1)
	}
}

package main

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

type Scanner struct {
	*bufio.Scanner
}

func NewWordScanner(reader io.Reader) *Scanner {
	scanner := bufio.NewScanner(reader)
	scanner.Split(bufio.ScanWords)
	return &Scanner{scanner}
}

func (s *Scanner) Word() string {
	s.Scan()
	return s.Text()
}

func (s *Scanner) Int() int {
	s.Scan()
	n, _ := strconv.Atoi(s.Text())
	return n
}

func (s *Scanner) Int64() int64 {
	s.Scan()
	n, _ := strconv.ParseInt(s.Text(), 10, 64)
	return n
}

func (s *Scanner) Words(count int) []string {
	words := make([]string, count)
	for i := range words {
		words[i] = s.Word()
	}
	return words
}

func (s *Scanner) Ints(count int) []int {
	ints := make([]int, count)
	for i := range ints {
		ints[i] = s.Int()
	}
	return ints
}

func (s *Scanner) Int64s(count int) []int64 {
	int64s := make([]int64, count)
	for i := range int64s {
		int64s[i] = s.Int64()
	}
	return int64s
}

func compXors(n int) []int {
	xors := make([]int, n+1)
	for i := 1; i <= n; i++ {
		xors[i] = xors[i-1] ^ i
	}
	return xors
}

func solve(a, b int, xors []int) int {
	x := xors[a-1]
	if x == b {
		return a
	}
	if x^b != a {
		return a + 1
	}
	return a + 2
}

func main() {
	stdin := NewWordScanner(os.Stdin)
	tests := stdin.Int()

	xors := compXors(300010)

	for i := 0; i < tests; i++ {
		a, b := stdin.Int(), stdin.Int()
		fmt.Println(solve(a, b, xors))
	}
}

package main

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

var (
	in = bufio.NewReader(os.Stdin)
)

func main() {
	var test int
	fmt.Fscan(in, &test)
	for i := 0; i < test; i++ {
		solve()
	}

}

func calcXor(a int) int {
	if a%4 == 0 {
		return a
	}
	if a%4 == 1 {
		return 1
	}
	if a%4 == 2 {
		return a + 1
	}
	return 0
}
func solve() {
	var a, b int
	fmt.Fscan(in, &a)
	fmt.Fscan(in, &b)
	var ans = a
	var currenXor = calcXor(a - 1)
	if currenXor == b {
		fmt.Println(ans)
		return
	}
	//now find out the digit whose xor is equal to the given b
	needed := 0
	for i := 32; i >= 0; i-- {
		if (1<<i)&currenXor != (1<<i)&b {
			needed |= 1 << i
		}
	}
	if needed == a {
		fmt.Println(a + 2)
	} else {
		fmt.Println(a + 1)
	}

}

//x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-TEMPLATE_STARTING-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-

type pair struct {
	a int64
	b int64
}

func sortPair(pairs []pair) {
	sort.Slice(pairs, func(i, j int) bool {
		return pairs[i].a < pairs[j].a
	})
}
func min(a int64, b int64) int64 {
	if a < b {
		return a
	}
	return b
}
func max(a int64, b int64) int64 {
	if a > b {
		return a
	}
	return b
}

func printArray(arr []int) {
	for i := 1; i < len(arr); i++ {
		fmt.Print(arr[i], " ")
	}
	fmt.Println()
}

type runeSort []rune

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

// 00
package main

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

func write_int(f *bufio.Writer, a int) {
	f.Write([]byte(strconv.Itoa(a)))
}
func write_string(f *bufio.Writer, a string) {
	f.Write([]byte(a))
}

func main() {
	var T int
	reader := bufio.NewReader(os.Stdin)
	f := bufio.NewWriter(os.Stdout)
	defer f.Flush()
	fmt.Fscan(reader, &T)
	m := make(map[int]int)
	curr := 1
	xor := 0
	for curr <= 300000 {
		m[curr] = xor
		xor = xor ^ curr
		curr++
	}
	for t := 1; t <= T; t++ {
		var a, b int
		fmt.Fscan(reader, &a, &b)
		if m[a] != b {
			if m[a]^b == a {
				fmt.Println(a + 2)
			} else {
				fmt.Println(a + 1)
			}
		} else {
			fmt.Println(a)
		}
	}
}

package main

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

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

	var T int
	fmt.Fscanf(r, "%d\n", &T)

	x := make([]int, 3*100000+2)
	for i := 1; i < len(x); i++ {
		x[i] = x[i-1] ^ i
	}

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

		fmt.Fscanf(r, "%d %d\n", &a, &b)

		v := x[a-1] ^ b
		res := a

		// 0 1
		// 1

		if v == 0 {

		} else if v > a || v < a {
			res++
		} else {
			res += 2
		}

		fmt.Println(res)
	}
}

package main

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

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

	var T, a, b int
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &a, &b)
		xor := 0
		switch a % 4 {
		case 1:
			xor = a - 1
		case 2:
			xor = 1
		case 3:
			xor = a
		}
		if xor == b {
			Fprintln(out, a)
		} else if xor^b != a {
			Fprintln(out, a+1)
		} else {
			Fprintln(out, a+2)
		}
	}
}

func main() { CF1567B(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 printf(f string, a ...interface{}) { fmt.Fprintf(writer, f, a...) }
func scanf(f string, a ...interface{}) { fmt.Fscanf(reader, f, a...) }

func main() {
	defer writer.Flush()
	var t,a,b int
	scanf("%d\n", &t)
	xsors := make([]int, 10_0000 * 3 + 1)
	for i := 1; i < len(xsors);i++ {
		xsors[i] = xsors[i-1] ^ i
	}
	for l := 0; l < t; l++ {
		scanf("%d %d\n", &a, &b)
		tmp := xsors[a - 1]
		if tmp != b {
			if b ^ tmp != a {
				printf("%d\n", a + 1)
			} else {
				printf("%d\n", a + 2)
			}
		} else {
			printf("%d\n", a)
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
)
//wtf

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

func main() {
	defer writer.Flush()
	var t,a,b int
	scanf("%d\n", &t)
	xsors := make([]int, 10_0000 * 3 + 1)
	for i := 1; i < len(xsors);i++ {
		xsors[i] = xsors[i-1] ^ i
	}
	for l := 0; l < t; l++ {
		scanf("%d %d\n", &a, &b)
		tmp := xsors[a - 1]
		if tmp != b {
			if b ^ tmp != a {
				printf("%d\n", a + 1)
			} else {
				printf("%d\n", a + 2)
			}
		} else {
			printf("%d\n", a)
		}
	}
}

package main

import (
	"bufio"
	"fmt"
	"os"
)
//wtf

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

func main() {
	defer writer.Flush()
	var t,a,b int
	scanf("%d\n", &t)
	xsors := make([]int, 10_0000 * 3 + 1)
	for i := 1; i < len(xsors);i++ {
		xsors[i] = xsors[i-1] ^ i
	}
	for l := 0; l < t; l++ {
		scanf("%d %d\n", &a, &b)
		tmp := xsors[a - 1]
		if tmp != b {
			if b ^ tmp != a {
				fmt.Println(a + 1)
			} else {
				fmt.Println(a + 2)
			}
		} else {
			fmt.Println(a)
		}
	}
}

package main

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

func xorUpto(u int) (int) {
	u--
	switch u % 4 {
		case 0: return u
		case 1: return 1
		case 2: return u+1
		case 3: return 0
	}
	return -1
}

func solve(a, b int) int {
	xa := xorUpto(a)
	r := xa ^ b
	if (r == 0) {
		return a
	} else if (r == a) {
		return a+2
	} else {
		return a+1
	}
}

func main() {
	s := bufio.NewScanner(os.Stdin)

	s.Scan() // skip number of inputs
	for s.Scan() {
		l := strings.Split(s.Text(), " ")
		if len(l) < 2 {
			break
		}
		a, err := strconv.Atoi(l[0])
		if err != nil {
			break
		}
		if a < 1 {
			panic("a < 1")
		}
		b, err := strconv.Atoi(l[1])
		if err != nil {
			break
		}
		fmt.Println(solve(a, b))
	}
}

package main

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

func main() {
	var t,a,b int
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	fmt.Scanf("%d", &t)
	xsors := make([]int, 10_0000 * 3 + 1)
	for i := 1; i < len(xsors);i++ {
		xsors[i] = xsors[i-1] ^ i
	}
	for l := 0; l < t; l++ {
		fmt.Scanf("%d %d", &a, &b)
		tmp := xsors[a - 1]
		if tmp != b {
			if b ^ tmp != a {
				fmt.Println(a + 1)
			} else {
				fmt.Println(a + 2)
			}
		} else {
			fmt.Println(a)
		}
	}
}

package main

import "fmt"

func main() {
	var t,a,b int
	fmt.Scanln(&t)
	xsors := make([]int, 10_0000 * 3 + 1)
	for i := 1; i < len(xsors);i++ {
		xsors[i] = xsors[i-1] ^ i
	}
	for l := 0; l < t; l++ {
		fmt.Scan(&a, &b)
		tmp := xsors[a - 1]
		if tmp != b {
			if b <= a {
				fmt.Println(a + 2)
			} else {
				fmt.Println(a + 1)
			}
		} else {
			fmt.Println(a)
		}
 	}
}

package main

import "fmt"

func main() {
	var t,a,b int
	fmt.Scanln(&t)
	xsors := make([]int, 10_0000 * 3 + 1)
	for i := 1; i < len(xsors);i++ {
		xsors[i] = xsors[i-1] ^ i
	}
	for l := 0; l < t; l++ {
		fmt.Scan(&a, &b)
		tmp := xsors[a - 1]
		if tmp != b {
			if b == a {
				fmt.Println(a + 2)
			} else {
				fmt.Println(a + 1)
			}
		} else {
			fmt.Println(a)
		}
 	}
}

package main

import (
	"fmt"
)

func main() {
	var t int64
	_, err := fmt.Scan(&t)
	if err != nil {
		return
	}
	for i := int64(0); i < t; i++ {
		var a int64
		var b int64
		_, err := fmt.Scan(&a)
		if err != nil {
			return
		}
		fmt.Scan(&b)
		if err != nil {
			return
		}

		var xor int64

		switch a % 4 {
		case 0:
			xor = 0
		case 1:
			xor = a - 1
		case 2:
			xor = (a - 1) ^ (a - 2)
		case 3:
			xor = (a - 1) ^ (a - 2) ^ (a - 3)
		}

		if xor == b {
			fmt.Println(a)
			continue
		}
		if b^xor == a {
			fmt.Println(a + 2)
			continue
		}
		fmt.Println(a)
	}
}

package main

import (
	"fmt"
)

func main() {
	var t int64
	_, err := fmt.Scan(&t)
	if err != nil {
		return
	}
	for i := int64(0); i < t; i++ {
		var a int64
		var b int64
		_, err := fmt.Scan(&a)
		if err != nil {
			return
		}
		fmt.Scan(&b)
		if err != nil {
			return
		}

		var xor int64

		switch (a - 1) % 4 {
		case 0:
			xor = 0
		case 1:
			xor = a - 1
		case 2:
			xor = (a - 1) ^ (a - 2)
		case 3:
			xor = (a - 1) ^ (a - 2) ^ (a - 3)
		}

		if xor == b {
			fmt.Println(a)
			continue
		}
		if b^xor == a {
			fmt.Println(a + 2)
			continue
		}
		fmt.Println(a+1)
	}
}

package main

import (
	"fmt"
)

func main() {
	var t int64
	_, err := fmt.Scan(&t)
	if err != nil {
		return
	}
	for i := int64(0); i < t; i++ {
		var a int64
		var b int64
		_, err := fmt.Scan(&a)
		if err != nil {
			return
		}
		fmt.Scan(&b)
		if err != nil {
			return
		}

		var xor int64

		switch (a - 1) % 4 {
		case 0:
			xor = 0
		case 1:
			xor = a - 1
		case 2:
			xor = (a - 1) ^ (a - 2)
		case 3:
			xor = (a - 1) ^ (a - 2) ^ (a - 3)
		}

		if xor == b {
			fmt.Println(a-1)
			continue
		}
		if b^xor == a {
			fmt.Println(a + 1)
			continue
		}
		fmt.Println(a)
	}
}

package main

import (
	"fmt"
)

func main() {
	var t int64
	_, err := fmt.Scan(&t)
	if err != nil {
		return
	}
	for i := int64(0); i < t; i++ {
		var a int64
		var b int64
		_, err := fmt.Scan(&a)
		if err != nil {
			return
		}
		fmt.Scan(&b)
		if err != nil {
			return
		}
		var array []int64
		var xor int64

		switch (a - 1) % 4 {
		case 0:
			xor = 0
		case 1:
			xor = a - 1
		case 2:
			xor = (a - 1) ^ (a - 2)
		case 3:
			xor = (a - 1) ^ (a - 2) ^ (a - 3)
		}

		if xor == b {
			fmt.Println(len(array))
			continue
		}
		if b^xor == a {
			fmt.Println(len(array) + 2)
			continue
		}
		fmt.Println(len(array) + 1)
	}
}

package main

import (
	"fmt"
)

func main() {
	var t int64
	_, err := fmt.Scan(&t)
	if err != nil {
		return
	}
	for i := int64(0); i < t; i++ {
		var a int64
		var b int64
		_, err := fmt.Scan(&a)
		if err != nil {
			return
		}
		fmt.Scan(&b)
		if err != nil {
			return
		}
		var array []int64
		var xor int64

			for j := int64(0); j < a; j++ {
				array = append(array, j)
				xor =xor ^ j
			}
			if xor==b{
				fmt.Println(len(array))
				continue
			}
			if b^xor==b{
				fmt.Println(len(array)+2)
				continue
			}
			fmt.Println(len(array)+1)
	}
}

package main

import (
	"fmt"
)

func main() {
	var t int64
	_, err := fmt.Scan(&t)
	if err != nil {
		return
	}
	for i := int64(0); i < t; i++ {
		var a int64
		var b int64
		_, err = fmt.Scanf("%d %d\n", &a, &b)
		if err != nil {
			return
		}
		var array []int64
		var xor int64

			for j := int64(0); j < a; j++ {
				array = append(array, j)
				xor =xor ^ j
			}
			if xor==b{
				fmt.Println(len(array))
				continue
			}
			if b^xor==b{
				fmt.Println(len(array)+2)
				continue
			}
			fmt.Println(len(array)+1)
	}
}

package main

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

var (
	in = bufio.NewReader(os.Stdin)
)

func main() {
	var test int
	fmt.Fscan(in, &test)
	for i := 0; i < test; i++ {
		solve()
	}

}

func calcXor(a int) int {
	if a%4 == 0 {
		return a
	}
	if a%4 == 1 {
		return 1
	}
	if a%4 == 2 {
		return a + 1
	}
	return 0
}
func solve() {
	var a, b int
	fmt.Fscan(in, &a)
	fmt.Fscan(in, &b)
	var ans = a
	var currenXor = calcXor(a - 1)
	if currenXor == b {
		fmt.Println(ans)
		return
	}
	//now find out the digit whose xor is equal to the given b
	needed := 0
	for i := 0; i < 32; i++ {
		if currenXor&(1<<i) == 0 && b&(1<<i) == 1 {
			needed |= 1 << i
		} else if currenXor&(1<<i) == 1 && b&(1<<i) == 0 {
			needed |= 1 << i
		}
	}
	if needed == a {
		fmt.Println(a + 2)
	} else {
		fmt.Println(a + 1)
	}

}

//x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-TEMPLATE_STARTING-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-

type pair struct {
	a int64
	b int64
}

func sortPair(pairs []pair) {
	sort.Slice(pairs, func(i, j int) bool {
		return pairs[i].a < pairs[j].a
	})
}
func min(a int64, b int64) int64 {
	if a < b {
		return a
	}
	return b
}
func max(a int64, b int64) int64 {
	if a > b {
		return a
	}
	return b
}

func printArray(arr []int) {
	for i := 1; i < len(arr); i++ {
		fmt.Print(arr[i], " ")
	}
	fmt.Println()
}

type runeSort []rune

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

package main

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

var (
	in = bufio.NewReader(os.Stdin)
)

func main() {
	var test int
	fmt.Fscan(in, &test)
	for i := 0; i < test; i++ {
		solve()
	}

}

func calcXor(a int) int {
	if a%4 == 0 {
		return a
	}
	if a%4 == 1 {
		return 1
	}
	if a%4 == 2 {
		return a + 2
	}
	return 0
}
func solve() {
	var a, b int
	fmt.Fscan(in, &a)
	fmt.Fscan(in, &b)
	var ans = a
	var currenXor = calcXor(a - 1)
	if currenXor == b {
		fmt.Println(ans)
		return
	}
	//now find out the digit whose xor is equal to the given b
	needed := 0
	for i := 0; i < 32; i++ {
		if currenXor&(1<<i) == 0 && b&(1<<i) == 1 {
			needed |= 1 << i
		} else if currenXor&(1<<i) == 1 && b&(1<<i) == 0 {
			needed |= 1 << i
		}
	}
	if needed == a {
		fmt.Println(a + 2)
	} else {
		fmt.Println(a + 1)
	}

}

//x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-TEMPLATE_STARTING-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-

type pair struct {
	a int64
	b int64
}

func sortPair(pairs []pair) {
	sort.Slice(pairs, func(i, j int) bool {
		return pairs[i].a < pairs[j].a
	})
}
func min(a int64, b int64) int64 {
	if a < b {
		return a
	}
	return b
}
func max(a int64, b int64) int64 {
	if a > b {
		return a
	}
	return b
}

func printArray(arr []int) {
	for i := 1; i < len(arr); i++ {
		fmt.Print(arr[i], " ")
	}
	fmt.Println()
}

type runeSort []rune

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

package main

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

var (
	in = bufio.NewReader(os.Stdin)
)

func main() {
	var test int
	fmt.Fscan(in, &test)
	for i := 0; i < test; i++ {
		solve()
	}

}

func calcXor(a int) int {
	if a%4 == 0 {
		return a
	}
	if a%4 == 1 {
		return 1
	}
	if a%4 == 2 {
		return a + 2
	}
	return 0
}
func solve() {
	var a, b int
	fmt.Fscan(in, &a)
	fmt.Fscan(in, &b)
	var ans = a
	var currenXor = calcXor(a - 1)
	if currenXor == b {
		fmt.Println(ans)
		return
	}
	//now find out the digit whose xor is equal to the given b
	needed := 0
	for i := 0; i < 32; i++ {
		if currenXor&1<<i == 0 && b&1<<i == 1 {
			needed |= 1 << i
		} else if currenXor&1<<i == 1 && b&1<<i == 0 {
			needed |= 1 << i
		}
	}
	if needed == a {
		fmt.Println(a + 2)
	} else {
		fmt.Println(a + 1)
	}

}

//x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-TEMPLATE_STARTING-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-

type pair struct {
	a int64
	b int64
}

func sortPair(pairs []pair) {
	sort.Slice(pairs, func(i, j int) bool {
		return pairs[i].a < pairs[j].a
	})
}
func min(a int64, b int64) int64 {
	if a < b {
		return a
	}
	return b
}
func max(a int64, b int64) int64 {
	if a > b {
		return a
	}
	return b
}

func printArray(arr []int) {
	for i := 1; i < len(arr); i++ {
		fmt.Print(arr[i], " ")
	}
	fmt.Println()
}

type runeSort []rune

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

// 00
package main

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

func write_int(f *bufio.Writer, a int) {
	f.Write([]byte(strconv.Itoa(a)))
}
func write_string(f *bufio.Writer, a string) {
	f.Write([]byte(a))
}

func main() {
	var T int
	reader := bufio.NewReader(os.Stdin)
	f := bufio.NewWriter(os.Stdout)
	defer f.Flush()
	fmt.Fscan(reader, &T)
	m := make(map[int]int)
	curr := 1
	xor := 0
	for curr <= 300000 {
		m[curr] = xor
		xor = xor ^ curr
		curr++
	}
	for t := 1; t <= T; t++ {
		var a, b int
		fmt.Fscan(reader, &a, &b)
		if m[a] != b {
			if a == b {
				fmt.Println(a + 2)
			} else {
				fmt.Println(a + 1)
			}
		} else {
			fmt.Println(a)
		}
	}
}

// 00
package main

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

func write_int(f *bufio.Writer, a int) {
	f.Write([]byte(strconv.Itoa(a)))
}
func write_string(f *bufio.Writer, a string) {
	f.Write([]byte(a))
}

func main() {
	var T int
	reader := bufio.NewReader(os.Stdin)
	f := bufio.NewWriter(os.Stdout)
	defer f.Flush()
	fmt.Fscan(reader, &T)
	m := make(map[int]int)
	curr := 1
	xor := 0
	for curr <= 300000 {
		m[curr] = xor
		xor = xor ^ curr
		curr++
	}
	for t := 1; t <= T; t++ {
		var a, b int
		fmt.Fscan(reader, &a, &b)
		if a == 1 && b == 1 {
			fmt.Println(3)
		} else if m[a] != b {
			fmt.Println(a + 1)
		} else {
			fmt.Println(a)
		}
	}
}

package main

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

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

	var T int
	fmt.Fscanf(r, "%d\n", &T)

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

		fmt.Fscanf(r, "%d %d\n", &a, &b)

		x := 0

		for i := 0; i < a; i++ {
			x ^= i
		}

		v := x ^ b
		res := a

		// 0 1
		// 1

		if v == 0 {

		} else if v > a {
			res++
		} else {
			res += 2
		}

		fmt.Println(res)
	}
}

package main

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

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

	var T, a, b int
	for Fscan(in, &T); T > 0; T-- {
		Fscan(in, &a, &b)
		xor := 0
		if a > 1 {
			switch a % 4 {
			case 1:
				xor = a*4 + 3
			case 2:
				xor = 1
			case 3:
				xor = a*4 + 2
			}
		}
		if xor == b {
			Fprintln(out, a)
		} else if xor^b != a {
			Fprintln(out, a+1)
		} else {
			Fprintln(out, a+2)
		}
	}
}

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


package main

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

// github.com/EndlessCheng/codeforces-go
func main() {
	in := bufio.NewReader(os.Stdin)
	var n, k, s int
	Fscan(in, &n, &k)
	a := make([]int, n+2)
	a[0],a[n+1] = -1e8,2e9
	for i := 1; i <= n; i++ { Fscan(in, &a[i]) }
	b := make([]int, k+2)
	for i := 1; i <= k; i++ { Fscan(in, &b[i]) }
	b[k+1] = n+1

	for i, l := range b[:k+1] {
		r := b[i+1]
		if a[r]-a[l] < r-l {
			Print(-1)
			return
		}
		dp := []int{}
		for j := l + 1; j < r; j++ {
			if v := a[j] - j; a[l]-l <= v && v <= a[r]-r {
				if p := sort.SearchInts(dp, v+1); p < len(dp) {
					dp[p] = v
				} else {
					dp = append(dp, v)
				}
			}
		}
		s += len(dp)
	}
	Print(n-k-s)
}

package main

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

// github.com/EndlessCheng/codeforces-go
func CF1437E(_r io.Reader, out io.Writer) {
	in := bufio.NewReader(_r)
	var n, k, ans int
	Fscan(in, &n, &k)
	a := make([]int, n+2)
	a[0] = -1e8
	for i := 1; i <= n; i++ {
		Fscan(in, &a[i])
	}
	a[n+1] = 2e9
	b := make([]int, k+2)
	for i := 1; i <= k; i++ {
		Fscan(in, &b[i])
	}
	b[k+1] = n + 1

	for i := 0; i <= k; i++ {
		l, r := b[i], b[i+1]
		if a[r]-a[l] < r-l {
			Fprint(out, -1)
			return
		}
		dp := []int{}
		for j := l + 1; j < r; j++ {
			if v := a[j] - j; a[l]-l <= v && v <= a[r]-r {
				if p := sort.SearchInts(dp, v+1); p < len(dp) {
					dp[p] = v
				} else {
					dp = append(dp, v)
				}
			}
		}
		ans += len(dp)
	}
	Fprint(out, n-k-ans)
}

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

package main

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

// github.com/EndlessCheng/codeforces-go
func CF1437E(_r io.Reader, out io.Writer) {
	in := bufio.NewReader(_r)
	lis := func(a []int) int {
		dp := []int{}
		for _, v := range a {
			if p := sort.SearchInts(dp, v+1); p < len(dp) {
				dp[p] = v
			} else {
				dp = append(dp, v)
			}
		}
		return len(dp)
	}

	var n, k, ans int
	Fscan(in, &n, &k)
	a := make([]int, n+2)
	a[0] = -1e8
	for i := 1; i <= n; i++ {
		Fscan(in, &a[i])
	}
	a[n+1] = 2e9
	b := make([]int, k+2)
	for i := 1; i <= k; i++ {
		Fscan(in, &b[i])
	}
	b[k+1] = n + 1

	for i := 0; i <= k; i++ {
		l, r := b[i], b[i+1]
		if a[r]-a[l] < r-l {
			Fprint(out, -1)
			return
		}
		c := []int{}
		for j := l + 1; j < r; j++ {
			v := a[j]
			if v-a[l] >= j-l && a[r]-v >= r-j {
				c = append(c, v-j)
			}
		}
		ans += lis(c)
	}
	Fprint(out, n-k-ans)
}

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

package main

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

// github.com/EndlessCheng/codeforces-go
func CF1437E(_r io.Reader, _w io.Writer) {
	out := bufio.NewWriter(_w)
	defer out.Flush()
	_i, buf := 1<<12, make([]byte, 1<<12)
	rc := func() byte {
		if _i == 1<<12 {
			_r.Read(buf)
			_i = 0
		}
		b := buf[_i]
		_i++
		return b
	}
	r := func() (x int) {
		b := rc()
		for ; '0' > b; b = rc() {
		}
		for ; '0' <= b; b = rc() {
			x = x*10 + int(b&15)
		}
		return
	}
	n, k := r(), r()
	a := make([]int, n+2)
	a[0] = -1e8
	for i := 1; i <= n; i++ {
		a[i] = r()
	}
	a[n+1] = 2e9
	b := make([]int, k+2)
	for i := 1; i <= k; i++ {
		b[i] = r()
	}
	b[k+1] = n + 1

	ans := 0
	for i := 0; i <= k; i++ {
		l, r := b[i], b[i+1]
		if a[r]-a[l] < r-l {
			Fprint(out, -1)
			return
		}
		dp := []int{}
		for j := l + 1; j < r; j++ {
			if v := a[j] - j; a[l]-l <= v && v <= a[r]-r {
				if p := sort.SearchInts(dp, v+1); p < len(dp) {
					dp[p] = v
				} else {
					dp = append(dp, v)
				}
			}
		}
		ans += len(dp)
	}
	Fprint(out, n-k-ans)
}

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