Bob is a competitive programmer. He wants to become red, and for that he needs a strict training regime. He went to the annual meeting of grandmasters and asked $$$n$$$ of them how much effort they needed to reach red."Oh, I just spent $$$x_i$$$ hours solving problems", said the $$$i$$$-th of them. Bob wants to train his math skills, so for each answer he wrote down the number of minutes ($$$60 \cdot x_i$$$), thanked the grandmasters and went home. Bob could write numbers with leading zeroes — for example, if some grandmaster answered that he had spent $$$2$$$ hours, Bob could write $$$000120$$$ instead of $$$120$$$.Alice wanted to tease Bob and so she took the numbers Bob wrote down, and for each of them she did one of the following independently:   rearranged its digits, or  wrote a random number. This way, Alice generated $$$n$$$ numbers, denoted $$$y_1$$$, ..., $$$y_n$$$.For each of the numbers, help Bob determine whether $$$y_i$$$ can be a permutation of a number divisible by $$$60$$$ (possibly with leading zeroes).

The first line contains a single integer $$$n$$$ ($$$1 \leq n \leq 418$$$) — the number of grandmasters Bob asked. Then $$$n$$$ lines follow, the $$$i$$$-th of which contains a single integer $$$y_i$$$ — the number that Alice wrote down. Each of these numbers has between $$$2$$$ and $$$100$$$ digits '0' through '9'. They can contain leading zeroes.

Output $$$n$$$ lines. For each $$$i$$$, output the following. If it is possible to rearrange the digits of $$$y_i$$$ such that the resulting number is divisible by $$$60$$$, output "red" (quotes for clarity). Otherwise, output "cyan".

NoteIn the first example, there is one rearrangement that yields a number divisible by $$$60$$$, and that is $$$360$$$.In the second example, there are two solutions. One is $$$060$$$ and the second is $$$600$$$.In the third example, there are $$$6$$$ possible rearrangments: $$$025$$$, $$$052$$$, $$$205$$$, $$$250$$$, $$$502$$$, $$$520$$$. None of these numbers is divisible by $$$60$$$.In the fourth example, there are $$$3$$$ rearrangements: $$$228$$$, $$$282$$$, $$$822$$$.In the fifth example, none of the $$$24$$$ rearrangements result in a number divisible by $$$60$$$.In the sixth example, note that $$$000\dots0$$$ is a valid solution.

package main

import (
	"fmt"
	"strconv"
)

func main() {
	var n int
	_, _ = fmt.Scanf("%d\n", &n)
	for i := 0; i < n; i++ {
		var number string
		_, _ = fmt.Scanf("%s\n", &number)
		numberRunes := []rune(number)
		isEven := false
		isDivBy3 := false
		hasZero := false
		zeroOnly := true
		firstZero := false
		sum := 0
		for _, numberRune := range numberRunes {
			numberInt, _ := strconv.Atoi(string(numberRune))
			if numberInt == 0 {
				if firstZero {
					isEven = true
				}
				firstZero = true
			}
			if numberInt != 0 {
				zeroOnly = false
			}
			if numberInt%2 == 0 && numberInt != 0 {
				isEven = true
			}
			if numberInt == 0 {
				hasZero = true
			}
			sum += numberInt
		}
		if sum % 3 == 0 {
			isDivBy3 = true
		}
		if (isEven && isDivBy3 && hasZero) || zeroOnly {
			fmt.Printf("red\n")
		} else {
			fmt.Printf("cyan\n")
		}
	}
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scanf("%d\n", &n)
	for i := 0; i < n; i++ {
		val := ""
		fmt.Scanf("%s\n", &val)
		isZero := false
		isEven := false
		sum := 0
		if val == "0" {
			fmt.Println("red")
		} else {
			for _, ch := range val {
				if (ch-'0')%2 == 0 {
					if !(ch == '0' && !isZero) {
						isEven = true
					}
				}
				if ch == '0' {
					isZero = true
				}

				sum += int(ch - '0')
			}
			if sum%3 == 0 && isZero && isEven {
				fmt.Println("red")
			} else {
				fmt.Println("cyan")
			}
		}
	}
}

package main

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

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

	var t int
	var s []byte
	for Fscan(in, &t); t > 0; t-- {
		Fscan(in, &s)
		cnt := [10]int{}
		sum := 0
		for _, c := range s {
			c -= '0'
			cnt[c]++
			sum += int(c)
		}
		if sum != 0 && (cnt[0] == 0 || cnt[0] == 1 && cnt[0]+cnt[2]+cnt[4]+cnt[6]+cnt[8] == 1 || sum%3 != 0) {
			Fprintln(out, "cyan")
		} else {
			Fprintln(out, "red")
		}
	}
}

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

