let stop = '';
process.stdin.on('data', c => stop += c);
process.stdin.on('end', () => {
    const {EOL} = require('os');
    const lines = stop.split(EOL);
    var t = lines[0];
    for(i = 1; i <= t; i++){
        var a = lines[i].split(' ').map(Number);
        var n = a[0], l = a[1], r = a[2];
        var flag = true;
        for(j = 1; j <= n; j++){
            if(Math.floor(r / j) * j < l){
                flag = false;
            }
        }
        if(!flag){
            console.log('NO');
        }else{
            console.log('YES');
            var ans = '';
            for(j = 1; j <= n; j++){
                ans += Math.floor(r / j) * j + ' ';
            }
            console.log(ans);
        }
    }
});

process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '', currentLine = 0;
process.stdin.on('data', inputStdin => { inputString += inputStdin; });
process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => string.trim());
    main();
});
function readLine() {
    return inputString[currentLine++];
}

function main() {
    const t = parseInt(readLine(), 10);
    for(let i = 0; i < t; i++){
        const arr = readLine().split(' ').map(p => +p);
        myFunc(arr[0], arr[1], arr[2]);
    }
}

function myFunc(n, l, r){
    let resp = [], aux;
    for(let i = 1; i <= n; i++){
        if(l%i == 0) resp.push(l);
        else{
            aux = parseInt(l/i)*i + i;
            if(aux > r){
                console.log('NO');
                return;
            }
            resp.push(aux);
        }
    }

    console.log('YES');
    let imprime = resp.join(' ');
    console.log(imprime);

}

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function readLine() {
    return inputString[currentLine++];
}

/*
 * Complete the 'queensAttack' function below.
 *
 * The function is expected to return an INTEGER.
 * The function accepts following parameters:
 *  1. INTEGER n
 *  2. INTEGER k
 *  3. INTEGER r_q
 *  4. INTEGER c_q
 *  5. 2D_INTEGER_ARRAY obstacles
 */
const generateArray = (start, end, n) => {
  const resultArray = [];

  if (n > end) {
    console.log('NO');
    return 'invalid';
  }

  for (let i = 1; i <= n; i += 1) {
    // start <= element <= end
    // start <=  i * y  <= end
    // start/i <= y <= end

    const y = Math.ceil(start / i);
    if (y > end / i) {
        console.log('NO');
      return 'invalid';
    }

    resultArray.push(i * y);
  }
  console.log('YES');
  console.log(resultArray.join(' '));
  return resultArray;
};

function main() {

    const numberOFTestCases = readLine();

    for(let i=0; i<numberOFTestCases;i++){
        const [n,start,end]= readLine().split(' ');
        generateArray(parseInt(start),parseInt(end),parseInt(n));
    }

}

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', (inputStdin) => {
  inputString += inputStdin;
});

process.stdin.on('end', (_) => {
  inputString = inputString
    .trim()
    .split('\n')
    .map((string) => {
      return string.trim();
    });

  main();
});

function readline() {
  return inputString[currentLine++];
}
// Make a Snippet for the code above this and then write your logic in main();

function main() {
  const t = readline();

  for (let i = 0; i < t; i++) {
    const [n, l, r] = readline().split(' ').map(num => +num);

    // console.log(`=----------------testcase ${i + 1}----------------=`);
    // console.log('q', q);
    // console.log('a', a);

    const output = f(n, l, r);

    console.log(output);
  }
}

function f(n, l, r) {
  // console.log('=>>>>', n, l, r)
  const ans = [];
  for(let i = 1; i <= n; i ++) {
    const factor = Math.floor(r / i);
    const aFactor = factor * i;
    if(aFactor >= l) ans.push(aFactor)
    else return 'NO';
  }
  return 'YES\n'+ans.join(' ')
}

'use strict';

function solve(n, l, r) {
  const res = new Array(n);
  for (let i = 1; i <= n; i++) {
    const x = Math.ceil(l / i);
    if (x * i > r) return 'NO';
    res[i - 1] = x * i;
  }
  return `YES\n${res.join(' ')}`;
}

async function main(read) {
  try {
    let t = Number(await read());
    let res = new Array(t);
    for (let i = 0; i < t; i++) {
      const [n, m, k] = (await read()).split(' ').map(Number);
      res[i] = solve(n, m, k);
    }
    return res.join('\n');
  } catch (error) {
    console.log(error);
  }
}

let inputs,
    str = '';
function read() {
  return inputs.next().value.trim();
}
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', input => str += input);
process.stdin.on('end', async () => {
  inputs = str.split('\n').values();
  const output = await main(read);
  process.stdout.write(output);
});

const fs = require("fs");
const input = fs.readFileSync(0, 'utf8').trim().split('\r\n');
let currentline = 0;
function readline(){
      return input[currentline++];
}

function alph() {
  var f = 'abcdefghijklmnopqrstuvwxyz';
  return f;
}
function Alph() {
  var f = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
  return f;
}
function max(x,y) {
  return x >=y ? x : y;
}
function min(x,y) {
  return x <=y ? x : y;
}
function abs(x) {
  return x < 0 ? x*(-1) : x;
}
// console.log(input)
var T = readline();
// var inf = 1000000000000;
for(var tc=1;tc<=T;tc++) {
 // var n = readline()//.split(' ').map((x) => parseInt(x));
  var [n,l,r] = readline().split(' ').map((x) => parseInt(x));
  var ans = [];
  // ans.push(l);
  for(var i=1;i<=n;i++) {
    if(l%i == 0) {
      ans.push(l)
      continue;
    }
    var val = (l-(l%i))+i;
    if(val >= l && val <= r) ans.push(val);
  }
  // console.log(ans)
  if(ans.length < n) console.log("NO")
  else {
    console.log("Yes")
    console.log(ans.join(" "));
  }
}

var tests = parseInt(readline());
    for (var t=0; t < tests; t++) {
        var nlr = readline().split(' ').map(x=>parseInt(x));
        var ans = [];
        var reply = 'YES';
        for (var i = 1; i <= nlr[0];i++) {
            var min = (Math.floor((nlr[1]-1)/i) + 1) * i;
            if (min <= nlr[2]) {
                ans.push(min);
            } else {
                reply = 'NO';
                break;
            }
        }
        print(reply);
        if (reply == 'YES') {
            print(ans.join(' '));
        }
    }

const main = () => {

	// gcds must be 1, 2, 3...
	var t = readInt();
	var allans = [];
	for (var zz = 0; zz < t; zz++) {
		var arr = readIntArr();
		var n, l, r, ans, ans2;
		n = arr[0]; l = arr[1]; r = arr[2];
		ans = 'YES';
		ans2 = [];
		for (var i = 1; i < n + 1; i++) {
			var val = parseInt(r / i) * i;
			if (val < l) {
				ans = 'NO';
				break;
			}
			ans2.push(val);
		}
		allans.push([ans]);
		if (ans === 'YES')
			allans.push(ans2);
	}
	multiLineArrayOfArraysPrint(allans);

	return;
}

const readInt = () => parseInt(readline());
const readString = () => readline();
const readIntArr = () => readline().split(" ").map(zzzz => parseInt(zzzz));
const parseLong = (string) => { // javascript's largest long is < (1<<62)
	var n = string.length;
	var res = 0;
	for (var i = 0; i < n; i++) {
		res *= 10;
		res += parseInt(string[i]);
	}
	return res;
}
const readLong = () => parseLong(readLong());
const readLongArr = () => readline().split(" ").map(zzzz => parseLong(zzzz));
const oneLineArrayPrint = (arr) => print(arr.map(zzzz => zzzz.toString()).join(' '));
const multiLineArrayPrint = (arr) => print(arr.map(zzzz => zzzz.toString()).join('\n'));
const multiLineArrayOfArraysPrint = (arr) => print(arr.map(yyyy => yyyy.map(zzzz => zzzz.toString()).join(' ')).join('\n'));
const makeArr = (defaultVal, dimensionsArr) => {
	var n = dimensionsArr.length;
	if (n === 1) return Array(dimensionsArr[0]).fill(defaultVal);
	else {
		var temp = [];
		for (var i = 0; i < dimensionsArr[0]; i++)
			temp.push(makeArr(defaultVal, dimensionsArr.slice(1)));
		return temp;
	}
}

for (_ = 0; _ < 1; _++) {
	main();
}

// newline for testing
 //newline for testing
// codeforces js cannot use "let" keyword. use "var" instead
// codeforces js cannot destructure arrays

process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '', currentLine = 0;
process.stdin.on('data', inputStdin => { inputString += inputStdin; });
process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => string.trim());
    main();
});
function readLine() {
    return inputString[currentLine++];
}

function main() {
    const t = parseInt(readLine(), 10);
    for(let i = 0; i < t; i++){
        const arr = readLine().split(' ').map(p => +p);
        myFunc(arr[0], arr[1], arr[2]);
    }
}

function myFunc(n, l, r){
    let resp = [];
    for(let i = 1; i <= n; i++){
        if(l%i == 0) resp.push(l);
        else{
            l = parseInt(l/i)*i + i;
            if(l > r){
                console.log('NO');
                return;
            }
            resp.push(l);
        }
    }
    if(resp.length >= n){
        console.log('YES');
        console.log(...resp);
    }
    else{
        console.log('NO');
    }

}

process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '', currentLine = 0;
process.stdin.on('data', inputStdin => { inputString += inputStdin; });
process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => string.trim());
    main();
});
function readLine() {
    return inputString[currentLine++];
}

function main() {
    const t = parseInt(readLine(), 10);
    for(let i = 0; i < t; i++){
        const arr = readLine().split(' ').map(p => +p);
        myFunc(arr[0], arr[1], arr[2]);
    }
}

function myFunc(n, l, r){
    let resp = [];
    for(let i = 1; i <= n; i++){
        if(l%i == 0) resp.push(l);
        else{
            l = parseInt(l/i)*i + i;
            if(l > r){
                console.log('NO');
                return;
            }
            resp.push(l);
        }
    }
    console.log('YES');
    console.log(...resp);
}

    process.stdin.resume();
    process.stdin.setEncoding('utf-8');
    let inputString = '', currentLine = 0;
    process.stdin.on('data', inputStdin => { inputString += inputStdin; });
    process.stdin.on('end', _ => {
        inputString = inputString.trim().split('\n').map(string => string.trim());
        main();
    });
    function readLine() {
        return inputString[currentLine++];
    }

    function main() {
        const t = parseInt(readLine(), 10);
        for(let i = 0; i < t; i++){
            const arr = readLine().split(' ').map(p => +p);
            let result = myFunc(arr[0], arr[1], arr[2]);
        }
    }

    function gcd(a,  b){
        if (a == 0) return b;
        return gcd(b % a, a);
    }

    function myFunc(n, l, r){
        let map = new Map();
        let resp = [];
        let cont = 1;
        let aux;

        for(let j = l; j <= r; j++){
            aux = gcd(cont, j);
            if(!map.has(aux)){
                map.set(aux, j);
                resp.push(j);
                cont++
            }
            if(resp.length >= n) break;
        }

        // console.log(map);
        if(resp.length >= n){
            console.log('YES');
            console.log(...resp);
        }
        else{
            console.log('NO');
        }

    }

    process.stdin.resume();
    process.stdin.setEncoding('utf-8');
    let inputString = '', currentLine = 0;
    process.stdin.on('data', inputStdin => { inputString += inputStdin; });
    process.stdin.on('end', _ => {
        inputString = inputString.trim().split('\n').map(string => string.trim());
        main();
    });
    function readLine() {
        return inputString[currentLine++];
    }

    function main() {
        const t = parseInt(readLine(), 10);
        for(let i = 0; i < t; i++){
            const arr = readLine().split(' ').map(p => +p);
            let result = myFunc(arr[0], arr[1], arr[2]);
        }
    }

    function gcd(a,  b){
        if (a == 0) return b;
        return gcd(b % a, a);
    }

    function myFunc(n, l, r){
        let map = new Map();
        let used = new Map();
        let resp = [];
        let cont = 0;
        let aux;
        for(let i = 0; i < n; i++){
            if(cont >= n) break;
            for(let j = l; j <= r; j++){
                aux = gcd(i+1, j);
                if(!map.has(aux) && !used.has(j)){
                    map.set(aux, i+1);
                    used.set(j, 1);
                    resp.push(j);
                    cont++;
                    break;
                }
            }
        }
        if(cont >= n){
            console.log('YES');
            console.log(...resp);
        }
        else{
            console.log('NO');
        }

    }

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function readLine() {
    return inputString[currentLine++];
}

/*
 * Complete the 'queensAttack' function below.
 *
 * The function is expected to return an INTEGER.
 * The function accepts following parameters:
 *  1. INTEGER n
 *  2. INTEGER k
 *  3. INTEGER r_q
 *  4. INTEGER c_q
 *  5. 2D_INTEGER_ARRAY obstacles
 */
const generateArray = (start, end, n) => {
  const resultArray = [];

  if (n > end) {
    console.log('NO');
    return 'invalid';
  }

  for (let i = 1; i <= n; i += 1) {
    // start <= element <= end
    // start <=  i * y  <= end
    // start/i <= y <= end

    const y = Math.ceil(start / i);
    if (y > end / i) {
        console.log('NO');
      return 'invalid';
    }

    resultArray.push(i * y);
  }
  console.log('YES');
  console.log(resultArray);
  return resultArray;
};

function main() {

    const numberOFTestCases = readLine();

    for(let i=0; i<numberOFTestCases;i++){
        const [n,start,end]= readLine().split(' ');
        generateArray(parseInt(start),parseInt(end),parseInt(n));
    }

}

function gcd(a, b) {
        while (a != 0 && b != 0) {
            if (a > b) {
                a = a % b;
            } else {
                b = b % a;
            }
        }
        return Math.max(a, b);
    }

    var tests = parseInt(readline());
    for (var t=0; t < tests; t++) {
        var nlr = readline().split(' ').map(x=>parseInt(x));
        var set = new Set();
        var ans = [];
        for (var i = 0; i < nlr[0];i++) {
            ans.push(0);
        }
        for (var i = nlr[1]; i <= nlr[2]; i++) {
            for (var j = 1; j<=nlr[0]; j++) {
                if (ans[j-1] == 0 ) {
                    var d = gcd(j, i);
                    if (!set.has(d)) {
                        ans[j-1] = i;
                        set.add(d);
                        break;
                    }
                }
            }
        }
        var reply = 'YES';
        for (var i = 0; i < nlr[0];i++) {
            if (ans[i] == 0) {
                reply = 'NO';
            }
        }
        print(reply);
        if (reply == 'YES') {
            print(ans.join(' '));
        }
    }


// main.apply(0, readline().split(' ').map(function(v) {
    // return v - 0;
// }));
// function main(d, L, v1, v2) {
    // print((L - d) / (v1 + v2));
// }

// var print = console.log.bind(console);

// var lines =
// `3
// 1 1
// 2 3
// 3 5`.split("\n");
// function readline() {
    // var l = lines.n || 0;
    // lines.n = l + 1;
    // return lines[l];
// }

var n = readline() - 0;
var a={}, b={};
for (var i = -1005; i <= 2005; i++) {
    a[i] = b[i] = 0;
}
for (var i = 0; i < n; i++) {
    var m = readNums();
    a[m[1] - m[0] + 1]++;
    b[m[1] + m[0] - 1]++;
}
var sum = 0;
for (var i = -1005; i <= 2005; i++) {
    sum += calc(a[i]) + calc(b[i]);
}
print(sum);

function calc(n) {
    if (n > 1)
        return n * (n - 1) / 2;
    return 0;
}

function readNums() {
    return readline().split(' ').map(function(v) {
        return v - 0;
    })
}

var n = Number(readline()); //number of bishops

var bishop_position = [];

for (var i = 0; i < n; i++) {
	var bishop = readline().split(' ').map(Number);
	bishop_position[i] = {row: bishop[0], col: bishop[1]};
}

var bishop1 = [];

for (var i = 0; i < n; i++) {
	bishop1[i] = bishop_position[i].row - bishop_position[i].col;
}

var counts = {};

for (var i = 0; i < n; i++) {
	if (bishop1[i] in counts) {
		counts[bishop1[i]] += 1;
	} else {
		counts[bishop1[i]] = 1;
	}
}

var nc2 = function(m) {
	return m * (m - 1) / 2;
}

var attack = 0;

for (var key in counts) {
	attack += nc2(counts[key]);
}

// checking for other diagonal
var bishop2 = [];

for (var i = 0; i < n; i++) {
	bishop2[i] = bishop_position[i].row + bishop_position[i].col;
}

var counts2 = {};

for (var i = 0; i < n; i++) {
	if (bishop2[i] in counts2) {
		counts2[bishop2[i]] += 1;
	} else {
		counts2[bishop2[i]] = 1;
	}
}

for (var key in counts2) {
	attack += nc2(counts2[key]);
}

print(attack);

var maxSize = 1000;
var n = Number(readline());
var arr1 = new Array(2 * maxSize - 1);
var arr2 = new Array(2 * maxSize - 1);
for (var i = 0; i < arr1.length; ++i) {
    arr1[i] = arr2[i] = 0;
}

for (var i = 0; i < n; ++i) {
    var num = readline().split(" ", 2);
    var a = Number(num[0]);
    var b = Number(num[1]);
    ++arr1[b - a + maxSize - 1];
    ++arr2[a + b - 2];
}

function getCn2(n) {
    return n * (n - 1) / 2;
}

var sum = 0;
for (var i = 1; i < 2 * maxSize - 2; ++i) {
    sum += getCn2(arr1[i]);
    sum += getCn2(arr2[i]);
}

print(sum);

var result = 0;

var n = parseInt(readline());
var bishops = [];
var l = new Object();
var r = new Object();
var bishop;
for (var i = 0; i < n; i++) {
    bishop = readline().split(' ').map(Number);
    if (l[(bishop[0] + bishop[1])]) {
        l[(bishop[0] + bishop[1])]++;
    } else {
        l[(bishop[0] + bishop[1])] = 1;
    }
    if (r[(bishop[0] - bishop[1])]) {
        r[(bishop[0] - bishop[1])]++;
    } else {
        r[(bishop[0] - bishop[1])] = 1;
    }
}

for(var index in l) {
    result += l[index] * (l[index] - 1) / 2;
}
for(var index in r) {
    result += r[index] * (r[index] - 1) / 2;
}

print(result);

// main.apply(0, readline().split(' ').map(function(v) {
    // return v - 0;
// }));
// function main(d, L, v1, v2) {
    // print((L - d) / (v1 + v2));
// }

// var print = console.log.bind(console);

// var lines =
// `3
// 1 1
// 2 3
// 3 5`.split("\n");
// function readline() {
    // var l = lines.n || 0;
    // lines.n = l + 1;
    // return lines[l];
// }

var n = readline() - 0;
var a={}, b={};
for (var i = -1000; i <= 1000; i++) {
    a[i] = b[i] = 0;
}
for (var i = 0; i < n; i++) {
    var m = readNums();
    a[m[1] - m[0] + 1]++;
    b[m[1] + m[0] - 1]++;
}
var sum = 0;
for (var i = -1000; i <= 1000; i++) {
    sum += calc(a[i]) + calc(b[i]);
}
print(sum);

function calc(n) {
    if (n > 1)
        return n * (n - 1) / 2;
    return 0;
}

function readNums() {
    return readline().split(' ').map(function(v) {
        return v - 0;
    })
}

var n = Number(readline());
var num1 = 0, num2 = 0;

for (var i = 0; i < n; ++i) {
    var num = readline().split(" ", 2);
    var a = Number(num[0]);
    var b = Number(num[1]);
    if (a === b) {
        ++num1;
    }
    if (a + b === n + 1) {
        ++num2;
    }
}

print(num1 * (num1 - 1) /2 + num2 * (num2 - 1) / 2);

var maxSize = 1000;
var n = Number(readline());
var arr1 = new Array(2 * maxSize - 1);
var arr2 = new Array(2 * maxSize - 1);
for (var i = 0; i < n; ++i) {
    arr1[i] = arr2[i] = 0;
}

for (var i = 0; i < n; ++i) {
    var num = readline().split(" ", 2);
    var a = Number(num[0]);
    var b = Number(num[1]);
    ++arr1[b - a + maxSize - 1];
    ++arr2[a + b - 2];
}

function getCn2(n) {
    return n * (n - 1) / 2;
}

var sum = 0;
for (var i = 1; i < 2 * maxSize - 2; ++i) {
    sum += getCn2(arr1[i]);
    sum += getCn2(arr2[i]);
}

print(sum);

var n = Number(readline());
var num1 = 0, num2 = 0;

for (var i = 0; i < n; ++i) {
    var num = readline().split(" ", 2);
    var a = Number(num[0]);
    var b = Number(num[1]);
    if (a === b) {
        ++num1;
    }
    if (a + b === 1001) {
        ++num2;
    }
}

print(num1 * (num1 - 1) /2 + num2 * (num2 - 1) / 2);


process.stdin.resume()
process.stdin.setEncoding('utf-8')

let input = ''
let ptr = 0
process.stdin.on('data', (i) => {
  input += i
})

process.stdin.on('end', () => {
  input = input.split('\n').map(a => a.replace(/(\r\n|\n|\r)/gm, ''))
  main()
})

function wr(...x) {
  console.log(...x)
}

function sort(a, inc = true) {
  if (inc) a.sort((a, b) => a - b)
  else a.sort((a, b) => b - a)
}

function readInt() {
  return parseInt(input[ptr++])
}

function readString() {
  return input[ptr++]
}

function readStrings() {
  return input[ptr++].split(' ')
}

function readInts() {
  return input[ptr++].split(' ').map(a => parseInt(a))
}

function main() {
  let t = readInt()
  while(t--) {
    const n = readInt()
    const a = readInts()
    const b = readInts()

    if(a[0] !== b[0]) {
      wr('NO')
    }
    else {
      let flags = [false, false, false]
      let f = true
      if(a[0] < 0) flags[2] = true
      else flags[a[0]] = true
      for(let i = 1; i < n && f; i++) {
        let d = b[i] - a[i]
        if(d > 0) {
          if(!flags[1]) {
            f = false
          }
        }
        else if(d < 0) {
          if(!flags[2]) {
            f = false
          }
        }
        if(a[i] < 0) flags[2] = true
        else flags[a[i]] = true
      }
      if(f) wr('YES')
      else wr('NO')
    }
  }
}