package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	nn := 0
	fmt.Fscanf(in, "%d\n", &nn)
	for ii := 0; ii < nn; ii++ {
		s := ""
		fmt.Fscanf(in, "%s\n", &s)
		zero := 0
		evenNotZero := false
		sum := 0
		for i := 0; i < len(s); i++ {
			sum += int(s[i] - '0')
			if s[i] == '0' {
				zero++
			}
			if int(s[i]-'0') > 0 && int(s[i]-'0')%2 == 0 {
				evenNotZero = true
			}
		}
		if zero > 1 {
			evenNotZero = true
		}
		if zero > 0 && sum%3 == 0 && evenNotZero {
			fmt.Fprintf(out, "red\n")
		} else {
			fmt.Fprintf(out, "cyan\n")
		}
	}
	return
}

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

package main

import (
	"fmt"
	"strconv"
)

func main() {
	var n int
	_, _ = fmt.Scanf("%d\n", &n)
	for i := 0; i < n; i++ {
		var number string
		_, _ = fmt.Scanf("%s\n", &number)
		numberRunes := []rune(number)
		isEven := false
		isDivBy3 := false
		hasZero := false
		zeroOnly := true
		sum := 0
		for _, numberRune := range numberRunes {
			numberInt, _ := strconv.Atoi(string(numberRune))
			if numberInt != 0 {
				zeroOnly = false
			}
			if numberInt%2 == 0 && numberInt != 0 {
				isEven = true
			}
			if numberInt == 0 {
				hasZero = true
			}
			sum += numberInt
		}
		if sum % 3 == 0 {
			isDivBy3 = true
		}
		if (isEven && isDivBy3 && hasZero) || zeroOnly {
			fmt.Printf("red\n")
		} else {
			fmt.Printf("cyan\n")
		}
	}
}

package main

import "fmt"

func main() {
	var n int
	fmt.Scanf("%d", &n)
	for i := 0; i < n; i++ {
		val := ""
		fmt.Scanf("%s", &val)
		isZero := false
		isEven := false
		sum := 0
		if val == "0" {
			fmt.Println("red")
		} else {
			for _, ch := range val {
				if (ch-'0')%2 == 0 {
					if !(ch == '0' && !isZero) {
						isEven = true
					}
				}
				if ch == '0' {
					isZero = true
				}

				sum += int(ch - '0')
			}
			if sum%3 == 0 && isZero && isEven {
				fmt.Println("red")
			} else {
				fmt.Println("cyan")
			}
		}
	}
}


You are given n × m table. Each cell of the table is colored white or black. Find the number of non-empty sets of cells such that:  All cells in a set have the same color.  Every two cells in a set share row or column.

The first line of input contains integers n and m (1 ≤ n, m ≤ 50) — the number of rows and the number of columns correspondingly. The next n lines of input contain descriptions of rows. There are m integers, separated by spaces, in each line. The number equals 0 if the corresponding cell is colored white and equals 1 if the corresponding cell is colored black.

Output single integer  — the number of non-empty sets from the problem description.

NoteIn the second example, there are six one-element sets. Additionally, there are two two-element sets, the first one consists of the first and the third cells of the first row, the second one consists of the first and the third cells of the second row. To sum up, there are 8 sets.

package main

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

var memo [60][60]int64

func solve() {
	n := readInt()
	m := readInt()

	f := make([][]bool, n)
	for i := 0; i < n; i++ {
		f[i] = make([]bool, m)
		for j := 0; j < m; j++ {
			f[i][j] = readInt() == 1
		}
	}
	res := int64(0)
	for i := 0; i < n; i++ {
		cnt := 0
		for j := 0; j < m; j++ {
			if f[i][j] {
				cnt++
			}
		}
		res += getFor(cnt)
		res += getFor(m - cnt)
	}
	for i := 0; i < m; i++ {
		cnt := 0
		for j := 0; j < n; j++ {
			if f[j][i] {
				cnt++
			}
		}
		res += getFor(cnt) - int64(cnt)
		res += getFor(n-cnt) - int64(n-cnt)
	}
	fmt.Println(res)
}

func getFor(n int) int64 {
	res := int64(0)
	for k := 1; k <= n; k++ {
		res += rec(n, k)
	}
	return res
}

func rec(n, k int) int64 {
	if n == k {
		return 1
	}
	if k == 1 {
		return int64(n)
	}
	if memo[n][k] != 0 {
		return memo[n][k]
	}
	res := rec(n-1, k-1) + rec(n-1, k)
	memo[n][k] = res
	return res
}

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

var scanner *bufio.Scanner

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

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

// IO

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

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

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

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

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


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 \le x \le n$$$ and $$$x$$$ is interesting.

The first line contains one integer $$$t$$$ ($$$1 \le t \le 1000$$$)  — number of test cases. Then $$$t$$$ lines follow, the $$$i$$$-th line contains one integer $$$n$$$ ($$$1 \le n \le 10^9$$$) for the $$$i$$$-th test case.

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

NoteThe first interesting number is equal to $$$9$$$.

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