Main();
function myout(t){print(t);}//standard output
function next(){return readline();}
function nextInt(){return myconv(next(),1);}
function nextStrArray(){return myconv(next(),2);}//半角スペース分割
function nextIntArray(){return myconv(next(),4);}//半角スペース + 数値化
function nextCharArray(){return myconv(next(),6);}//1文字分割
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す
//6:1文字に分割  7:1文字に分割し、数値配列へ
//8:半角SPで結合　9:改行で結合　0:文字なしで結合
//atcoderのサンプルは最後に改行入れること
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}
function Main() {
    var t = nextInt();
  var output = new Array(t);
  for(var i = 0; i < t; i++){
    var n = nextInt();
    var alist = nextIntArray();
    var blist = nextIntArray();
    if(alist[0] != blist[0]){
      output[i] = "NO";
      continue;
    }
    //右から確定したい
    //jより左に欲しいものがあるか
    //b[j]>a[j]なら1、b[j]>a[j]なら-1があってほしい
    var plus = [];
    var minus = [];
    for(var j = 0; j < n - 1; j++){
      if(alist[j] == 1 && plus.length == 0){
        plus.push(j);
      }
      if(alist[j] == -1 && minus.length == 0){
        minus.push(j);
      }
    }
    //myerr(plus);
    //myerr(minus);
    var isOK = true;
    for(var j = n - 1; j > 0; j--){
      if(blist[j] > alist[j]){
        if(plus.length == 0 || plus[0] >= j){
          isOK = false;
        }
      }else if(blist[j] < alist[j]){
        if(minus.length == 0 || minus[0] >= j){
          isOK = false;
        }
      }
    }
    if(isOK){
      output[i] = "YES";
    }else{
      output[i] = "NO";
    }
  }
  myout(myconv(output,9));
}

const ascending = (x, y) => x - y;
const descending = (x, y) => y - x;
const log = console.log;

function solve(input) {
    input = input.toString().split(/\r?\n/);

    let T = +input[0];
    let res = [];

    for (let t = 1, inputRow = 1; t <= T; t++) {

        let n = +input[inputRow++];
        let fpos = {
            '0': -1,
            '-1': -1,
            '1': -1
        };

        let a = input[inputRow++].split(' ').map(x => +x);
        let b = input[inputRow++].split(' ').map(x => +x);

        for (let i = 0; i < n; i++) {
            if (a[i] == -1 && fpos['-1'] == -1) {
                fpos['-1'] = i;
            }
            if (a[i] == 0 && fpos['0'] == -1) {
                fpos['0'] = i;
            }
            if (a[i] == 1 && fpos['1'] == -1) {
                fpos['1'] = i;
            }
        }

        let ans = 'YES';

        for (let i = n - 1; i >= 0; i--) {

            if (a[i] == b[i]) {
                continue;
            }
            if (b[i] > a[i] && (fpos['1'] == -1 || fpos['1'] >= i)) {
                ans = 'NO';
                break;
            }
            if (b[i] < a[i] && (fpos['-1'] == -1 || fpos['-1'] >= i)) {
                ans = 'NO';
                break;
            }

        }

        res.push(ans);
    }

    return res.join('\n');
}

async function main() {

    try {

        let input = await new Promise(resolve => {

            let _input = '';
            process.stdin.resume();
            process.stdin.setEncoding('utf-8');
            process.stdin.on('data', (buf) => {
                _input += buf;
            });
            process.stdin.on('end', () => {
                resolve(_input);
            });

        });
        let output = solve(input);

        console.log(output);

    } catch (err) {
        console.error(err);
    }
}

main();

// Q: https://codeforces.com/contest/1333/problem/B

const readline =  require('readline');

let input = [];

const rl = readline.createInterface({
	input: process.stdin,
	output: process.stdout,
});

rl.on('line', lineInput => {
	input.push(lineInput);
});

rl.on('close', () => {
    const test = parseInt(input[0]);
    let n, a, b;
	for (let t=0; t < test; t++) {
        n = parseInt(input[3*t+1]);
        a = input[3*t+2].split(' ').map((a) => parseInt(a));
        b = input[3*t+3].split(' ').map((b) => parseInt(b));
        console.log(solution (a, b, n));
	}
});

function solution(a, b, n) {
    if (b[0] !== a[0]) {
        return 'NO';
    } else {
        let posIdx = a[0] === 1 ? true : false;
        let negIdx = a[0] === -1 ? true : false;
        for (let i = 1; i < n; i++) {
            if (b[i] > a[i] && !posIdx) {
                return 'NO';
            } else if (b[i] < a[i] && !negIdx) {
                return 'NO';
            }
            if (!posIdx) {
                posIdx = a[i] === 1 ? true : false;
            }
            if (!negIdx) {
                negIdx = a[i] === -1 ? true : false;
            }
        }
        return 'YES';
    }
}

function main(a, b) {
    var response = 'YES';
    if (a[0] !== b[0]) {
        response = 'NO'
    } else {
        var addPos = -1;
        var rmvPos = -1;
        for (var i = 0; i < a.length; i++) {
            if(a[i] === 1 && addPos === -1 ) {
                addPos = i;
            }
            if(a[i] === -1 && rmvPos === -1 ) {
                rmvPos = i;
            }

            if (addPos !== -1 && rmvPos !== -1) {
                break;
            }
        }

        for (var i = 1; i < b.length; i++) {
            if (b[i] !== a[i]) {
                if(b[i] > a[i]) {
                    if(addPos === -1) {
                        response = 'NO';
                        break;
                    }
                    if(addPos >= i) {
                        response = 'NO';
                        break;
                    }
                }
                if(b[i] < a[i]) {
                    if(rmvPos === -1) {
                        response = 'NO';
                        break;
                    }
                    if(rmvPos >= i) {
                        response = 'NO';
                        break;
                    }
                }
            }
        }
    }

    return response;
}

var n = readline();
var input = [];
var outputB = '';

var a
while (1===1) {
    t = readline();
    if(!t) {
        break;
    }
    a = readline().split(' ');
    b = readline().split(' ');

    for(var z = 0; z < t; z++) {
        a[z] = +a[z];
        b[z] = +b[z];
    }

    outputB += main(a, b) + '\n';
}

print(outputB);

let i = '';
let lines;
process.stdin.on('data', (c) => (i += c));
process.stdin.on('end', () => {
  const { EOL } = require('os');
  lines = i.split(EOL); /*your input text, split by lines*/
  main();
});

function solve(n, a, b) {
  const addPos = a.includes(1) ? a.indexOf(1) : n;
  const minusPos = a.includes(-1) ? a.indexOf(-1) : n;

  return b.every((val, i) => val === a[i] || (val > a[i] && addPos < i) || (val < a[i] && minusPos < i)) ? 'YES' : 'NO';
}

function main() {
  let currentLine = 0;
  const readLine = (_) => lines[currentLine++].split(' ').map((val) => parseInt(val));

  const test = readLine()[0];
  for (let t = 1; t <= test; ++t) {
    const n =readLine()[0];
    const a = readLine();
    const b = readLine();
    console.log(solve(n, a, b));
  }
}

var tests = parseInt(readline())
for (var l = 0; l < tests;l++)
{
	var size = parseInt(readline())
	var a = readline().split(' ').map(c => parseInt(c))
	var b = readline().split(' ').map(c => parseInt(c))
	var flag = true
	var one = a.indexOf(1), minus_one = a.indexOf(-1)
	for(var i = size-1; i>-1;i--){
		if (a[i] != b[i]){
			var check = b[i]-a[i]
			if (check < 0){
				if (minus_one == -1 || minus_one >= i){
					print('No')
					flag = false
					break
				}
			}
			else{
				if (one == -1 || one >= i){
					print('No')
					flag = false
					break
				}
			}
		}
	}
	if (flag){
		print('Yes')
	}
}

for (var l = 0; l < parseInt(readline());l++)
{
	var size = parseInt(readline())
	var a = readline().split(' ').map(c => parseInt(c))
	var b = readline().split(' ').map(c => parseInt(c))
	var flag = true
	var one = a.indexOf(1), minus_one = a.indexOf(-1)
	for(var i = size-1; i>-1;i--){
		if (a[i] != b[i]){
			var check = b[i]-a[i]
			if (check < 0){
				if (minus_one == -1 || minus_one >= i){
					print('No')
					flag = false
					break
				}
			}
			else{
				if (one == -1 || one >= i){
					print('No')
					flag = false
					break
				}
			}
		}
	}
	if (flag){
		print('Yes')
	}
}

Main();
function myout(t){print(t);}//standard output
function next(){return readline();}
function nextInt(){return myconv(next(),1);}
function nextStrArray(){return myconv(next(),2);}//半角スペース分割
function nextIntArray(){return myconv(next(),4);}//半角スペース + 数値化
function nextCharArray(){return myconv(next(),6);}//1文字分割
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す
//6:1文字に分割  7:1文字に分割し、数値配列へ
//8:半角SPで結合　9:改行で結合　0:文字なしで結合
//atcoderのサンプルは最後に改行入れること
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}
function Main() {
    var t = nextInt();
  var output = new Array(t);
  for(var i = 0; i < t; i++){
    var n = nextInt();
    var alist = nextIntArray();
    var blist = nextIntArray();
    if(alist[0] != blist[0]){
      output[i] = "NO";
      continue;
    }
    //右から確定したい
    //jより左に欲しいものがあるか
    //b[j]>a[j]なら1、b[j]>a[j]なら-1があってほしい
    var plus = [];
    var minus = [];
    for(var j = 0; j < n - 1; j++){
      if(alist[j] == 1 && plus.length == 0){
        plus.push(j);
      }
      if(alist[j] == -1 && minus.length == 0){
        minus.push(j);
      }
    }

    var isOK = true;
    for(var j = n - 1; j > 0; j--){
      if(blist[j] > alist[j]){
        for(var k = 0; k < plus.length; k++){
          if(plus[k] >= j){
            isOK = false;
            break;
          }
        }
      }else if(blist[j] < alist[j]){
        for(var k = 0; k < minus.length; k++){
          if(minus[k] >= j){
            isOK = false;
            break;
          }
        }
      }
    }
    if(isOK){
      output[i] = "YES";
    }else{
      output[i] = "NO";
    }
  }
  myout(myconv(output,9));
}

var n = readline();
var input = [];
var outputB = '';

while (1===1) {
    outputB += readline();
    outputB += readline();
    outputB += readline();
    if(!readline()) {
        break;
    }
}

print(outputB);


const fs = require('fs')
const inputs = fs.readFileSync(0, 'utf-8').split('\n')
const n = Number(inputs[0])
inputs.shift()
main(n, inputs)
function main(n, inputs) {
  for (let i = 0; i < n; i++) {
    const m = Number(inputs[i * 2]),
      data = inputs[i * 2 + 1].split(' ').map(Number)
    let min = 0,
      max = 0
    for (let j = 0; j < m; j++) {
      const num = data[j]
      if (num < data[min]) min = j
      if (num > data[max]) max = j
    }
    console.log(min + 1, max + 1)
  }
}

'use strict'; /*jslint node:true, browser:true, es6:true*/
const rl = require('readline').createInterface({ input: process.stdin, output: process.stdout })
const print = console.log
const lines = []
rl.on('line', line => {
    lines.push(line);
});
rl.on('close', main)
let rli = 0;
function readline() {
    return lines[rli++];
}

const EPS = 1e-6;

function main() {
    let T = +readline();
    while (T--){
      let n = +readline();
      let arr = readline().split(' ').map(a=>+a);
      let minI = -1, maxI = -1;
      for (let i=0; i<n; i++){
        if (minI==-1 || arr[minI]<arr[i])
          minI = i;
        if (maxI==-1 || arr[maxI]>arr[i])
          maxI = i;
      }
      print(minI+1, maxI+1)
    }
}

let stop = '';
process.stdin.on('data', c => stop += c);
process.stdin.on('end', () => {
    const {EOL} = require('os');
    const lines = stop.split(EOL);
    var t = lines[0];
    var n = 0;
    for(i = 1; i <= t * 2; i++){
        if(i % 2 == 1){
            n = lines[i];
        }else{
            var a = lines[i].split(' ').map(Number);
            var b = lines[i].split(' ').map(Number).sort(function(a, b){return a - b});
            var max = b[n - 1];
            var min = b[0];
            var binx = 0;
            var minx = 0;
            for(j = 0; j < n; j++){
                if(a[j] == max){
                    binx = j + 1;
                }
                if(a[j] == min){
                    minx = j + 1;
                }
            }
            console.log(binx, minx);
        }
    }
});

'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', stdin => inputString += stdin);

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(s => s.trim());
    main();
});

function readline() {
    return inputString[currentLine++];
}

function output(x) {
    if (typeof x !== 'string') {
        x = x.toString();
    }
    //process.stdout.write(x);   // without auto '\n' (newline)
    console.log(x);  // with auto '\n' (newline)
}

function main() {
    let N = readline();

    for (let test = 0; test < N; test++) {
        let n = parseInt(readline(), 10);
        let arr = readline().split(' ').map(Number);

        let max = -Infinity;
        let min = Infinity;
        let maxIndex = -1;
        let minIndex = -1;
        for (let i = 0; i < n; i++) {
            if (arr[i] > max) {
                max = arr[i];
                maxIndex = i;
            }
            if (arr[i] < min) {
                min = arr[i];
                minIndex = i;
            }
        }

        output(`${maxIndex + 1} ${minIndex + 1}`);
    }
}

'use strict'; /*jslint node:true, browser:true, es6:true*/
const rl = require('readline').createInterface({ input: process.stdin, output: process.stdout })
const print = console.log
const lines = []
rl.on('line', line => {
    lines.push(line);
});
rl.on('close', main)
let rli = 0;
function readline() {
    return lines[rli++];
}

const EPS = 1e-6;

function main() {
    let T = +readline();
    while (T--){
      let n = +readline();
      let arr = readline().split(' ').map(a=>+a);
      print('1 1')
    }
}

let q = '';
process.stdin.on('data', c => q += c);
process.stdin.on('end', () => {
    const {EOL} = require('os');
    const lines = q.split(EOL);
    var n = lines[0];
    var e = 0;
    for(j = 1; j <= n; j++){
        var k = lines[j].split('').map(Number);
        var a = 0;
        var b = 0;
        for(i = 0; i < 6; i++){
            if(i >= 3){
                a += k[i];
            }else{
                b += k[i];
            }
        }
        if(a == b){
            console.log('YES');
        }else{
            console.log('NO');
        }
    }
});

'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', stdin => inputString += stdin);

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(s => s.trim());
    main();
});

function readline() {
    return inputString[currentLine++];
}

function output(x) {
    if (typeof x !== 'string') {
        x = x.toString();
    }
    //process.stdout.write(x);   // without auto '\n' (newline)
    console.log(x);  // with auto '\n' (newline)
}

function main() {
    let N = readline();

    for (let test = 0; test < N; test++) {
        let n = parseInt(readline(), 10);
        let arr = readline().split(' ').map(Number);
        output('1 1');
    }
}


function main () {
  var n = parseInt(readline());
  while (n-- > 0) {
    print(solve(readline()));
  }

}

function solve (s) {
  var sum = 0;
  var countEven = false;
  var countZero = 0;

  for (var i = 0; i < s.length; i++) {
    var num = parseInt(s[i]);

    if (num === 0) countZero++;
    else if (!(num & 1)) countEven++;

    sum += num;
  }

  if (sum % 3 == 0 && (countZero > 1 || (countZero == 1 && countEven)))
    return "red";

  return "cyan";
}

main();

const readline = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

let index = 0;

function permut(string) {
  if (string.length < 2) return string;

  var permutations = [];
  for (var i = 0; i < string.length; i++) {
    var char = string[i];

    if (string.indexOf(char) != i)
      continue;

    var remainingString = string.slice(0, i) + string.slice(i + 1, string.length);

    for (var subPermutation of permut(remainingString))
      permutations.push(char + subPermutation)
  }
  return permutations;
}

readline.on('line', line => {
  if (index++) {
    let sol = "cyan";
    let sum = 0, even = false, zero = false;
    for(let i = 0; i < line.length; i++) {
      let c = Number(line[i]);
      if (!zero && c === 0) { zero = true; continue; }
      if (!even && c % 2 === 0) even = true;
      sum += c
    }
    if (zero && even && sum % 3 === 0) sol = "red";
    return console.log(sol);
  }
});

// readline.on("close", () => {
//   console.log(count, values);
// });

const readline = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout
});

let arr = [];

readline.on("line", line => {
  arr.push(line);
});

readline.on("close", _ => {
  arr.shift();
  main();
});

const main = () => {
  arr.forEach(e => {
    const splitArr = e
      .toString()
      .split("")
      .map(Number);
    const nr0 = splitArr.filter(e => e === 0).length;
    if (
      splitArr.reduce((a, b) => a + b) % 3 === 0 &&
      nr0 >= 1 &&
      (splitArr.some(e => [2, 4, 6, 8].includes(e)) || nr0 >= 2)
    ) {
      console.log("red");
    } else {
      console.log("cyan");
    }
  });
};

function write(x) {
  console.log(x)
}

process.stdin.resume()
process.stdin.setEncoding('utf-8')

var arr = ''
process.stdin.on('data', (i) => {
  arr += i
})

process.stdin.on('end', () => {
  arr = arr.split('\n').map(a => a.replace(/(\r\n|\n|\r)/gm, ''))

  const n = parseInt(arr.shift())

  for(let j = 0; j < n; j++) {
    const num = arr[j]
    let d10 = false, d4 = false, even = false

    let len = num.length
    let sum = 0

    for(let i = 0; i < len; i++) {
      let x = parseInt(num[i])
      sum += x
      // console.log(sum, x, x % 2)
      if(x % 2 == 0 && d10) d4 = true
      if(x % 2 == 0 && x != 0) even = true
      if(num[i] == '0') {
        d10 = true
        if(even) d4 = true
      }
    }

    // console.log(d10, d4)
    if(sum % 3 == 0 && d10 && d4) {
      write('red')
    }
    else {
      write('cyan')
    }
  }
})


for (var t = Number (readline ()); t > 0; t--)
    {
    print (Math.floor ((Number (readline ()) + 1) / 10));
    }

var t=Number(readline());
for (var i=0; i<t; i++) {
    var n=Number(readline());
    print(Math.floor((n+1)/10));
}

var n = parseInt(readline());

for (var i = 0; i < n; i++) {
    var res;
   var num = readline();
   if (num >= 9) {
       res = Math.floor(num / 10);
       if (num % 10 === 9) {
           res++;
       }
   } else {
       res = 0;
   }

   print(res);
}

var input = readline();
for(var i = 0; i < input; i ++) {
    var num = +readline();
    var result = Math.floor((num + 1) / 10);
    print(result);
}

process.stdin.resume()
process.stdin.setEncoding('utf-8')
let standardInputString=''
let currentLine=0
function readline(){
    return standardInputString[currentLine++]
}
process.stdin.on('data',rawData=>{
    standardInputString+=rawData
})
process.stdin.on('end',_=>{
        standardInputString= standardInputString.trim().split('\n').map(line=>{
        return line.trim()
})
        main()
})
input=()=>parseInt(readline().trim())
print=(val)=>console.log(val)
sort=(arr)=> arr.sort((a,b)=>a-b)
Rsort=(arr)=> arr.sort((a,b)=>b-a)
StringListInput=()=> readline().trim().split(' ')
listInput=()=> readline().trim().split(' ').map(x=>parseInt(x))
Max=(arr)=> Math.max.apply(null,arr)
Min=(arr)=> Math.min.apply(null,arr)
function main(){
    let t = Number(readline());
    for (let i = 0; i < t;i++) {
        n = Number(readline());
        console.log(parseInt((n+1)/10));
    }
}

const fs = require('fs');

const stdin = String(fs.readFileSync(0));

const f = (n) => Math.floor((n + 1) / 10);

const out = stdin
  .split('\n')
  .slice(1)
  .map((nStr) => {
    const n = parseInt(nStr);

    return f(n);
  });

out.forEach((x) => {
  if (typeof x === 'number' && !Number.isNaN(x)) {
    console.log(x);
  }
});

"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");

function print(x) {
  console.log(x);
}
let inputString = "";
let currentLine = 0;

process.stdin.on("data", (inputStdin) => {
  inputString += inputStdin;
});
process.stdin.on("end", () => {
  inputString = inputString.split("\n");
  main();
});
function readline() {
  return inputString[currentLine++];
}

// ********** Code Start **********

function main() {
  // your code goes here
  let t = parseInt(readline());
let lst = [];
while (t--) {
  let res = 0;
  let input = parseInt(readline()); // changeable
  res = Number.parseInt(input / 10);
  let str = String(input);
  if (str[str.length - 1] == "9") {
    res += 1;
  }
  lst.push(res);
}
for (let val of lst) {
  console.log(val);
}

}

function solve(num) {
    console.log(Math.floor((num - 9) / 10) + 1);
}

let text = '';
process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', t => {
    if (t === '\r\n' || t === '\n') {
        process.stdin.emit('end');
    } else {
        text += t;
    }
});
process.stdin.on('end', () => {
    const input = text.trim().replace(/\r/g, '').split('\n');
    const dataArr = input.slice(1).map(n => parseInt(n));
    const len = dataArr.length;

    for (let i = 0; i < len; i++) {
        solve(dataArr[i]);
    }
    process.exit();
});

let q = '';
process.stdin.on('data', c => q += c);
process.stdin.on('end', () => {
    const {EOL} = require('os');
    const lines = q.split(EOL);
    var t = lines[0];
    var e = 0;
    for(i = 1; i <= t; i++){
        var k = lines[i];
        var ans = Math.floor(k / 10);
        ans += k % 10 == 9 ? 1 : 0;
        console.log(ans);
    }
});

let data = '';
process.stdin.on('data', c => data += c);

function* nextLine() {
	let lines = data.trim().split(/\n/g);
	for(let l of lines){
		yield l.trim();
	}
}

let nl = nextLine();

nl.elem = function(funParse) {
		return funParse(this.next().value);
	};

nl.array = function(funParse) {
		return this.next().value.split(/\s/g).map(funParse||(x => x));
	};

nl.num = function() {
		return nl.elem(Number);
	};

nl.nums = function() {
		return nl.array(Number);
	};

nl.line = function() {
		return this.next().value;
	};

const sol = () => {
	//your code this
	let t = nl.num();
	let ans = [];
	for(let i = 0; i < t; i++){
		let n = nl.num();
		ans.push(Math.trunc((n + 1) / 10));
	}
	console.log(ans.join('\n'));
};

process.stdin.on('end', sol);

//Don't have to see. start------------------------------------------
var read = require('readline').createInterface({
	input: process.stdin, output: process.stdout
});
var obj; var inLine = []; var outputList = [];var retcode = new Set();
read.on('line', function(input){
	var tmp = input.split(' ');
	for(var i = 0; i < tmp.length; i++){
		inLine.push(tmp[i]);
		if(i == tmp.length - 1){
			retcode.add(inLine.length);
		}
	}
});
read.on('close', function(){
	obj = init(inLine);
	console.error('\n↑入力 ↓出力');
	Main();
	console.log(myconv(outputList, 9));
});
function makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}
function nextArray(size, code){
	var ret = new Array(size);
	for(var i = 0; i < size; i++){
		if(code == 'int'){
			ret[i] = nextInt();
		}else if(code == 'long'){
			ret[i] = BigInt(next());
		}else{
			ret[i] = next();
		}
	}
	return ret;
}
function nextIntArray(size){return nextArray(size, 'int');} function nextStrArray(size){return nextArray(size, 'str');} function nextLongArray(size){return nextArray(size, 'long');}
function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();} function nextInt(){return myconv(next(),1);} function nextLong(){return BigInt(next());}
function getCountMap(list){
	var map = {};
	for(var i = 0; i < list.length; i++){
		if(map[list[i]] == null){
			map[list[i]] = 0;
		}
		map[list[i]]++;
	}
	return map;
}
function init(input){
	return {
		list : input, index : 0, max : input.length,
		hasNext : function(){return (this.index < this.max);},
		next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}},
		isReturn : function(){return retcode.has(this.index);}
	};
}
function myout(s){outputList.push(s);}
function myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}
function isReturn(){return obj.isReturn();}
//param "no" is
//unknown or outlier : return i. 1: parseInt.
//2: split space. 4: split space and parseInt.
//6: split 1 character. 7: split 1 character and parseInt.
//8: join space. 9: join nextline. 0: join no character.
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}