You are given a positive integer $$$x$$$. Check whether the number $$$x$$$ is representable as the sum of the cubes of two positive integers.Formally, you need to check if there are two integers $$$a$$$ and $$$b$$$ ($$$1 \le a, b$$$) such that $$$a^3+b^3=x$$$.For example, if $$$x = 35$$$, then the numbers $$$a=2$$$ and $$$b=3$$$ are suitable ($$$2^3+3^3=8+27=35$$$). If $$$x=4$$$, then no pair of numbers $$$a$$$ and $$$b$$$ is suitable.

The first line contains one integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. Then $$$t$$$ test cases follow. Each test case contains one integer $$$x$$$ ($$$1 \le x \le 10^{12}$$$). Please note, that the input for some test cases won't fit into $$$32$$$-bit integer type, so you should use at least $$$64$$$-bit integer type in your programming language.

For each test case, output on a separate line:    "YES" if $$$x$$$ is representable as the sum of the cubes of two positive integers.  "NO" otherwise.  You can output "YES" and "NO" in any case (for example, the strings yEs, yes, Yes and YES will be recognized as positive).

NoteThe number $$$1$$$ is not representable as the sum of two cubes.The number $$$2$$$ is represented as $$$1^3+1^3$$$.The number $$$4$$$ is not representable as the sum of two cubes.The number $$$34$$$ is not representable as the sum of two cubes.The number $$$35$$$ is represented as $$$2^3+3^3$$$.The number $$$16$$$ is represented as $$$2^3+2^3$$$.The number $$$703657519796$$$ is represented as $$$5779^3+7993^3$$$.

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


Ilya is a very good-natured lion. He likes maths. Of all mathematical objects, his favourite one is matrices. Now he's faced a complicated matrix problem he needs to solve.He's got a square 2n × 2n-sized matrix and 4n integers. You need to arrange all these numbers in the matrix (put each number in a single individual cell) so that the beauty of the resulting matrix with numbers is maximum.The beauty of a 2n × 2n-sized matrix is an integer, obtained by the following algorithm:  Find the maximum element in the matrix. Let's denote it as m.  If n = 0, then the beauty of the matrix equals m. Otherwise, a matrix can be split into 4 non-intersecting 2n - 1 × 2n - 1-sized submatrices, then the beauty of the matrix equals the sum of number m and other four beauties of the described submatrices. As you can see, the algorithm is recursive.Help Ilya, solve the problem and print the resulting maximum beauty of the matrix.

The first line contains integer 4n (1 ≤ 4n ≤ 2·106). The next line contains 4n integers ai (1 ≤ ai ≤ 109) — the numbers you need to arrange in the 2n × 2n-sized matrix.

On a single line print the maximum value of the beauty of the described matrix. Please, do not use the %lld specifier to read or write 64-bit integers in С++. It is preferred to use the cin, cout streams or the %I64d specifier.

NoteConsider the second sample. You need to arrange the numbers in the matrix as follows:1 23 4Then the beauty of the matrix will equal: 4 + 1 + 2 + 3 + 4 = 14.

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

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

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


Petya has a rectangular Board of size $$$n \times m$$$. Initially, $$$k$$$ chips are placed on the board, $$$i$$$-th chip is located in the cell at the intersection of $$$sx_i$$$-th row and $$$sy_i$$$-th column.In one action, Petya can move all the chips to the left, right, down or up by $$$1$$$ cell.If the chip was in the $$$(x, y)$$$ cell, then after the operation:   left, its coordinates will be $$$(x, y - 1)$$$;  right, its coordinates will be $$$(x, y + 1)$$$;  down, its coordinates will be $$$(x + 1, y)$$$;  up, its coordinates will be $$$(x - 1, y)$$$. If the chip is located by the wall of the board, and the action chosen by Petya moves it towards the wall, then the chip remains in its current position.Note that several chips can be located in the same cell.For each chip, Petya chose the position which it should visit. Note that it's not necessary for a chip to end up in this position.Since Petya does not have a lot of free time, he is ready to do no more than $$$2nm$$$ actions.You have to find out what actions Petya should do so that each chip visits the position that Petya selected for it at least once. Or determine that it is not possible to do this in $$$2nm$$$ actions.

The first line contains three integers $$$n, m, k$$$ ($$$1 \le n, m, k \le 200$$$) — the number of rows and columns of the board and the number of chips, respectively. The next $$$k$$$ lines contains two integers each $$$sx_i, sy_i$$$ ($$$ 1 \le sx_i \le n, 1 \le sy_i \le m$$$) — the starting position of the $$$i$$$-th chip. The next $$$k$$$ lines contains two integers each $$$fx_i, fy_i$$$ ($$$ 1 \le fx_i \le n, 1 \le fy_i \le m$$$) — the position that the $$$i$$$-chip should visit at least once.

In the first line print the number of operations so that each chip visits the position that Petya selected for it at least once. In the second line output the sequence of operations. To indicate operations left, right, down, and up, use the characters $$$L, R, D, U$$$ respectively. If the required sequence does not exist, print -1 in the single line.

/*
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...)
}