//Don't have to see. end------------------------------------------
function Main(){
	var t = nextInt();
	while(hasNext()){
		var N = nextInt();
		var output = Math.floor(N / 10);
		if(N % 10 == 9){
			output++;
		}
		myout(output);
	}
}

process.stdin.resume();
process.stdin.setEncoding("utf-8");

var currentLine = 0;
var inputString = "";

process.stdin.on("data", (raw_data) => {
  inputString += raw_data;
});

process.stdin.on("end", (_) => {
  inputString = inputString
    .trim()
    .split("\n")
    .map((line) => {
      return line.trim();
    });
  main();
});

function input() {
  return inputString[currentLine++];
}

/******** Main function *************/

function main() {
  const t = +input();

  for (let i = 0; i < t; i++) {
    const n = +input();
    console.log(Math.floor((n + 1) / 10));
  }
}

// Input handling (Ctrl-D for EOF)

const readlineModule = require("readline");
const rl = readlineModule.createInterface({
    input: process.stdin,
    output: process.stdout
});

const input = [];
let currLine = 0;

rl.on("line", line => {
    input.push(line);
});

rl.on("close", () => {
    main();
})

function readline() {
    return input[currLine++];
}

// Main function

function main() {
    const T = parseInt(readline());
    for (let t = 0; t < T; t++) {
        const N = parseInt(readline());
        console.log(Math.floor((N+1)/10));
    }
}

const lines = parseInt(readline());

Array(lines).fill(0).forEach(() => {
  const n = parseInt(readline());

  print(Math.floor(n / 10) + (n % 10 >= 9 ? 1 : 0));
});

var t=Number(readline());
for (var i=0;i<t;i++){
	var n=Number(readline());
	print(parseInt((n+1)/10))
}

t=+readline()
while(t--){
    n=+readline()+1
    print((n/10)|0)
}

const fs = require('fs');

const stdin = String(fs.readFileSync(0));

const f = (n) => Math.floor((n + 1) / 10);

const out = stdin
  .split('\n')
  .slice(1)
  .map((nStr) => {
    const n = parseInt(nStr);

    if (typeof n === 'number') {
      return f(n);
    } else {
      return '';
    }
  })
  .join('\n');

console.log(out);

const fs = require('fs');

const stdin = String(fs.readFileSync(0));

const out = stdin
  .split('\n')
  .slice(1)
  .map((n) => Math.floor((parseInt(n) + 1) / 10))
  .join('\n');

console.log(out);

"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");

function print(x) {
  console.log(x);
}
let inputString = "";
let currentLine = 0;

process.stdin.on("data", (inputStdin) => {
  inputString += inputStdin;
});
process.stdin.on("end", () => {
  inputString = inputString.split("\n");
  main();
});
function readline() {
  return inputString[currentLine++];
}

// ********** Code Start **********

function main() {
  let res = 0;
let input = readline(); // changeable
res = Number.parseInt(input / 10);
let str = String(input);
if (str[str.length - 1] == "9") {
  res += 1;
}
console.log(res);
}

function S(x) {
  return String(x).split('').reduce((acc, i) => acc + +i, 0);
}

var n = parseInt(readline());
var l = Array();

for (var x = 1; x <= n; x++) {
  if (S(x + 1) < S(x)) l.push(x);
}

print(l.join(' '));

function S(x) {
  return String(x).split('').reduce((acc, i) => acc + +i, 0);
}

var n = readline();
var l = Array();

for (var x = 1; x <= n; x++) {
  if (S(x + 1) < S(x)) l.push(x);
}

print(l.join(' '));

function S(x) {
  return String(x).split('').reduce((acc, i) => acc + +i, 0);
}

var n = readline();

for (var x = 1; x <= n; x++) {
  if (S(x + 1) < S(x)) print(x);
}

function S(x) {
  return String(x).split('').reduce((acc, i) => acc + +i, 0);
}

var n = readline();

for (var x = 1; x <= n; x++) {
  if (S(x + 1) < S(x)) print(count);
}

function S(x) {
  return String(x).split('').reduce((acc, i) => acc + +i, 0);
}

var n = readline();

var count = 0;

for (var x = 1; x <= n; x++) {
  if (S(x + 1) < S(x)) count++;
}

print(count);

function S(x) {
  return 1 <= x && x <= x;
}

var n = readline();

var count = 0;

for (var x = 1; x <= n; x++) {
  if (S(x + 1) < S(x)) count++;
}

print(count);


'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function readline() {
    return inputString[currentLine++];
}

// Make a Snippet for the code above this and then write your logic in main();

function main() {
    var xx = Number(readline())
    Array(Number(xx)).fill(1).map((t, i) => {

        var x = parseInt(readline())

        var flag = false
        for (var i = 1; i < 100000; i++) {
            var y = x - i * i * i
            var cub = Math.floor(Math.cbrt(y))
            // console.log(cub, y)
            if (y > 0 && cub * cub * cub === y) {
                // console.log(i, cub)
                flag = true
            }
            // console.log(Math.floor(Math.cbrt(i)))
            // if (y > 0n) {
            //     var r = 10000n
            //     var l = 0n
            //     while (r > l + 1n) {
            //         var mid = (r + l) / 2n
            //         if (mid * mid * mid >= y) r = mid
            //         else l = mid
            //     }
            //
            // console.log(l, r, y)
            // if (r*r*r === y) flag = true
            // }
        }
        console.log(flag ? 'YES' : 'NO')
        // for (int i = rt; i >=0; --i)
        // {
        //     if (binary_search(i,i,num))
        //     {
        //         flag=true;
        //         break;
        //     }
        // }

    })

}

function binary_search(num2, r, num, rr) {
    var mid;
    var l = r;
    r = num
    var value;
    // console.log(l, r)

    while (l <= r) {
        mid = ((l + r) / 2n);
        // Calculating mid.
        // console.log(mid * mid * mid + num2 * num2 * num2, num)
        value = mid * mid * mid + num2 * num2 * num2
        if ((value) === num) {

            return true;
        } else if ((value) > num) {
            r = mid - 1n;
        } else {
            l = mid + 1n;
        }
    }
    return false;
}

var row = readline().split(" ").map(function(x) { return parseInt(x); });
while(true) {
    var read = readline();
    if(read == undefined) break;
    var row = read.split(" ").map(function(x) { return parseInt(x); });

    var total = row[0];
    var a = 1;
    var flag = false;
    if (total > 1) {
        while(Math.pow(a, 3) < total) {
            var remain = total - a*a*a;
            var raw = Math.pow(remain, 1/3);
            var round = Math.round(raw);
            if(Math.pow(round, 3) == remain && round % 1 === 0) {
                flag = true;
                break;
            }
            a++;
        }
    }
    if(flag)
        write("YES" + "\n");
    else
        write("NO" + "\n");
}

tt = +readline()
while (tt!==0){
    flag = false
    tt--
    n = +readline()
    for (var a=1; a*a*a<=n; a++){
        var b = n - a*a*a
        var B = Math.round(Math.cbrt(b))
        if (B>0 && b==B*B*B){
            flag = true
            break
        }
    }
    if (flag){print('YES')}
    else{print('NO')}
}

var limit = parseInt(readline());
var input = new Array();
for (var i = 0; i < limit; i++) {
    input[i] = parseInt(readline());
}
var output = calc(input);
output.forEach(function (value) {
    print(value);
});
function calc(inputArray) {
    var result = new Array();
    for (var _i = 0, inputArray_1 = inputArray; _i < inputArray_1.length; _i++) {
        var element = inputArray_1[_i];
        if (element > 1) {
            var cubeRootNum = calcCubeRoot(element);
            var flag = false;
            for (var j = 1; j <= cubeRootNum; j++) {
                flag = calcSecondCube(j, element);
                if (flag)
                    break;
            }
            if (flag) {
                result.push("YES");
            }
            else {
                result.push("NO");
            }
        }
        else
            result.push("NO");
    }
    return result;
}
function calcCubeRoot(input) {
    var num = Math.cbrt(input);
    return Math.floor(num);
}
function calcSecondCube(first, element) {
    var different = element - first * first * first;
    if (different > 0) {
        var second = Math.cbrt(different);
        return second % 1 === 0;
    }
    else
        return false;
}

var Case = parseInt( readline() );
while(Case--){
  var n = readline() ;
  var flag = false;
  for(var i = 1; i*i*i <= n; i++){
      var j = n - (i*i*i);
      var b = Math.round( Math.cbrt(j) );
      if(b && b*b*b == j){
          flag = true;
          break;
      }
  }
  if(flag) print("YES");
  else print("NO");
}

'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function readline() {
    return inputString[currentLine++];
}

// Make a Snippet for the code above this and then write your logic in main();

function main() {
    var xx = Number(readline())
    Array(Number(xx)).fill(1).map((t, i) => {

        var x = parseInt(readline())

        var flag = false
        for (var i = 1; i < 10000; i++) {
            var y = x - i * i * i

            if (y > 0) {
                var r = 10000
                var l = 0
                while (r > l + 1) {
                    var mid = Math.floor((r + l) / 2)
                    if (mid * mid * mid > y) r = mid
                    else l = mid
                }

                // console.log(l, r, y)
                if (l * l * l === y) flag = true
            }
        }
        console.log(flag ? 'YES' : 'NO')
        // for (int i = rt; i >=0; --i)
        // {
        //     if (binary_search(i,i,num))
        //     {
        //         flag=true;
        //         break;
        //     }
        // }

    })

}

"use strict";
const fs = require("fs");
//let filename = "0.txt";
let filename = 0;
const input = fs.readFileSync(filename, "utf8").trim().split("\n");
let line = 0;
function readline() {
  return input[line++];
}
let obj = {};
const precompute = () => {
  for (let i = 1; i <= 10000; i++) obj[i * i * i] = 1;
};
const solve = () => {
  let t = parseInt(readline());
  precompute();
  while (t--) {
    let n = parseInt(readline());
    for (let i = 1; i <= 10000; i++) {
      let j = n - i * i * i;
      if (j <= 0) {
        console.log("NO");
        break;
      }
      if (obj[j]) {
        console.log("YES");
        break;
      }
    }
  }
};
solve();

'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function readline() {
    return inputString[currentLine++];
}

// Actual code...

function main() {
    const numCases = parseInt(readline());
    for (let i = 0; i < numCases; i++) {
        const target = parseInt(readline());
        const cubeRoot = Math.cbrt(target);
        let found = false;
        let a = 1;
        while (a < cubeRoot && !found) {
            const b = Math.cbrt(target - Math.pow(a, 3));
            if (Number.isInteger(b)) found = true;
            a++;
        }
        if (found) {
            console.log("YES");
        } else {
            console.log("NO");
        }
    }
}

//Don't have to see. start------------------------------------------
var read = require('readline').createInterface({
	input: process.stdin, output: process.stdout
});
var obj; var inLine = []; var outputList = [];var retcode = new Set();
read.on('line', function(input){
	var tmp = input.split(' ');
	for(var i = 0; i < tmp.length; i++){
		inLine.push(tmp[i]);
		if(i == tmp.length - 1){
			retcode.add(inLine.length);
		}
	}
});
read.on('close', function(){
	obj = init(inLine);
	console.error('\n↑入力 ↓出力');
	Main();
	console.log(myconv(outputList, 9));
});
function makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}
function nextArray(size, code){
	var ret = new Array(size);
	for(var i = 0; i < size; i++){
		if(code == 'int'){
			ret[i] = nextInt();
		}else{
			ret[i] = next();
		}
	}
	return ret;
}
function nextIntArray(size){return nextArray(size, 'int');} function nextStrArray(size){return nextArray(size, 'str');}
function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();} function nextInt(){return myconv(next(),1);}
function init(input){
	return {
		list : input, index : 0, max : input.length,
		hasNext : function(){return (this.index < this.max);},
		next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}},
		isReturn : function(){return retcode.has(this.index);}
	};
}
function myout(s){outputList.push(s);}
function myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}
function isReturn(){return obj.isReturn();}
//param "no" is
//unknown or outlier : return i. 1: parseInt.
//2: split space. 4: split space and parseInt.
//6: split 1 character. 7: split 1 character and parseInt.
//8: join space. 9: join nextline. 0: join no character.
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}

//Don't have to see. end------------------------------------------
function Main(){
	var t = nextInt();
	for(var i = 0; i < t; i++){
		var N = nextInt();
		var isOK = false;
		for(var j = 1; j <= 10000; j++){
			if(Math.cbrt(N - j * j * j) % 1 == 0 && (N - j * j * j) > 0){
				isOK = true;
			}
		}
		myout((isOK) ? "YES" : "NO");
	}
}

input()
//-------------------

function input () {
  let i = ''
  process.stdin.on('data', c => i += c)
  process.stdin.on('end', () => {
    const {EOL} = require('os')
    const lines = i.split(EOL) /*your input text, split by lines*/
    //console.log(lines);
    solve(lines)
  })

}

function solve (arr) {
  var d =+arr[0]

  for (var i =1 ; i <=d ;i++){
    console.log(test(+arr[i]))
  }

}

function test(num ){

  var Max =10000
  var mas =[]

  var k =1
  while (k <=Max){

    mas.push(k*k*k)
    k++
  }
  var mno =new Set(mas)

  for (var a of mas){
    if (2*a > num) break;
    if (mno.has(num - a)) {
      //console.log(num,Math.cbrt(a),Math.cbrt(num -a) )
      return "YES"

    }
  }
  return "NO"

}

const readline = require("readline");
const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
})
let arr = [];
rl.on('line', line => {
    arr.push(Number(line));
})
rl.on('close', line => {
    var map = new Map();
    for (var i = 1; i * i * i <= 10 ** 12; i++) {
        map.set(i * i * i, i);
    }
    for (var i = 1; i < arr.length; i++) {
        var target = arr[i];
        var flag = false;
        for (var j = 1; j * j * j < target; j++) {
            if (map.has(target - j * j * j)) {
                flag = true;
                break;
            }
        }
        if (flag) {
            console.log("YES");
        } else {
            console.log("NO");
        }
    }
})

const rl = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout,
});

let input = [];

rl.on("line", (ln) => {
  input.push(ln);
}).on("close", () => {
  const T = input.shift();

  for (let i = 0; i < T; i++) {
    const num = Number(input.shift());
    const limit = Math.floor(Math.pow(num, 1 / 3));
    let start = 1;
    let end = limit;

    let ans = "NO";
    while (start <= end && end <= limit) {
      let sum = Math.pow(start, 3) + Math.pow(end, 3);
      if (sum === num) {
        ans = "YES";
        break;
      }
      if (sum > num) {
        end--;
        continue;
      }
      if (sum < num) {
        start++;
        continue;
      }
    }
    console.log(ans);
  }
});

let lines = require('fs').readFileSync(global.FILE_DESCRIPTOR || 0).toString().split('\n');
let index = 0;
const readline = () => lines[index++] || '';

let n = +readline();
for (let i = 0; i < n; i++) {
  (function () {
    let num = +readline();
    let aaa = Math.cbrt(num);
    for (let j = 1; j < aaa; j++) {
      if (Math.cbrt(num - Math.pow(j, 3)) % 1 === 0) {
        return console.log('YES')
      }
    }
    console.log('NO')
  })();
}

/*
 * File Created: Tuesday, 16th February 2021 3:32:09 pm
 * Author: Lukas Rimkus
 */

 'use-strict'

const { count } = require("console");

 process.stdin.resume();
 process.stdin.setEncoding('utf8');

 let data = '';
 let currentLine = 0;

 process.stdin.on('data', chunk => {
 data += chunk;
 });

 process.stdin.on('end', () =>{
     data = data.replace(/\s*$/, '')
     .split('\n')
     .map(str => str.replace(/\s*$/, ''));

     let testCases = parseInt(data.shift());

     while(testCases--) {

        const x = BigInt(readLine());

        // const arr = readLine().split(' ').map(Number);

        const res = c(x);

        console.log(res)
     }
 });

 function get_ints() {
     return data.shift().split(' ').map(Number);
 }

 function readLine() {
         return data[currentLine++];
 }

 function a(n,arr){
     let count = 0;
     for(let i = 0 ; i < n - 1; i++){
         let max = Math.max(arr[i], arr[i+1]);
         let min = Math.min(arr[i], arr[i+1]);
         if(max/min > 2){
             while(min * 2 < max){
                 max = max / 2;
                 count++;
             }
         } else{
             continue;
         }
     }
     return count;
 }

 function b(n,arr){
     let c0 = 0;
     let c1 = 0;
     let c2 = 0;
     let count = 0;
     for(let i = 0 ; i < n ; i++){
         if(arr[i] % 3 === 0){
             c0++;
         } else if(arr[i] % 3 === 1){
             c1++;
         } else if(arr[i] % 3 === 2){
             c2++;
         }
     }

     while(c1 !== n / 3 || c2 !== n / 3 || c1 !== n / 3){
        //  console.log(`${c0},${c1}, ${c2}`)
        if(c0 > n / 3){
            let free0 = c0 - n/3;
            while(free0 > 0){

                if(c1 < n / 3){
                    free0--;
                    c1++;
                    count+=1;
                    c0--;
                }
                if(c2 < n /3){
                    free0--;
                    c2++;
                    count+=2;
                    c0--;
                }
            }
        }
        if(c1 > n / 3){
            let free1 = c1 - n/3;
            while(free1 > 0){
                if(c2 < n / 3){
                    free1--;
                    c2++;
                    count += 1;
                    c1--;
                }
                if(c0 < n / 3){
                    free1--;
                    c0++;
                    count += 2;
                    c1--;
                }
            }
        }
        if(c2 > n/3){
            let free2 = c2 - n / 3;
            // console.log(`${free2}, ${c0}, ${c1}, ${c2}, ${n}`)
            while(free2 > 0){

                if(c0 < n / 3){
                    free2--;
                    c0++;
                    count += 1;
                    c2--;
                }
                if(c1 < n/3){
                    free2--;
                    c1++;
                    count += 2;
                    c2--;
                }
            }
        }
     }
     return count;

 }

 function c(x){
    for(let i = 1; i < 10001; i++){
        if(Math.cbrt(Number(x) - i * i * i) % 1 == 0 && (Number(x) - i * i * i) > 0){
            return 'YES'
        }
    }
    return 'NO';
}

 module.exports = c

var c = new Set(), i, t, x, m, f, r = readline;
for (i = 1; i <= 1e4; i++)
  c.add(i * i * i);

t = parseInt(r());
while (t--) {
  x = parseInt(r());
  m = Math.ceil(Math.cbrt(x));
  f = false;
  for (i = 1; i <= m && !f; i++)
    if (c.has(x - i * i * i))
      f = true;
  print(f? 'yes': 'no');
}

var c = new Set(), i, t, x, m, f, r = readline;
for (i = 1; i <= 1e4; i++)
  c.add(i * i * i);

t = r();
while (t--) {
  x = r();
  m = Math.ceil(Math.cbrt(x));
  f = false;
  for (i = 1; i <= m && !f; i++)
    if (c.has(x - i * i * i))
      f = true;
  print(f? 'yes': 'no');
}

var c = new Set();

for (var i = 1; i <= 1e4; i++)
  c.add(i * i * i);

const t = readline();

for (var _ = 0; _ < t; _++) {
  var x = readline();
  var f = false;
  for (i of c)
    if (c.has(x - i)) {
      f = true;
      break;
    }
  print(f? 'yes': 'no');
}

var c=new Set(),i,t,x,f,r=readline
for(i=1;i<=1e4;i++)c.add(i*i*i)
t=r()
while(t--){x=r()
f=1
for(i of c)if(c.has(x-i)){f=0;break}
print(f?'no':'yes')}

var c=new Set(),i,t,x,f,r=readline,p=print
for(i=1;i<=1e4;i++)c.add(i*i*i)
t=r()
while(t--){x=r()
f=1
for(i of c)if(c.has(x-i)){f=0;break}
print(f?'no':'yes')}

var c=new Set(),i,t,x,f,r=readline
for(i=1;i<=1e4;i++)c.add(i*i*i)
t=r()
while(t--){x=r()
f=1
for(i=1;i*i*i<=x&&f;i++)if(c.has(x-i*i*i))f=0
print(f?'no':'yes')}

var c=new Set(),i,t,x,f,r=readline
for (i=1;i<=1e4;i++)
  c.add(i*i*i);
t=r()
while(t--){
  x=r()
  f=1
  for(i=1;i*i*i<=x&&f;i++)
    if(c.has(x-i*i*i))
      f=0
  print(f?'no':'yes')
}

var c=new Set(),i,t,x,max,f,r=readline
for (i=1;i<=1e4;i++)
  c.add(i*i*i);
t=parseInt(r())
while(t--){
  x=parseInt(r())
  max=Math.ceil(Math.cbrt(x))
  f=0
  for(i=1;i<=max&&!f;i++)
    if(c.has(x-i*i*i))
      f=1
  print(f?'yes':'no')
}

var c=new Set(),i,t,x,max,f
for (i=1;i<=1e4;i++)
  c.add(i*i*i);
t=parseInt(readline())
while(t--){
  x=parseInt(readline())
  max=Math.ceil(Math.cbrt(x))
  f=0
  for (i=1;i<=max&&!f;i++)
    if (c.has(x-i*i*i))
      f=1
  print(f?'yes':'no')
}

var cubes = new Set();

for (var i = 1; i <= 1e4; i++)
  cubes.add(i * i * i);

const t = parseInt(readline());

for (var _ = 0; _ < t; _++) {
  var x = parseInt(readline());
  var max = Math.ceil(Math.cbrt(x));
  var f = false;
  for (var a = 1; a <= max && !f; a++)
    if (cubes.has(x - a * a * a))
      f = true;

  print(f? 'yes': 'no');
}

var c=new Set(),i,t,x,f,r=readline,p=print
for(i=1;i<=1e4;i++)c.add(i*i*i)
t=r()
while(t--){x=r()
f=1
for(i of c)if(c.has(x-c)){f=0;break}
print(f?'no':'yes')}

var c=new Set(),i,t,x,f,r=readline,z
for (i=1;i<=1e4;i++)
  c.add(i*i*i);
t=r()
while(t--){
  x=r()
  f=1
  for(i=1;z=i*i*i<=x&&f;i++)
    if(c.has(x-z))
      f=0
  print(f?'no':'yes')
}

var c=new Set(),i,t,x,f,r=readline,z
for(i=1;i<=1e4;i++)c.add(i*i*i)
t=r()
while(t--){x=r()
f=1
for(i=1;z=i*i*i<=x&&f;i++)if(c.has(x-z))f=0
print(f?'no':'yes')}

const cube = () => {
  var cache = new Set();
  return (a) => {
    if (cache.has(a)) {
      return true;
    } else {
      cache.add(a * a * a);
      return false;
    }
  }
}

const memo_cube = cube();

for (var i = 1; i <= 1e4; i++)
  memo_cube(i)

const t = parseInt(readline());
// const t = 1;

for (var _ = 0; _ < t; _++) {
  var x = parseInt(readline());
  // var x = 703657519796;
  var max = Math.ceil(Math.cbrt(x));
  var f = false;
  for (var a = 1; a <= max && !f; a++)
    if (memo_cube(x - a * a * a))
      f = true;

  print(f? 'yes': 'no');

}

const cube = () => {
  var cache = {};
  return (a) => {
    if (a in cache) {
      return cache[a];
    } else {
      const c = Math.pow(a, 3);
      cache[a] = c;
      return c;
    }
  }
}

const memo_cube = cube();

const has_cubic_sum = () => {
  var cache = {};
  return (x) => {
    if (x in cache) {
      return cache[x];
    } else {
      var max = Math.ceil(Math.cbrt(x));
      var f = false;
      for (var a = 1; a <= max && !f; a++)
        for (var b = a; b <= max && !f; b++)
          if (memo_cube(a) + memo_cube(b) == x)
            f = true;

      cache[x] = f;
      return f;
    }
  }
}

const memo_has_cubic_sum = has_cubic_sum();

const t = parseInt(readline());
// const t = 1;

for (var _ = 0; _ < t; _++) {
  var x = parseInt(readline());
  print(has_cubic_sum(x)? 'yes': 'no');
  // var x = 2;
  // console.log(memo_has_cubic_sum(x)? 'yes': 'no');
}

const cube = () => {
  var cache = {};
  return (a) => {
    if (cache[a] !== undefined) {
      return cache[a];
    } else {
      const c = Math.pow(a, 3);
      cache[a] = c;
      return c;
    }
  }
}

const memo_cube = cube();

const has_cubic_sum = () => {
  var cache = {};
  return (x) => {
    if (cache[x] !== undefined) {
      return cache[x];
    } else {
      var max = Math.ceil(Math.cbrt(x));
      var f = false;
      for (var a = 1; a <= max && !f; a++)
        for (var b = a; b <= max && !f; b++)
          if (memo_cube(a) + memo_cube(b) == x)
            f = true;

      cache[x] = f;
      return f;
    }
  }
}

const memo_has_cubic_sum = has_cubic_sum();

const t = parseInt(readline());
// const t = 1;

for (var _ = 0; _ < t; _++) {
  var x = parseInt(readline());
  print(has_cubic_sum(x)? 'yes': 'no');
  // var x = 2;
  // console.log(memo_has_cubic_sum(x)? 'yes': 'no');
}

const cube = () => {
  var cache = {};
  return (a) => {
    if (cache[a] !== undefined) {
      //console.log('Fetching from cache 1');
      return cache[a];
    } else {
      //console.log('Calculating result 1');
      const c = Math.pow(a, 3);
      cache[a] = c;
      return c;
    }
  }
}

const memo_cube = cube();

const has_cubic_sum = () => {
  var cache = {};
  return (x) => {
    if (cache[x] !== undefined) {
      console.log('Fetching from cache 2');
      return cache[x];
    } else {
      console.log('Calculating result 2');
      var max = Math.ceil(Math.cbrt(x));
      var f = false;
      for (var a = 1; a <= max && !f; a++)
        for (var b = a; b <= max && !f; b++)
          if (memo_cube(a) + memo_cube(b) == x)
            f = true;

      cache[x] = f;
      return f;
    }
  }
}

const memo_has_cubic_sum = has_cubic_sum();

const t = parseInt(readline());
// const t = 1;

for (var _ = 0; _ < t; _++) {
  var x = parseInt(readline());
  print(has_cubic_sum(x)? 'yes': 'no');
  // var x = 1;
  //console.log(memo_has_cubic_sum(x)? 'yes': 'no');
}

const cubic_sum = (a, b) => {
  var cache = {};
  return (a, b) => {
    const key = `${a} ${b}`;
    if (cache[key] !== undefined)
      return cache[key];
    else {
      const sum = Math.pow(a, 3) + Math.pow(b, 3);

      cache[key] = sum;
      return sum;
    }
  }
}

const has_cubic_sum = (x) => {
  var cache = {};
  return (x) => {
    if (cache[x] !== undefined)
      return cache[x];
    else {
      var max = Math.ceil(Math.cbrt(x));
      var f = false;
      for (var a = 1; a <= max && !f; a++)
        for (var b = a; b <= max && !f; b++)
          if (cubic_sum(a, b) == x)
            f = true;

      cache[x] = f;
      return f;
    }
  }
}

const t = parseInt(readline());

for (var _ = 0; _ < t; _++) {
  var x = parseInt(readline());
  print(has_cubic_sum(x)? 'yes': 'no');
}

var row = readline().split(" ").map(function(x) { return parseInt(x); });
while(true) {
    var read = readline();
    if(read == undefined) break;
    var row = read.split(" ").map(function(x) { return parseInt(x); });

    var total = row[0];
    var a = 1;
    var flag = false;
    if (total > 1) {
        while(Math.pow(a, 3) <= total) {
            var remain = total - a*a*a;
            var raw = Math.pow(remain, 1/3);
            var round = Math.round(raw);
            if(Math.pow(round, 3) == remain && round % 1 === 0) {
                flag = true;
                break;
            }
            a++;
        }
    }
    if(flag)
        write("YES" + "\n");
    else
        write("NO" + "\n");
}

tt = +readline()
while (tt!==0){
    flag = false
    tt--
    n = +readline()
    for (var a=0; a*a*a<=n; a++){
        var b = n - a*a*a
        var B = Math.round(Math.cbrt(b))
        if (B>0 && b==B*B*B){
            flag = true
            break
        }
    }
    if (flag){print('YES')}
    else{print('NO')}
}

"use strict";
const fs = require("fs");
//let filename = "0.txt";
let filename = 0;
const input = fs.readFileSync(filename, "utf8").trim().split("\n");
let line = 0;
function readline() {
  return input[line++];
}
let obj = {};
const precompute = () => {
  for (let i = 1; i <= 10000; i++) obj[i * i * i] = 1;
};
const solve = () => {
  let t = parseInt(readline());
  precompute();
  while (t--) {
    let n = parseInt(readline());
    for (let i = 0; i <= 10000; i++) {
      let j = n - i * i * i;
      if (j < 0) {
        console.log("NO");
        break;
      }
      if (obj[j]) {
        console.log("YES");
        break;
      }
    }
  }
};
solve();

"use strict";
const fs = require("fs");
//let filename = "0.txt";
let filename = 0;
const input = fs.readFileSync(filename, "utf8").trim().split("\n");
let line = 0;
function readline() {
  return input[line++];
}
let obj = {};
const precompute = () => {
  for (let i = 1; i <= 9999; i++) obj[i * i * i] = 1;
};
const solve = () => {
  let t = parseInt(readline());
  precompute();
  while (t--) {
    let n = parseInt(readline());
    for (let i = 1; i <= 9999; i++) {
      let j = n - i * i * i;
      if (j < 0) {
        console.log("NO");
        break;
      }
      if (obj[j]) {
        console.log("YES");
        break;
      }
    }
  }
};
solve();


print(function(n, a) {

	a.sort(function(a, b) {
		return b - a;
	});

	var sum = 0;
	var b =a.map(function(v) {
		return sum += v;
	});

	var ans = 0;
	for (var i = 1; i <= n; i *= 4) {
		ans += b[i - 1];
	}

	return ans;

}(+readline(), readline().split(' ').map(Number)));

print(function(n, a) {

	var i, ans = 0;

	a.sort(function(a, b) {
		return b - a;
	});

	for (i = 1; i < n; i++)
		a[i] += a[i - 1];

	for (i = 1; i <= n; i *= 4)
		ans += a[i - 1];

	return ans;

}(+readline(), readline().split(' ').map(Number)));


const mod =  998244353

const processData = (lines) => {
  let [n, m] = lines[0].split(' ').map(x => +x)
  const [x0, y0] = lines[1].split(' ')

  let d = n

  let res = [].concat(Array(n-1).fill('D')).concat(Array(m-1).fill('L'))

  let dirRight = true
  while(d) {
    res = res.concat(Array(m-1).fill(dirRight ? 'R' : 'L'))
    dirRight = !dirRight
    res.push('U')
    d--
  }

  console.log(res.length)
  console.log(res.join(''))
  // console.log(n, m)
  // let resMap = Array(n).fill(1).map(x => Array(m).fill(0))
  // let pos = [x0-1, y0-1]
  // resMap[pos[0]][pos[1]] = 1
  // for (const c of res) {
  //   switch(c) {
  //     case 'L':
  //       pos[0]--
  //       break
  //     case 'R':
  //       pos[0]++
  //       break
  //     case 'D':
  //       pos[1]--
  //       break
  //     case 'U':
  //       pos[1]++
  //       break
  //   }
  //   if (pos[0] < 0) {
  //     pos[0] = 0
  //   }
  //   if (pos[0] >= n) {
  //     pos[0] = n-1
  //   }
  //   if (pos[1] < 0) {
  //     pos[1] = 0
  //   }
  //   if (pos[1] >= m) {
  //     pos[1] = m-1
  //   }
  //   resMap[pos[0]][pos[1]] = 1
  // }
  // console.log(resMap)
}

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
  const {EOL} = require('os')
  const lines = i.split(EOL) /*your input text, split by lines*/
  processData(lines)
})

process.stdin.resume()
process.stdin.setEncoding('utf-8')

let input = ''
let ptr = 0
process.stdin.on('data', (i) => {
  input += i
})

process.stdin.on('end', () => {
  input = input.split('\n').map(a => a.replace(/(\r\n|\n|\r)/gm, ''))
  main()
})

function wr(...x) {
  console.log(...x)
}

function sort(a, inc = true) {
  if(inc) a.sort((a, b) => a - b)
  else a.sort((a, b) => b - a)
}

function readInt() {
  return parseInt(input[ptr++])
}

function readString() {
  return input[ptr++]
}

function readStrings() {
  return input[ptr++].split(' ')
}

function readInts() {
  return input[ptr++].split(' ').map(a => parseInt(a))
}

function main() {
  const [n, m, k] = readInts()
  const coord = new Array(k)
  const pos = new Array(k)
  const diff = new Array(k)
  for(let i = 0; i < k; i++) {
    coord[i] = readInts()
  }
  for(let i = 0; i < k; i++) {
    pos[i] = readInts()
  }
  let map = {}
  let c = 0
  let s = ''
  for(let i = 0, l = 2 * n * m; i < l && c < k; i++) {
    for(let i = 0; i < k; i++) {
      diff[i] = [pos[i][0] - coord[i][0], pos[i][1] - coord[i][1], i, map[i] ? 1 : 0]
    }
    for(let i = 0; i < k; i++) {
      if(diff[i][0] === 0 && diff[i][1] === 0 && !map[diff[i][2]]) {
        map[diff[i][2]] = true
        diff[i][3] = 1
        c++
      }
    }
    if(c === k) break
    diff.sort(sortThis)
    // wr(diff)
    let curr = diff[0]
    let changX = curr[0]
    let changY = curr[1]
    let index = curr[2]
    for(let i = 0; i < k; i++) {
      if(changX < 0) coord[i][0] = Math.max(1, coord[i][0] + changX)
      else coord[i][0] = Math.min(n, coord[i][0] + changX)
      if(changY < 0) coord[i][1] = Math.max(1, coord[i][1] + changY)
      else coord[i][1] = Math.min(m, coord[i][1] + changY)
    }
    if(changX < 0) {
      s = s.padEnd(s.length - changX, 'U')
    }
    if(changX > 0) {
      s = s.padEnd(s.length + changX, 'D')
    }
    if(changY < 0) {
      s = s.padEnd(s.length - changY, 'L')
    }
    if(changY > 0) {
      s = s.padEnd(s.length + changY, 'R')
    }
  }
  if(c === k) {
    wr(s.length)
    wr(s)
  }
  else wr(-1)
}

function sortThis(a, b) {
  if(a[3] === 1) return 1
  else if(b[3] === 1) return -1
  if(a[0] !== b[0]) {
    if(a[0] <= 0 && b[0] <= 0) return b[0] - a[0]
    else return a[0] - b[0]
  }
  else {
    if(a[1] <= 0 && b[1] <= 0) return b[1] - a[1]
    else return a[1] - b[1]
  }
}

const mod =  998244353

const processData = (lines) => {
  let [n, m] = lines[0].split(' ').map(x => +x)

  let res = [].concat(Array(n-1).fill('L')).concat(Array(m-1).fill('D'))

  let dirRight = true
  m--
  while(m) {
    res = res.concat(Array(n-1).fill(dirRight ? 'R' : 'L'))
    dirRight = !dirRight
    res.push('U')
    m--
  }

  console.log(res.length)
  console.log(res.join(''))
}

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
  const {EOL} = require('os')
  const lines = i.split(EOL) /*your input text, split by lines*/
  processData(lines)
})

const mod =  998244353

const processData = (lines) => {
  let [n, m] = lines[0].split(' ').map(x => +x)

  let res = [].concat(Array(n).fill('L')).concat(Array(m).fill('D'))

  let dirRight = true
  while(m) {
    res = res.concat(Array(n).fill(dirRight ? 'R' : 'L'))
    dirRight = !dirRight
    res.push('U')
    m--
  }

  console.log(res.length)
  console.log(res.join(''))
}

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
  const {EOL} = require('os')
  const lines = i.split(EOL) /*your input text, split by lines*/
  processData(lines)
})

const mod =  998244353

const processData = (lines) => {
  let [n, m] = lines[0].split(' ').map(x => +x)

  let res = [].concat(Array(n-1).fill('L')).concat(Array(m-1).fill('D'))

  let dirRight = true
  while(m) {
    res = res.concat(Array(n-1).fill(dirRight ? 'R' : 'L'))
    dirRight = !dirRight
    res.push('U')
    m--
  }

  console.log(res.length)
  console.log(res.join(''))
}

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
  const {EOL} = require('os')
  const lines = i.split(EOL) /*your input text, split by lines*/
  processData(lines)
})


"use strict";
const fs = require("fs");
//let filename = "0.txt";
let filename = 0;
const input = fs.readFileSync(filename, "utf8").trim().split("\n");
let line = 0;
function readline() {
  return input[line++];
}

const solve = () => {
  let t = parseInt(readline());
  while (t--) {
    let [n, m] = readline()
      .trim()
      .split(" ")
      .map((cur) => parseInt(cur));
    let k;
    if (n % 4 === 1) k = n - 1;
    else if (n % 4 === 3) k = n;
    else if (n % 4 === 2) k = 1;
    else k = 0;
    if (k === m) console.log(n);
    else if ((k ^ m) !== n) console.log(n + 1);
    else console.log(n + 2);
  }
};
solve();

var n = parseInt(readline());
var xorList = [0];
var baseX = 0;
for (var x = 0; x < (3e5) + 10; x++){
    baseX = baseX^x;
    xorList.push(baseX);
}
var outList = [];
while(n--) {
    var cellList = readline().split(' ').map(v => parseInt(v));
    var baseX = xorList[cellList[0]]
    baseX ^= cellList[1];
    // console.log(cellList[0],cellList[1], baseX);
    if (baseX === 0){
        outList.push(cellList[0])
    }
    else if(cellList[0] === baseX){
        // console.log("2")
        outList.push(cellList[0] + 2)
    }else {
        outList.push(cellList[0] + 1)

    }
}

print(outList.join('\n'))

//Don't have to see. start------------------------------------------
var read = require('readline').createInterface({
	input: process.stdin, output: process.stdout
});
var obj; var inLine = []; var outputList = [];var retcode = new Set();
read.on('line', function(input){
	var tmp = input.split(' ');
	for(var i = 0; i < tmp.length; i++){
		inLine.push(tmp[i]);
		if(i == tmp.length - 1){
			retcode.add(inLine.length);
		}
	}
});
read.on('close', function(){
	obj = init(inLine);
	console.error('\n↑入力 ↓出力');
	Main();
	console.log(myconv(outputList, 9));
});
function makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}
function nextArray(size, code){
	var ret = new Array(size);
	for(var i = 0; i < size; i++){
		if(code == 'int'){
			ret[i] = nextInt();
		}else if(code == 'long'){
			ret[i] = BigInt(next());
		}else{
			ret[i] = next();
		}
	}
	return ret;
}
function nextIntArray(size){return nextArray(size, 'int');} function nextStrArray(size){return nextArray(size, 'str');} function nextLongArray(size){return nextArray(size, 'long');}
function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();} function nextInt(){return myconv(next(),1);} function nextLong(){return BigInt(next());}
function getCountMap(list){
	var map = {};
	for(var i = 0; i < list.length; i++){
		if(map[list[i]] == null){
			map[list[i]] = 0;
		}
		map[list[i]]++;
	}
	return map;
}
function init(input){
	return {
		list : input, index : 0, max : input.length,
		hasNext : function(){return (this.index < this.max);},
		next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}},
		isReturn : function(){return retcode.has(this.index);}
	};
}
function myout(s){outputList.push(s);}
function myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}
function isReturn(){return obj.isReturn();}
//param "no" is
//unknown or outlier : return i. 1: parseInt.
//2: split space. 4: split space and parseInt.
//6: split 1 character. 7: split 1 character and parseInt.
//8: join space. 9: join nextline. 0: join no character.
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}

//Don't have to see. end------------------------------------------
function Main(){
	var t = nextInt();
	var list = new Array(400000).fill(0);
	for(var i = 1; i < 400000; i++){
		list[i] = i ^ list[i - 1];
	}
	while(hasNext()){
		var A = nextInt();
		var B = nextInt();
		var xor = list[A - 1];
		if(xor == B){
			myout(A);
		}else if((xor ^ B) != A){
			myout(A + 1);
		}else{
			myout(A + 2);
		}
	}
}

"use strict";
const fs = require("fs");
//let filename = "0.txt";
let filename = 0;
const input = fs.readFileSync(filename, "utf8").trim().split("\n");
let line = 0;
function readline() {
  return input[line++];
}

const solve = () => {
  let t = parseInt(readline());
  while (t--) {
    let [n, m] = readline()
      .trim()
      .split(" ")
      .map((cur) => parseInt(cur));
    if (n === 1) {
      if (m === 1) console.log(3);
      else console.log(2);
      continue;
    }
    let k = n - 1,
      r;
    if (k % 4 === 1 || k % 4 === 3) {
      r = k % 4 === 1 ? 1 : 0;
    } else {
      r = k % 4 === 0 ? k : k + 1;
    }
    if (r === 0) {
      if (n === m) console.log(n + 2);
      else if (r === m) console.log(n);
      else console.log(n + 1);
    } else if (r === 1) {
      if (m - n === 1) console.log(n + 2);
      else if (r === m) console.log(n);
      else console.log(n + 1);
    } else if (r === k) {
      if (m === 1) console.log(n + 2);
      else if (r === m) console.log(n);
      else console.log(n + 1);
    } else {
      if (r === m) console.log(n);
      else console.log(n + 1);
    }
  }
};
solve();

"use strict";
const fs = require("fs");
//let filename = "0.txt";
let filename = 0;
const input = fs.readFileSync(filename, "utf8").trim().split("\n");
let line = 0;
function readline() {
  return input[line++];
}

const solve = () => {
  let t = parseInt(readline());
  while (t--) {
    let [n, m] = readline()
      .trim()
      .split(" ")
      .map((cur) => parseInt(cur));
    if (n === 1) {
      if (m === 1) console.log(3);
      else console.log(2);
      continue;
    }
    let k = n - 1;
    if (k % 4 === 1 || k % 4 === 3) {
      let r = k % 4 === 1 ? 1 : 0;
      if (r === m) console.log(n);
      else console.log(n + 1);
    } else {
      let r = k % 4 === 0 ? k : k + 1;
      if (r === k) {
        if (m === 1) console.log(n + 2);
        else if (r === m) console.log(n);
        else console.log(n + 1);
      } else {
        if (r === m) console.log(n);
        else console.log(n + 1);
      }
    }
  }
};
solve();

//Don't have to see. start------------------------------------------
var read = require('readline').createInterface({
	input: process.stdin, output: process.stdout
});
var obj; var inLine = []; var outputList = [];var retcode = new Set();
read.on('line', function(input){
	var tmp = input.split(' ');
	for(var i = 0; i < tmp.length; i++){
		inLine.push(tmp[i]);
		if(i == tmp.length - 1){
			retcode.add(inLine.length);
		}
	}
});
read.on('close', function(){
	obj = init(inLine);
	console.error('\n↑入力 ↓出力');
	Main();
	console.log(myconv(outputList, 9));
});
function makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}
function nextArray(size, code){
	var ret = new Array(size);
	for(var i = 0; i < size; i++){
		if(code == 'int'){
			ret[i] = nextInt();
		}else if(code == 'long'){
			ret[i] = BigInt(next());
		}else{
			ret[i] = next();
		}
	}
	return ret;
}
function nextIntArray(size){return nextArray(size, 'int');} function nextStrArray(size){return nextArray(size, 'str');} function nextLongArray(size){return nextArray(size, 'long');}
function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();} function nextInt(){return myconv(next(),1);} function nextLong(){return BigInt(next());}
function getCountMap(list){
	var map = {};
	for(var i = 0; i < list.length; i++){
		if(map[list[i]] == null){
			map[list[i]] = 0;
		}
		map[list[i]]++;
	}
	return map;
}
function init(input){
	return {
		list : input, index : 0, max : input.length,
		hasNext : function(){return (this.index < this.max);},
		next : function(){if(this.hasNext()){return this.list[this.index++];}else{throw 'ArrayIndexOutOfBoundsException ‚There is no more input';}},
		isReturn : function(){return retcode.has(this.index);}
	};
}
function myout(s){outputList.push(s);}
function myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}
function isReturn(){return obj.isReturn();}
//param "no" is
//unknown or outlier : return i. 1: parseInt.
//2: split space. 4: split space and parseInt.
//6: split 1 character. 7: split 1 character and parseInt.
//8: join space. 9: join nextline. 0: join no character.
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(' ');case 4:return i.split(' ').map(Number);case 6:return i.split('');case 7:return i.split('').map(Number);case 8:return i.join(' ');case 9:return i.join('\n');case 0:return i.join('');default:return i;}}catch(e){return i;}}

//Don't have to see. end------------------------------------------
function Main(){
	var t = nextInt();
	var list = new Array(400000).fill(0);
	for(var i = 1; i < 400000; i++){
		list[i] = i ^ list[i - 1];
	}
	while(hasNext()){
		var A = nextInt();
		var B = nextInt();
		if(A == 1 && B == 1){
			myout(3);
			continue;
		}
		var xor = list[A - 1];
		if(xor == B){
			myout(A);
		}else{
			myout(A + 1);
		}
	}
}