'use strict'

let N = +readline()
let lll = readline().split(' ').map(v => parseInt(v)).sort((a, b) => b - a)

let ss = 0
let p = [0]
let t = false

for (let n of lll) {
  if (n % 2) {
    t = true
    p.push(n)
    if (p.length == 2) {
      ss += p[0]
      ss += p[1]
      p = []
    }
  } else {
    ss += n
  }
}

print(t ? ss : 0)

readline = require('readline')
let stdinInput = '';

function file1(){
    //file
    var fs = require('fs');
   const inputfile = '_in.txt';
   const outputfile = '_out.txt';
   fs.writeFileSync(outputfile, '');
   var myInterface = readline.createInterface({
     input: fs.createReadStream(inputfile),
   });
   myInterface.on('line', function (line) {
      stdinInput += line+'\n';
    }).on('close', () => {
           main();
        process.exit(0);
    })
}

function std1(){
    process.stdin.resume();
    process.stdin.setEncoding('utf-8');
    process.stdin.on('data', (input) => { stdinInput += input; });
    process.stdin.on('end', () => { main(); });
}
   /*
   *  Api Scanner
   */
  class Scanner {
    constructor() {
      this.index = -1;
      this.lines = stdinInput.trim().split('\n'); // eslint-disable-line
    }

    nextLine() {
      this.index += 1;
      return this.lines[this.index].trim();
    }
    nextArray(fn) {
      const array = this.nextLine().split(' ');
      return fn === String ? array : array.map(fn);
    }

    hasNext() {
      return this.index < this.lines.length;
    }
  }

// file1();
std1();

let n, a, sum1;
function main() {
    const is = new Scanner();
    n = parseInt(is.nextLine());
    a = is.nextArray(Number);

    sum1 = 0;
    minle = 101;
    for(let i=0; i<n; i++){
        sum1+= a[i];
        if(a[i]%2!=0){
            minle = Math.min(a[i], minle);
        }
    }

    if(minle==101)
        minle = sum1;
    if(sum1%2==0)
        sum1-=minle;
    console.log(sum1);

}

'use strict';

// let inpFileStrArr = `
// 3
// 5 6 7
// `.trim().split('\n'), inpFileCounter = 0;
// function readline() {
//   return inpFileStrArr[inpFileCounter++];
// }
// function print(x) {
//   console.log(x);
// }

var isEven = function isEven(x) {
  return x % 2 === 0;
};

var n = Number(readline());
var arr = readline().split(' ').map(Number);

var sum = arr.reduce(function (a, b) {
  return a + b;
}, 0);

if (!isEven(sum)) {
  print(sum);
} else {
  arr.sort(function (a, b) {
    return a - b;
  });
  var needToRemove = arr.find(function (x) {
    return !isEven(x);
  });
  print(needToRemove ? sum - needToRemove : 0);
}

'use strict';
/*
let input = `
1
1
`.trim().split('\n');
function print(output) {
	console.log(output);
}
function readline() {
	return input.shift();
}
*/
//code

var n = Number(readline());
var flowers = readline().split(' ').map(Number);
var sum = flowers.reduce(function (acc, curr) {
	return acc + curr;
}, 0);
var minOdd = flowers.filter(function (el) {
	return el % 2 === 1;
}).sort(function (a, b) {
	return a - b;
}).shift();
print(sum % 2 === 1 ? sum : minOdd === undefined ? 0 : sum - minOdd);

var getNums = function() {
	return readline().split(' ').map(function(a) {return parseInt(a)});
};

var n = parseInt(readline());
var nums = getNums().sort(function(a, b){return b - a});
var sumParnih = 0, sumNeparnih = 0, prob = 0;

for (var i = 0; i < n; i++) {
	if (nums[i] % 2 === 0) {
		sumParnih += nums[i];
	} else {
		if (sumNeparnih == 0) {
			sumNeparnih = nums[i];
		} else {
			if (prob) {
				sumNeparnih = sumNeparnih + prob + nums[i];
				prob = 0;
			} else {
				prob = nums[i];
			}
		}
	}
}

if (sumNeparnih === 0) {
	print(0);
} else {
	print(sumParnih + sumNeparnih);
}


var matr = 'haha';

function create(str) {
   var hahaIndexArr = [];
   for (var i = 0; i < str.length; i++) {
      var hasWrong = false;
      for (var j = 0; j < matr.length; j++) {
         if (str[i + j] !== matr[j]) {
            hasWrong = true;
            break;
         }
      }
      if (!hasWrong) {
         hahaIndexArr.push(i);
      }
   }
   if (hahaIndexArr.length === 0) {
      if (str.length < 8) {
         return [str, -1, str];
      }
      return [str.substr(0, 4), 0, str.substr(str.length - 4, 0)];
   }
   var preff = str.substr(0, Math.min(4, hahaIndexArr[0])) || 'ha';
   var suff = str.substr(Math.max(hahaIndexArr[hahaIndexArr.length - 1] + 4, str.length - 4)) || 'ha';
   return [preff, hahaIndexArr.length, suff];
}
function summ(a, b) {
   var createMiddle = create(a[2] + b[0]);
   if (a[1] === -1 && b[1] === -1) {
      return createMiddle;
   }
   var preff = a[1] === -1 ? createMiddle[0] : a[0];
   var suff = b[1] === -1 ? createMiddle[2] : b[2];
   var asum = a[1] === -1 ? 0 : a[1];
   var bsum = b[1] === -1 ? 0 : b[1];
   var midSum = createMiddle[1] === -1 ? 0 : createMiddle[1];
   return [preff, asum + bsum + midSum, suff];
}

function solve() {
   var nmij = readArray(Number);
   var n = nmij[0];
   var m = nmij[1];
   write('1 1 ' + n + ' ' + m)
}

function sortF(a, b) {
   if (a < b) {
      return -1;
   }
   if (a > b) {
      return 1;
   }
   return 0;
}

function init() {
   try {
      var T;
      T = 1;
      T = Number(read());
      for (var t = 0; t < T; t++) {
         solve();
      }
   } catch (e) {
      write(e);
   }
}

function readArray(mapF) {
   var res = read().split(' ');
   if (mapF) {
      res = res.map(mapF);
   }
   return res;
}

var isNode = typeof console !== 'undefined';
var MEMORY = [];
var MEMORY_INDEX = 0;
if (isNode) {
   var fs = require('fs');

   var inTextName;
   var outTextName;
   if (process.argv.length === 5) {
      inTextName = process.argv[3];
      outTextName = process.argv[4];
   }
   MEMORY = fs.readFileSync(inTextName ? require('path').join(__dirname, inTextName) : 0, 'utf8').split('\r\n');
}
init();

function write(value) {
   isNode ? console.log('' + value) : print('' + value);
}
function read() {
   return isNode ? MEMORY[MEMORY_INDEX++] : readline();
}
function readAll() {
   if (isNode) {
      return MEMORY;
   }
   var res = [];
   var x;
   while (x = read()) {
      res.push(x);
   }
   return res;
}

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 k = lines[i].split(' ').map(Number);
        console.log(1, 1, k[0], k[1]);
    }
});

//  var gcd = function(a, b) {
//   if (!b) {
//     return a;
//   }

//   return gcd(b, a % b);
// }
let ryan = '';//.map(Number).sort(function(a, b){return a - b})
process.stdin.on('data', c => ryan += c);
process.stdin.on('end', () => {
    const {EOL} = require('os');
    const lines = ryan.split(EOL);
    var n = lines[0]
    for(j = 1; j <= n; j++){
        var k = lines[j].split(' ').map(Number)
        console.log(1, 1, k[0], k[1])
    }
});

var dataitr;
var stdin_input = "";
process.stdin.resume();
process.stdin.setEncoding("ascii");
process.stdin.on("data", function (input) { stdin_input += input; });
process.stdin.on("end", function () { dataitr = stdin_input.split('\n').values(); main(); });

const rl = () => dataitr.next().value.trim();
const rn = () => Number(rl());
const ra = () => rl().split(' ');
const rna = () => ra().map(x => Number(x));

function main () {
	let T = rn();
	while (T--) {
		const [n, m, i, j] = rna();

		console.log(1, 1, n, m);
	}
}

//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 H = nextInt();
		var W = nextInt();
		var i = nextInt();
		var j = nextInt();
		myout(H + " " + W + " 1 1");
	}
}

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

const getLine = (function () {
    const getLineGen = (async function* () {
        for await (const line of rl) {
            yield line;
        }
    })();
    return async () => ((await getLineGen.next()).value);
})();

let solve = async () => {
    const nsc = parseInt(await getLine());
    for(let sc = 0; sc < nsc; sc++) {
        let n, m, i, j;
        [n, m, i, j] = (await getLine()).split(' ').map(num => parseInt(num));
        let bestDist = -1, best1x, best2x, best1y, best2y;
        let getDist = function(x,y, x2, y2) {
            return Math.abs(x-x2) + Math.abs(y-y2);
        }
        let test = function(x1, y1, x2, y2) {
            const dist = getDist(i, j, x1, y1) + getDist(x1, y1, x2, y2) + getDist(i, j, x2, y2);
            if (dist > bestDist) {
                bestDist = dist;
                best1x = x1;
                best2x = x2;
                best1y = y1;
                best2y = y2;
            }
        }
        test(1,1,n, m);
        test(1, 1, 1, m);
        test(1, 1, n, 1);
        test(n, m, n, 1);
        test(n, m, 1, m);
        test(1, m, n, 1);
        console.log([best1x, best1y, best2x, best2y].join(' '));
    }
}

solve();

var readline = require('readline');

var rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});
var lines = [];
rl.on('line', function(input) {
    lines.push(input);
});
rl.on('close', function() {
    var t = parseInt(lines[0]);
    var l = 1;
    for (var i = 0; i < t; i++) {
        var arr = lines[l++].split(' ').map(Number)
        console.log(solve(...arr).join(' '));
    }
});

function solve(row, col, r, c) {
    if (r === 1) {
        return [row, 1, row, col]
    } else if (r === row) {
        return [1, 1, 1, col]
    } else if (c === 1) {
        return [1, col, row, col]
    } else if (c === col) {
        return [1, 1, row, 1]
    } else {
        return [1, 1, row, col]
    }
}

var cases = +readline();

for (var i = 1; i<=cases; i++){
    inp = readline().split(' ').map(x=>+x);
    n = inp[0];
    m = inp[1];

    print(1,1,n,m);
}

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 k = lines[i].split(' ').map(Number);
        console.log(1, 1, k[2], k[3]);
    }
});

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 q = lines[i].split(' ').map(Number);
        var n = q[0], k = q[1];
        var b = 0;
        for(j = 2; j <= n; j++){
            if(n % j === 0){
                b = j;
                break;
            }
        }
        k--;
        n += b;
        n += (2*k);
        console.log(n);
    }
});

let ryan = '';//.map(Number).sort(function(a, b){return a - b})
process.stdin.on('data', c => ryan += c);
process.stdin.on('end', () => {
    const {EOL} = require('os');
    const lines = ryan.split(EOL);
    var n = lines[0]
    for(j = 1; j <= n; j++){
        var k = lines[j].split('')
        if(k[k.length - 2] == 'c' && k[k.length - 1] == 'h' || k[k.length - 1] == 'x' || k[k.length - 1] == 's' ||k[k.length - 1] == 'o' ){
            if(k[k.length - 2] == 'c' && k[k.length - 1] == 'h' ){
                k.push('es')
            }else{
                k.push('es')

            }
        }
        else if(k[k.length - 2] == 'e' && k[k.length - 1] == 'f' || k[k.length - 1] == 'f'){
            if(k[k.length - 2] == 'e' && k[k.length - 1] == 'f'){
                k.splice(k.length - 2, 2)
                k.push('ves')
            }else{
                k.splice(k.length - 1, 1)
                k.push('ves')
            }
        }
        else if(k[k.length - 1] == 'y'){
             k.splice(k.length - 1, 1)
                k.push('ies')
        }
        else{
                k.push('s')
        }
        s = ''
        for(l = 0; l < k.length; l++){
            s+=k[l]
        }
        console.log(s)
    }

});


let inputString = '';
let currentLine = 0;

const runMain = () => {
  inputString = inputString.trim().split('\n').map(string => string.trim());
  main();
  process.exit();
}
const readLine = () => inputString[currentLine++];

process.stdin.on('data', inputStdin => inputString += inputStdin);
process.stdin.on('end', runMain);
process.on('SIGINT', runMain);

function main() {
  let t = readLine();
  while (t--) {
    const n = readLine();
    const a = readLine().split(' ').map(num => Number(num)).sort((a, b) => a - b);
    const res = a.reduce((acc, cur) => [cur, acc[1] + (Math.abs(acc[0] - cur) > 1 ? 1 : 0)], [a[0], 0]);
    console.log(res[1] > 0 ? 'NO' : 'YES');
  }
}

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++];
}

function print(s) {
  process.stdout.write(`${s}`);
}
// Make a Snippet for the code above this and then write your logic in main();

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

  for (let t = 0; t < N; ++t) {
    const b = readline();
    const arr = readline()
      .split(" ")
      .map((x) => parseInt(x));

    arr.sort((i, j) => i - j);

    let isYes = true;
    for (let k = 1; k < arr.length; ++k) {
      if (arr[k] - arr[k - 1] > 1) {
        print("NO\n");
        isYes = false;
        break;
      }
    }

    if (isYes) {
      print("YES\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')

    main()
})

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

const s2i = s => parseInt(s, 10)

const readLineOfBigInts = () => {
  const split = readLine().split(' ')
  const result = []
  for (let i = 0, l = split.length; i < l; i++) {
    result.push(BigInt(split[i]));
  }
  return result
}

const cmpi = (a, b) => a - b

function main() {
  let T = s2i(readLine())
  let out = ''

  while (T--) {
    const n = s2i(readLine())
    const a = readLine().split(' ').map(s2i)

    let result = 'YES'

    a.sort(cmpi)

    for (let i = 1; i < a.length; i++) {
      if (a[i] - a[i-1] > 1) {
        result = 'NO'
        break
      }
    }

    out += result + '\n'
  }

  console.log(out)
}

'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++];
}
/**
5
3
1 2 2
4
5 5 5 5
3
1 2 4
4
1 3 4 4
1
100
**/

function gcd(a, b) {
    if (!b) {
        return a;
    }

    return gcd(b, a % b);
};

function lcm(a, b) {
    return (a / gcd(a, b) * b);
}

function main() {
    let n = Number(readline());

    for(let r=0;r<n;r++) {
        solve(r);
    }

}

function solve(index) {
    let n = Number(readline());
    let a = readline().split(" ").map(Number);

    a.sort((x, y) => x - y);
    if(a.length === 1) {
        console.log('YES');
        return;
    }

    for(let i=1;i<a.length;i++) {
        if(Math.abs(a[i] - a[i-1]) > 1) {
            console.log('NO');
            return;
        }
    }

    console.log('YES');

}

let inputString = "";
let currentLine = 0;
process.stdin.on("data", (data) => {
  inputString += data;
});
process.stdin.on("end", function () {
  inputString = inputString
    .trim()
    .split("\n")
    .map((str) => str.trim());
  main();
});
function readLine() {
  return inputString[currentLine++];
}
function main() {
  let t = +readLine();
  while (t--) {
    let len = +readLine();
    const arr = readLine()
      .split(" ")
      .map((n) => parseInt(n));

    arr.sort((a, b) => a - b);
    let count = 0;
    for (let i = 0; i < len - 1; i++) {
      if (Math.abs(arr[i] - arr[i + 1]) > 1) count++;
    }
    if (count) console.log("NO");
    else console.log("YES");
  }
}

var readline = require('readline');
var rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout,
    terminal: false
});

let input = [];

rl.on('line', function (line) {
    input.push(line);
});

rl.on('close', function () {
    const total = Number(input[0]);
    for (let ii = 0; ii < 2*total; ii +=2) {
        let output = "Yes";
        const len = Number(input[ii+1]);
        let arr = input[ii+2].split(' ').map(x => Number(x));
        arr.sort((a, b) => a - b);
        for (let i = 0; i < total-1; i++) {
            if (arr[i + 1] - arr[i] > 1) {
                output = "No";
                break;
            }
        }
        console.log(output);
    }
});

const readline = require('readline');

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

let tests = [];
rl.on('line', (line) => {
  tests.push(line);
}).on('close', () => {
  for (ii = 1; ii < tests.length; ii+= 2) {
    const test = tests[ii + 1].split(' ').sort((a, b) => +a - +b);
    let count = 0;
    for(i = 0; i < test.length; i++) {

      if (
        !test[i + 1] ||
        Math.abs(+test[i] - +test[i + 1]) > 1
      ) {
        count++;
      }
    }
    if (count > 1) {
      process.stdout.write(`NO\n`);
    } else {
      process.stdout.write(`YES\n`);
    }
  }
});

//Don't have to see. start------------------------------------------
var read = require('readline').createInterface({
  input: process.stdin, output: process.stdout
});
var obj; var inLine = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
  obj = init(inLine);
  console.error("\n");
  var start = Date.now();
  Main();
  var end = Date.now() - start;
  myerr("time : " + end + "ms");
  myerr("memory : " + Math.round(process.memoryUsage().heapTotal / 1024) + "KB");
});
function makeClone(obj){return JSON.parse(JSON.stringify(obj));}
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
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";}}
  };
}
function myout(s){console.log(s);}
function myerr(s){console.error("debug:" + require("util").inspect(s,false,null));}
//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 output = new Array(t);
  for(var i = 0; i < t; i++){
    var n = nextInt();
    var list = nextIntArray();
    list.sort(function(a,b){
      return a - b;
    });
    var isOK = true;
    for(var j = 0; j < n - 1; j++){
      if(Math.abs(list[j] - list[j + 1]) > 1){
        isOK = false;
        break;
      }
    }
    output[i] = (isOK) ? "YES" : "NO";
  }
  myout(myconv(output, 9));
}

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

let stdinInput = '';

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

process.stdin.on('end', () => {
  main(stdinInput);
});

function main(data) {
	data = data.split('\n');
	const testCases = data[0] * 2;
    let i = 1;
    outer:
	while (i <= testCases) {
	  let n = data[i] * 1;
	  let a = data[i + 1].trim().split(' ').map(Number);
	  a.sort((a, b) => a - b);
	  for (let j = 1; j < n; j += 1) {
        let diff = a[j] - a[j - 1];
	    if (diff > 1) {
	      console.log('NO');
	      i += 2;
	      continue outer;
	    }
	  }
	  console.log('YES');
    i += 2;
	}
}

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++];
}

function main(){
    let t = parseInt(readline());
    for(let i = 0; i < t; i++){
        let n = parseInt(readline());
        let arr = readline().split(' ');
        arr.sort((a,b) => a-b);
        let flag = true;
        for(let j = 1; j < arr.length; j++){
            if(parseInt(arr[j])-parseInt(arr[j-1]) > 1){
                flag = false;
                console.log('NO');
                break;
            }
        }

        if(flag)
            console.log('yes');
    }
}

'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++];
}

function print(s) {
  process.stdout.write(`${s}`);
}
// Make a Snippet for the code above this and then write your logic in main();

function main() {
  // input
  let t = +readline();
  for (let i = 0; i < t; i++) {
    const n = +readline();
    const a = readline().split(' ').map(x => parseInt(x)).sort((i, j) => i - j);
    let no = false;
    for (let j = 1; j < n; j++) {
      if (Math.abs(a[j] - a[j-1]) > 1) {
        print('NO\n');
        no = true;
        break;
      }
    }
    if (!no) {
      print('YES\n');
    }
  }
}

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

const input = [];

function splitAndParseInt(line) {
  return line.split(" ").map((x) => parseInt(x));
}

readLine.on("line", (line) => input.push(line));
readLine.on("close", () => {
  let t = parseInt(input[0]);

  for (let i = 1; i <= t * 2; i += 2) {
    const n = parseInt(input[i]);

    const nums = splitAndParseInt(input[i + 1]);
    nums.sort((a, b) => a - b);

    if (nums.length === 1) {
      console.log("YES");
      continue;
    }

    let cnt = 0;
    for (let i = 1; i < nums.length; i += 1) {
      if (nums[i] - nums[i - 1] <= 1) cnt += 1;
    }

    if (nums.length - cnt <= 1) {
      console.log("YES");
    } else {
      console.log("NO");
    }
  }
});

const processData = (lines) => {
    let acc = 0
    const n = +lines[acc++]
    for (let i=0; i<n; i++) {
        acc++
        const nums = lines[acc++].split(' ').map(x => +x).sort((a, b) => a-b)
        let found = false
        for (let i=0; i<nums.length-1; i++) {
            if ((nums[i+1] - nums[i]) > 1) {
                found = true
                break
            }
        }

        console.log(found ? 'NO' : 'YES')
    }

}

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

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

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

function main() {
	let t = +readLine();
	while (t--) {
		let n = +readLine();
		let arr = readLine()
			.split(' ')
			.map(x => parseInt(x));

		arr.sort((a, b) => a - b);
		let count = 0;

		for (let i = 0; i < n - 1; i++) {
			let diff = Math.abs(arr[i] - arr[i + 1]);
			if (diff > 1) {
				count++;
			}
		}

		if (count) {
			console.log('NO');
		} else {
			console.log('YES');
		}
	}
}

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

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

function main() {
	let t = readLine() >> 0;
	while (t--) {
		let n = readLine() >> 0;
		let arr = readLine()
			.split(' ')
			.map(x => x >> 0);

		let possible = true;
		arr.sort((a, b) => a - b);

		for (let i = 1, l = arr.length; i < l; ++i) {
			let diff = arr[i] - arr[i - 1];
			if (diff > 1) {
				possible = false;
				break;
			}
		}

		possible ? console.log('YES') : console.log('NO');
	}
}

function compare(x, y) {
  return (x < y) ? (- 1) : ((x > y) ? 1 : 0);
}

const yes = 'YES';
const no = 'NO';

function solve(xs) {
  if (xs.length < 1) {
    throw Error('input is empty');
  } else if (xs.length < 2) {
    return yes;
  } else {
    xs.sort(compare);
    let max_diff = 0;
    for (let i = 1; i < xs.length; i = i + 1) {
      const a = xs[i - 1];
      const b = xs[i];
      const diff = b - a;
      max_diff = Math.max(max_diff, diff);
    }
    return (max_diff < 2) ? yes : no;
  }
}

function main(lines) {
  for (let i = 1; (i + 1) < lines.length; i = i + 2) {
    const line = lines[i + 1];
    const t = line.trim();
    if (t.length > 0) {
      const xs = t.split(/\s/).map(Number);
      const result = solve(xs);
      console.log(result)
    }
  }
}

async function processLinesFromStream(rs, pf) {
  const content = [];
  rs.setEncoding("utf-8");
  for await (let chunk of rs) {
    content.push(chunk);
  }
  const lines = content.join('').split(/\n/);
  const result = pf(lines);
  return result;
}

processLinesFromStream(process.stdin, main);

function compare(x, y) {
  return (x < y) ? (- 1) : ((x > y) ? 1 : 0);
}

const yes = 'YES';
const no = 'NO';

function solve(xs) {
  if (xs.length < 1) {
    throw Error('input is empty');
  } else if (xs.length < 2) {
    return yes;
  } else {
    xs.sort(compare);
    let max_diff = 0;
    for (let i = 1; i < xs.length; i = i + 1) {
      const a = xs[i - 1];
      const b = xs[i];
      const diff = b - a;
      max_diff = Math.max(max_diff, diff);
    }
    return (max_diff < 2) ? yes : no;
  }
}

function main(lines) {
  const whitespace = /\s+/;
  for (let i = 1; (i + 1) < lines.length; i = i + 2) {
    const line = lines[i + 1];
    const xs = line.split(whitespace).map(Number);
    const result = solve(xs);
    console.log(result)
  }
}

function trim_line(s) {
  return s.trim();
}

function has_content(s) {
  return (s.length > 0);
}

async function processLinesFromStream(rs, pf) {
  const chunks = [];
  const encoding = 'utf-8';
  rs.setEncoding(encoding);
  for await (let chunk of rs) {
    chunks.push(chunk);
  }
  const empty = '';
  const newline = /\n/;
  const lines = chunks.join(empty)
                      .split(newline)
                      .map(trim_line)
                      .filter(has_content);
  const result = pf(lines);
  return result;
}

processLinesFromStream(process.stdin, main);

function solve() {
    var n = readInt()
    var arr = readIntArray().sort((a, b) => a - b)

    var prevNum = arr[0]
    var i
    for(i=1; i<n;i++) {
        if (arr[i] - prevNum > 1) {
            print("NO")
            return
        }
        prevNum = arr[i]
    }
    print("YES")
}

var testCases = readInt();
var testCaseNum;
for(testCaseNum=0; testCaseNum<testCases; testCaseNum++) {
  solve()
}

function readIntArray() {
    return readline().split(" ").map(function(x) { return parseInt(x); });
}

function readInt() {
    return parseInt(readline())
}

let inputString = "";
let currentLine = 0;
process.stdin.on("data", (data) => {
  inputString += data;
});
process.stdin.on("end", function () {
  inputString = inputString
    .trim()
    .split("\n")
    .map((str) => str.trim());
  main();
});
function readLine() {
  return inputString[currentLine++];
}
function main() {
  let t = +readLine();
  while (t--) {
    let len = +readLine();
    const arr = readLine()
      .split(" ")
      .map((n) => parseInt(n));

    arr.sort((a, b) => a - b);
    let count = 0;
    for (let i = 0; i < len - 1; i++) {
      if (Math.abs(arr[i] - arr[i + 1]) === 2) count++;
    }
    if (count) console.log("NO");
    else console.log("YES");
  }
}

'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++];
}

function print(s) {
  process.stdout.write(`${s}`);
}
// Make a Snippet for the code above this and then write your logic in main();

function main() {
  // input
  let t = +readline();
  for (let i = 0; i < t; i++) {
    const n = +readline();
    const a = readline().split(' ').map(x => parseInt(x));
    let no = false;
    for (let j = 1; j < n; j++) {
      if (Math.abs(a[j] - a[j-1]) > 1) {
        print('NO\n');
        no = true;
        break;
      }
    }
    if (!no) {
      print('YES\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')

    main()
})

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

const s2i = s => parseInt(s, 10)

const readLineOfBigInts = () => {
  const split = readLine().split(' ')
  const result = []
  for (let i = 0, l = split.length; i < l; i++) {
    result.push(BigInt(split[i]));
  }
  return result
}

function main() {
  let T = s2i(readLine())
  let out = ''

  while (T--) {
    const n = s2i(readLine())
    const a = readLine().split(' ').map(s2i)

    let result = 'Yes'

    a.sort()

    for (let i = 1; i < a.length; i++) {
      if (a[i] - a[i-1] > 1) {
        result = 'NO'
        break
      }
    }

    out += result + '\n'
  }

  console.log(out)
}

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

    main()
})

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

const s2i = s => parseInt(s, 10)

const readLineOfBigInts = () => {
  const split = readLine().split(' ')
  const result = []
  for (let i = 0, l = split.length; i < l; i++) {
    result.push(BigInt(split[i]));
  }
  return result
}

function main() {
  let T = s2i(readLine())
  let out = ''

  while (T--) {
    const n = s2i(readLine())
    const a = readLine().split(' ').map(s2i)

    let result = 'YES'

    a.sort()

    for (let i = 1; i < a.length; i++) {
      if (a[i] - a[i-1] > 1) {
        result = 'NO'
        break
      }
    }

    out += result + '\n'
  }

  console.log(out)
}

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

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

function main() {
	let t = readLine() >> 0;
	while (t--) {
		let n = readLine() >> 0;
		let arr = readLine()
			.split(' ')
			.map(x => x >> 0);

		let possible = true;
		arr.sort();

		for (let i = 1; i < n; i++) {
			let diff = arr[i] - arr[i - 1];
			if (diff > 1) {
				possible = false;
			}
		}

		if (possible) {
			console.log('YES');
		} else {
			console.log('NO');
		}
	}
}

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

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

function main() {
	let t = readLine() >> 0;
	while (t--) {
		let n = readLine() >> 0;
		let arr = readLine()
			.split(' ')
			.map(x => x >> 0);

		if (n === 1) {
			console.log('YES');
			return;
		}

		let possible = true;
		arr.sort();

		for (let i = 1; i < n; i++) {
			let diff = Math.abs(arr[i] - arr[i - 1]);
			if (diff > 1) {
				possible = false;
				break;
			}
		}

		possible ? console.log('YES') : console.log('NO');
	}
}

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

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

function main() {
	let t = readLine() >> 0;
	while (t--) {
		let n = readLine() >> 0;
		let arr = readLine()
			.split(' ')
			.map(x => x >> 0);
		arr.sort();
		let flag = true;

		for (let i = 0; i < n - 1; i++) {
			if (Math.abs(arr[i] - arr[i + 1]) > 1) {
				flag = false;
				break;
			}
		}

		flag ? console.log('YES') : console.log('NO');
	}
}

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

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

function main() {
	let t = +readLine();
	while (t--) {
		let n = +readLine();
		let arr = readLine()
			.split(' ')
			.map(x => parseInt(x));

		let possible = true;
		arr.sort();

		for (let i = 1; i < n; i++) {
			let diff = arr[i] - arr[i - 1];
			if (diff > 1) {
				possible = false;
			}
		}

		if (possible) {
			console.log('YES');
		} else {
			console.log('NO');
		}
	}
}

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

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

function main() {
	let t = +readLine();
	while (t--) {
		let n = +readLine();
		let arr = readLine()
			.split(' ')
			.map(x => parseInt(x));

		arr.sort((a, b) => a - b);
		console.log(arr);
		let count = 0;

		for (let i = 0; i < n - 1; i++) {
			let diff = Math.abs(arr[i] - arr[i + 1]);
			if (diff > 1) {
				count++;
			}
		}

		if (count) {
			console.log('NO');
		} else {
			console.log('YES');
		}
	}
}

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

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

function main() {
	let t = +readLine();
	while (t--) {
		let n = +readLine();
		let arr = readLine()
			.split(' ')
			.map(x => parseInt(x));

		arr.sort();
		let count = 0;

		for (let i = 0; i < n - 1; i++) {
			let diff = Math.abs(arr[i] - arr[i + 1]);
			if (diff > 1) {
				count++;
			}
		}

		if (count) {
			console.log('NO');
		} else {
			console.log('YES');
		}
	}
}

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

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

function main() {
	let t = readLine() >> 0;
	while (t--) {
		let n = readLine() >> 0;
		let arr = readLine()
			.split(' ')
			.map(x => x >> 0);

		let possible = true;
		arr.sort();

		for (let i = 1, l = arr.length; i < l; ++i) {
			let diff = arr[i] - arr[i - 1];
			if (diff > 1) {
				possible = false;
				break;
			}
		}

		possible ? console.log('YES') : console.log('NO');
	}
}

let inputString = '';
let currentLine = 0;
process.stdin.on('data', data => {
	inputString += data;
});
process.stdin.on('end', function () {
	inputString = inputString
		.trim()
		.split('\n')
		.map(str => str.trim());
	main();
});

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

function main() {
	let t = readLine() >> 0;
	while (t--) {
		let n = readLine() >> 0;
		let arr = readLine()
			.split(' ')
			.map(x => x >> 0);

		if (n === 1) {
			console.log('YES');
			continue;
		}

		let possible = true;
		arr.sort();

		for (let i = 1; i < n; i++) {
			let diff = Math.abs(arr[i] - arr[i - 1]);
			if (diff > 1) {
				possible = false;
				break;
			}
		}

		possible ? console.log('YES') : 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++];
}

function print(s) {
  process.stdout.write(`${s}`);
}
// Make a Snippet for the code above this and then write your logic in main();

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

  for (let i = 0; i < N; ++i) {
    const arr = readline()
      .split(" ")
      .map((x) => parseInt(x));

    arr.sort();

    const isYes = arr.every((x, i) => {
      if (i < 1) {
        return true;
      } else if (Math.abs(x - arr[i - 1]) <= 1) {
        return true;
      } else {
        return false;
      }
    });

    if (isYes) {
      print("YES");
    } else {
      print("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++];
}

function print(s) {
  process.stdout.write(`${s}`);
}
// Make a Snippet for the code above this and then write your logic in main();

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

  for (let t = 0; t < N; ++t) {
    const b = readline();
    const arr = readline()
      .split(" ")
      .map((x) => parseInt(x));

    arr.sort();

    let isYes = true;
    for (let k = 1; k < arr.length; ++k) {
      if (arr[k] - arr[k - 1] > 1) {
        print("NO\n");
        isYes = false;
        break;
      }
    }

    if (isYes) {
      print("YES\n");
    }
  }
}

'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++];
}

function print(s) {
  process.stdout.write(`${s}`);
}
// Make a Snippet for the code above this and then write your logic in main();

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

  for (let i = 0; i < N; ++i) {
    const arr = readline()
      .split(" ")
      .map((x) => parseInt(x));

    arr.sort();

    const isYes = arr.every((x, i) => {
      if (i < 1) {
        return true;
      } else if (Math.abs(x - arr[i - 1]) <= 1) {
        return true;
      } else {
        return false;
      }
    });

    if (isYes) {
      print("YES");
    } else {
      print("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++];
}

function print(s) {
  process.stdout.write(`${s}`);
}
// Make a Snippet for the code above this and then write your logic in main();

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

  for (let t = 0; t < N; ++t) {
    const arr = readline()
      .split(" ")
      .map((x) => parseInt(x));

    arr.sort();

    const isYes = arr.every((x, i) => {
      if (i < 1) {
        return true;
      } else if (Math.abs(x - arr[i - 1]) <= 1) {
        return true;
      } else {
        return false;
      }
    });

    if (isYes) {
      print("YES");
    } else {
      print("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++];
}

function print(s) {
  process.stdout.write(`${s}`);
}
// Make a Snippet for the code above this and then write your logic in main();

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

  for (let t = 0; t < N; ++t) {
    const b = readline();
    const arr = readline()
      .split(" ")
      .map((x) => parseInt(x));

    arr.sort();

    let isYes = true;
    for (let k = 1; k < arr.length; ++k) {
      if (arr[k] - arr[k - 1] > 1) {
        print("NO");
        isYes = false;
        break;
      }
    }

    if (isYes) {
      print("YES");
    }
  }
}

'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++];
}
/**
5
3
1 2 2
4
5 5 5 5
3
1 2 4
4
1 3 4 4
1
100
**/

function gcd(a, b) {
    if (!b) {
        return a;
    }

    return gcd(b, a % b);
};

function lcm(a, b) {
    return (a / gcd(a, b) * b);
}

function main() {
    let n = Number(readline());

    for(let r=0;r<n;r++) {
        solve(r);
    }

}

function solve(index) {
    let n = Number(readline());
    let a = readline().split(" ").map(Number);

    if(a.length === 1) {
        console.log('YES');
        return;
    }

    for(let i=1;i<a.length;i++) {
        if(Math.abs(a[i] - a[i-1]) > 1) {
            console.log('NO');
            return;
        }
    }

    console.log('YES');

}

function solve() {
    var n = readInt()
    var arr = readIntArray().map( x => x * 1).sort()

    var prevNum = arr[0]
    var i
    for(i=1; i<n;i++) {
        if (arr[i] - prevNum > 1) {
            print("NO")
            return
        }
        prevNum = arr[i]
    }
    print("YES")
}

var testCases = readInt();
var testCaseNum;
for(testCaseNum=0; testCaseNum<testCases; testCaseNum++) {
  solve()
}

function readIntArray() {
    return readline().split(" ").map(function(x) { return parseInt(x); });
}

function readInt() {
    return parseInt(readline())
}

function solve() {
    var n = readInt()
    var arr = readIntArray().sort()

    var prevNum = arr[0]
    var i
    for(i=1; i<n;i++) {
        if (arr[i] - prevNum > 1) {
            print("NO")
            return
        }
        prevNum = arr[i]
    }
    print("YES")
}

var testCases = readInt();
var testCaseNum;
for(testCaseNum=0; testCaseNum<testCases; testCaseNum++) {
  solve()
}

function readIntArray() {
    return readline().split(" ").map(function(x) { return parseInt(x); });
}

function readInt() {
    return parseInt(readline())
}


function main() {
  var n = readline();

  var numNeg = 0;
  var numPos = 0;

  for (var i = 0; i < n; i++) {
    var x = readline().split(' ')[0];

    if (x > 0) {
      numPos++;
    } else {
      numNeg++;
    }
  }

  print(numPos < 2 || numNeg < 2 ? 'Yes' : 'No');
}

main();

var n = Number(readline());
var min = 0, plu = 0;
for(var i = 0; i < n; i++){
    var c = readline().split(' ').map(Number);
    if(c[0] < 0)
        min++;
    else
        plu++;
}
if(min <=1 || plu <=1)
print("Yes");
else
print("No");

n=Number(readline())
var A=[]
for (var i=0;i<n;++i) A.push(Number(readline().split(' ')[0]))
var ne=A.reduce((a,v)=>a+(v<0),0)
print((!ne || ne===1 || ne===(n-1) || ne===n)?'Yes':'No')

var n=readline();
n=parseInt(n);
var cordinate,x,y;
var positivex=0;
var negativex=0;

    for (var i=0;i<n;i++) {
       cordinate=readline().split(" ")
       x=parseInt(cordinate[0]);
       y=parseInt(cordinate[1]);
       if (x>0) {
          positivex += 1;
       } else {
         negativex += 1;

       }
    }

	if (positivex===1 || positivex===0) {
		write("Yes");
	} else if (negativex===1 || negativex===0) {
		write("Yes");
	} else {
		write("No");
	}

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')
  const n = parseInt(arr.shift())
  let xg = 0
  let xl = 0
  for(let i = 0; i < n; i ++) {
    const co = arr[i].split(' ')
    if(parseInt(co[0]) > 0) xg++
    else xl ++
  }
  if((xg <= 1 && xl >= 0) || (xl <= 1 && xg >= 0)) {
    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 = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
	obj = init(inLine);
	console.error('\n↑入力 ↓出力');
	Main();
});
function makeClone(obj){return (obj instanceof Set) ? new Set(Array.from(obj)) : JSON.parse(JSON.stringify(obj));}
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
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';}}
	};
}
function myout(s){console.log(s);}
function myerr(s){console.error('debug:' + require('util').inspect(s,false,null));}
//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 N = nextInt();
  var L = 0;
  var R = 0;
  for(var i = 0; i < N; i++){
    var tmp = nextIntArray();
    if(tmp[0] < 0){
      L++;
    }else{
      R++;
    }
  }
  if(L > 1 && R > 1){
    myout("No");
  }else{
    myout("Yes");
  }
}

const readline = require('readline');
const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});
let c = 0;
let L = 0;
let R = 0;

rl.on('line', (d) => {
  if (c === 0) {
    c++;
    return;
  }

  const [x, y] = d.split(' ').map(Number);

  if (x > 0) {
    R++;
  }
  else {
    L++;
  }

  c++;
});

rl.on('close', () => {
  if (L <= 1 || R <= 1) {
    console.log('YES');
  }
  else {
    console.log('NO');
  }
});

var N = parseInt( readline() );
var num1 = 0;
var num2 = 0;

for(var i=0;i<N;i++){
	var a = readline().split(" ");
	if(  parseInt(a[0]) < 0){
		num1 += 1;
	}else{
		num2 += 1;
	}
}

if( num1 <= 1 || num2 <= 1 ){
	print('Yes');
}else{
	print('No');
}

var num = parseInt(readline());
var xPos = 0;
var xNeg = 0;
var canBeDone = true;

for (var i = 0; i < num; i++) {
  var x = readline().split(' ').map(function(element) {
    return parseInt(element);
  })[0];

  if (x > 0) {
    xPos++;
  } else {
    xNeg++;
  }

  if (xPos > 1 && xNeg > 1) {
    canBeDone = false;
    print('No');
    break;
  }
}

if (canBeDone) {
  print('Yes');
}

var num = parseInt(readline());
var dev = 0;

for (var i = 0; i < num; i++) {
  var x = readline().split(' ').map(function(element) {
    return parseInt(element);
  })[0];

  if (x > 0) {
    dev++;
  } else {
    dev--;
  }
}

if (num - Math.abs(dev) <= 2) {
  print('Yes');
} else {
  print('No');
}

function toInt(x) {
	return parseInt(x);
}

var n = toInt(readline());
var x, plus = 0, minus = 0;

for (var i = 0; i < n; i++) {
	x = readline().split(" ").map(toInt);
	if (x[0] < 0) {
		minus++;
	} else {
		plus++;
	}
}

if (plus > 1 && minus > 1) {
	print("NO");
} else {
	print("YES");
}

var n = readline();
var positiveCount = 0;
var negativeCount = 0;
for (var i = 0; i < n; i++) {
    var point = parseInt(readline());
    if (point > 0) {
        positiveCount++;
    } else {
        negativeCount++;
    }
    if (positiveCount > 1 && negativeCount > 1) {
        print('No');
        break;
    }
}
if (positiveCount <= 1 || negativeCount <= 1) {
    print('Yes');
}

var num = parseInt(readline());
var dev = 0;

for (var i = 0; i < num; i++) {
  var x = readline().split(' ').map(function(element) {
    return parseInt(element);
  })[0];

  if (x > 0) {
    dev++;
  } else {
    dev--;
  }
}
print(dev);
if (num - Math.abs(dev) <= 2) {
  print('Yes');
} else {
  print('No');
}

function toInt(x) {
	return parseInt(x);
}

var n = toInt(readline());
var x, plus = 0, minus = 0;

for (var i = 0; i < n; i++) {
	x = readline().split(" ").map(toInt);
	if (x[0] < 0) {
		minus++;
	} else {
		plus++;
	}
}

if (Math.abs(plus-minus) < 2) {
	print("YES");
} else {
	print("NO");
}

function main() {
  var n = readline();

  var numNeg = 0;
  var numPos = 0;

  for (var i = 0; i < n; i++) {
    var y = readline().split(' ')[1];

    if (y > 0) {
      numPos++;
    } else {
      numNeg++;
    }
  }

  print(numPos < 2 || numNeg < 2 ? 'Yes' : 'No');
}

main();

var n=readline();
n=parseInt(n);
var cordinate,x,y;
var positivex=0;
var negativex=0;

    for (var i=0;i<n;i++) {
       cordinate=readline().split(" ")
       x=parseInt(cordinate[0]);
       y=parseInt(cordinate[1]);
       if (x>0) {
          positivex += 1;
       } else {
         negativex += 1;

       }
    }

	if (positivex===1) {
		write("Yes");
	} else if (negativex===1) {
		write("Yes");
	} else {
		write("No");
	}


"use strict";

var ans ="";

function hasEven(x1 , x2){

	ans ="";

	var eq1 =(x2 -1) *2;
	var eq2 =x1 -eq1;

	if(eq2 >0 && !(eq2 &1) && eq1 +eq2 ==x1){

        x2 --;
        while(x2 --) ans +=" " +'2';
        ans +=" " +eq2.toString();

        return "YES";

    }
    return "NO";

}

function hasOdd(x1 , x2){

	ans ="";

	var eq1 =(x2 -1);
	var eq2 =x1 -eq1;

	if(eq2 >0 && (eq2 &1) && eq1 +eq2 ==x1){

        x2 --;
        while(x2 --) ans +=" " +'1';
        ans +=" " +eq2.toString();

        return "YES";

    }
    return "NO";

}

var cases =parseInt(readline());

while(cases --){

	ans ="";
	var read =readline().split(" ");
	var n =parseInt(read[0]);
	var k =parseInt(read[1]);

	if(k <=n && hasEven(n , k) =="YES"){

		print("YES");
		print(ans.trim());

	}else if(k <=n && hasOdd(n , k) =="YES"){

		print("YES");
		print(ans.trim());

	}else{
		print("NO");
	}

}

var t = parseInt(readline());
for (var tc = 0; tc < t; tc++) {
  var nk = readline()
    .split(" ")
    .map((val) => parseInt(val));
  var n = nk[0],
    k = nk[1];
  var res = "";
  var flag = false;
  if (n % k == 0) {
    for (var j = 0; j < k; j++) {
      res += " " + n / k;
      flag = true;
    }
  } else if (n - k + 1 < 2) res = "No";
  else {
    if (n % 2 == 0) {
      if (k % 2 == 0) {
        res += n - k + 1;
        for (var i = 0; i < k - 1; i++) res += " " + 1;
        flag = true;
      } else {
        if (n - 2 * (k - 1) >= 4) {
          res += n - 2 * (k - 1);
          for (var i = 0; i < k - 1; i++) res += " " + 2;
          flag = true;
        } else res = "No";
      }
    } else {
      if (k % 2 == 0) {
        res = "No";
      } else {
        res += n - k + 1;
        for (var i = 0; i < k - 1; i++) res += " " + 1;
        flag = true;
      }
    }
  }
  if (flag) {
    print("Yes");
    print(res.trim());
  } else print(res.trim());
}

function main() {
  var testCasesNum = +readline();
  for (var i = 0; i < testCasesNum; i++) {
    var nk = readline().split(" ").map(Number);
    var n = nk[0];
    var k = nk[1];

    var nk1 = n - k + 1;
    var arr = new Array(k - 1).fill(1);
    if (nk1 % 2 === 1 && nk1 > 0) {
      arr.push(nk1);
      print("YES");
      print(arr.join(" "));
      continue;
    }

    var nk2 = n - (k - 1) * 2;
    var arr2 = new Array(k - 1).fill(2);
    if (nk2 % 2 === 0 && nk2 > 0) {
      arr2.push(nk2);
      print("YES");
      print(arr2.join(" "));
      continue;
    }
    print("NO");
  }
}

main();

'use strict';

let t = parseInt(readline(), 10);

while (t--) {
    const parts = readline().split(' ');
    let n = parseInt(parts[0], 10);
    let k = parseInt(parts[1], 10);

    function helper(N, K, result, sub) {
        const mod = sub % 2;
        while (N > 0 && K > 0) {
            if (N % K === 0 && N / K % 2 === mod) {
                const div = N / K;
                N -= div;
                K -= 1;
                result.push(div);
            } else {
                N -= sub;
                K -= 1;
                result.push(sub);
            }
        }
        return {N, K, result};
    }

    const resultOdd = helper(n, k, [], 1);
    const resultEven = helper(n, k, [], 2);

    if (resultOdd.N === 0 && resultOdd.K === 0) {
        print('YES');
        print(resultOdd.result.join(' '));
    } else if (resultEven.N === 0 && resultEven.K === 0) {
        print('YES');
        print(resultEven.result.join(' '));
    } else {
        print('NO');
    }
}

'use strict';

let t = parseInt(readline(), 10);

while (t--) {
    const parts = readline().split(' ');
    let n = parseInt(parts[0], 10);
    let k = parseInt(parts[1], 10);

    function helper(N, K, result, sub) {
        while (K > 1) {
            N -= sub;
            K -= 1;
            result.push(sub);
        }
        if (N <= 0 || N % 2 !== sub % 2) {
            return null;
        }
        result.push(N);
        return result;
    }

    const resultOdd = helper(n, k, [], 1);
    const resultEven = helper(n, k, [], 2);

    if (resultOdd) {
        print('YES');
        print(resultOdd.join(' '));
    } else if (resultEven) {
        print('YES');
        print(resultEven.join(' '));
    } else {
        print('NO');
    }
}

'use strict';

let t = parseInt(readline(), 10);

while (t--) {
    const parts = readline().split(' ');
    let n = parseInt(parts[0], 10);
    let k = parseInt(parts[1], 10);

    if (k > n) {
        print('NO');
        continue;
    }

    function helper(N, K, result, subs) {
        while (N > 0 && K > 0) {
            if (
                N % K === 0 &&
                (N / K) % 2 === (subs === 2 ? 0 : 1)
            ) {
                const div = N / K;
                N -= div;
                K -= 1;
                result.push(div);
            } else {
                N -= subs;
                K -= 1;
                result.push(subs);
            }
        }
        return {N, K, result};
    }

    const resultOdd = helper(n, k, [], 1);
    const resultEven = helper(n, k, [], 2);

    if (resultOdd.N === 0 && resultOdd.K === 0) {
        print('YES');
        print(resultOdd.result.join(' '));
    } else if (resultEven.N === 0 && resultEven.K === 0) {
        print('YES');
        print(resultEven.result.join(' '));
    } else {
        print('NO');
    }
}

'use strict';

const parseProblem = (line, problem) => {
    if (!problem.T || problem.T === 0) {
        const result = {problem,
            T: parseInt(line),
            isProcessing: true,
            cases: []
        };
        return result;
    }

    const cases = problem.cases;

    if (cases.length === 0 || !cases[cases.length - 1].isProcessing) {
        cases.push({
            t: line
        });
    }

    const isProcessing = cases.length < problem.T;
    problem.isProcessing = isProcessing;

    return problem;
};

const solve = data => {
    const [n, k] = data.t.split(' ');
    let result = [];

    const v1 = n - (k - 1);
    const v2 = n - 2 * (k - 1);

    if(v1 > 0 && v1 % 2 == 1) {
        for(let i = 0; i < k - 1; i++) {
            result.push(1);
        }
        result.push(v1);
    } else if (v2 > 0 && v2 % 2 == 0) {
        for(let i = 0; i < k - 1; i++) {
            result.push(2);
        }
        result.push(v2);
    }

    return result;
}

const solveCases = cases => {
    for (let index = 0; index < cases.length; index++) {
        const result = solve(cases[index]);
        console.log((result.length) ? ('YES' + '\n' + result.join(' ')) : 'NO');
    }
};

const main = () => {
    const readline = require('readline');

    let problem = {
        T: 0,
        cases: [],
        isProcessing: true
    };

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

    rl.on('line', line => {
        problem = parseProblem(line, problem);

        if (!problem.isProcessing) {
            rl.close();
        }
    }).on('close', () => {
        solveCases(problem.cases);
        process.exit(0);
    });
};

if (!module.parent) {
    main();
}

'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(str => str.trim());

    main();
});

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

function main() {
    const t = parseInt(readLine(), 10);
    for (let j = 0;j<t;j++){
        let [n,k] = readLine().split(' ').map(x=>parseInt(x));
        if (k % 2 == 0 && n % 2 != 0) {
            console.log('NO')
            continue;
        }

        let solution = [];
        let odd = k % 2 == 0 || n % 2 != 0;
        let sum = 0;

        for (let i = 0; i<k  - 1; i++) {
            solution.push(odd ? 1 : 2);
            sum += solution[i];
        }

        if (n <= sum) {
            console.log("NO")
            continue;
        }

        solution.push(n - sum);
        console.log("YES")
        console.log(solution.join(" "))
    }

}

var read = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
var obj;
var inLine = [];
read.on('line', function(input){inLine.push(input);});
read.on('close', function(){
  obj = init(inLine);
  myerr("-----start-----");
  var start = new Date();
  Main();
  var end = new Date() - start;
  myerr("----- end -----");
  myerr("time : " + (end) + "ms");
});
function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);}
function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);}
function next(){return obj.next();} function hasNext(){return obj.hasNext();}
function init(input){
  var returnObj = {
    list : input, index : 0, max : input.length,
    hasNext : function(){return (this.index < this.max);},
    next : function(){if(!this.hasNext()){throw "ArrayIndexOutOfBoundsException これ以上ないよ";}else{var returnInput = this.list[this.index];this.index++;return returnInput;}}
  };
  return returnObj;
}
function myout(s){console.log(s);}
function myerr(s){console.error("debug:" + require("util").inspect(s,false,null));}
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す 1:数値へ変換
//2:半角SPで分割 4:半角SPで分割し、数値配列へ
//6:1文字で分割  7:1文字で分割し、数値配列へ
//8:半角SPで結合 9:改行で結合 0:文字なしで結合
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;}}
function Main(){
        var t = nextInt();
	var output = [];
	for(var i = 0; i < t; i++){
		var one = nextIntArray();
		var N = one[0];
		var K = one[1];
		if(N % K == 0){
			output.push("YES");
			var list = new Array(K);
			for(var j = 0; j < K; j++){
				list[j] = N / K;
			}
			output.push(myconv(list,8));
			continue;
		}
		if(N < K){
			output.push("NO");
			continue;
		}

		if((N - (K - 1)) % 2 == 1){
			output.push("YES");
			var list = new Array(K);
			list.fill(1);
			list[K - 1] = N - (K - 1);
			output.push(myconv(list,8));
			continue;
		}

		if((N - (K - 1) * 2) > 0 && (N - (K - 1) * 2) % 2 == 0){
			output.push("YES");
			var list = new Array(K);
			list.fill(2);
			list[K - 1] = N - (K - 1) * 2;
			output.push(myconv(list,8));
			continue;
		}
		output.push("NO");

	}
	myout(myconv(output,9));
}

"use strict";
var __spreadArrays = (this && this.__spreadArrays) || function () {
    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
    for (var r = Array(s), k = 0, i = 0; i < il; i++)
        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
            r[k] = a[j];
    return r;
};
exports.__esModule = true;
var str = "", lines = [], idxLine = 0;
process.stdin.resume();
process.stdin.setEncoding('utf-8');
process.stdin.on('data', function (x) { str += x; });
process.stdin.on('end', function () {
    lines = str.trim().split('\n').map(function (x) { return x.trim(); });
    main();
});
function readline() {
    return lines[idxLine++];
}
var print = console.log;
//===============================
//===============================
function main() {
    var t = parseInt(readline());
    for (var _ = 0; _ < t; _++) {
        var _a = readline().split(" ").map(function (e) { return parseInt(e); }), n = _a[0], k = _a[1];
        var a = n - (k - 1);
        var b = n - (k - 1) * 2;
        var x = [];
        if (a > 0 && a % 2 != 0) {
            x = __spreadArrays([a], (Array(k - 1).fill(1)));
        }
        else if (b > 0 && b % 2 == 0) {
            x = __spreadArrays([b], (Array(k - 1).fill(2)));
        }
        if (x.length) {
            print("YES");
            print(x.join(" "));
        }
        else {
            print("NO");
        }
    }
}

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
    const {EOL} = require('os')
    const lines = i.split(EOL);

    function foo (num, col) {
        let body = col - 1;
        let rest = num - body;
        let arr = [];

        if (rest <= 0) return ['NO'];
        if (rest%2 === 1) {
            arr = Array(body).fill(1);
            arr.push(rest);
            return ['YES', arr.join(' ')];
        }

        body = 2 * (col - 1);
        rest = num - body;

        if (rest <= 0) return ['NO'];
        if (rest%2 === 0) {
            arr = Array(body/2).fill(2);
            arr.push(rest);
            return ['YES', arr.join(' ')]
        }

        return ['NO'];
    }

    let testCount = 1;
    let answer = '';
    while(testCount <= +lines[0]) {
        let data = lines[testCount].split(" ").map(Number);
        let result = foo(data[0], data[1]);
        answer += result[0] +"\n";
        if (result[1]) answer += result[1] +"\n";
        testCount++;
    }
    console.log(answer);
})

const processData = (lines) => {
  const n = +lines[0]
  for (let i=0; i<n; i++) {
    let [a, k] = lines[i+1].split(' ').map(x => +x)

    if (a%2 === 1 && k%2 === 1) {
      if (k > a) {
        console.log('NO')
      } else {
        console.log('YES')
        const res = Array(k).fill(1)
        res[0] = a-k+1
        console.log(res.join(' '))
      }
    } else {
      if (a%2 === 1 && k%2 === 0) {
        console.log('NO')
      } else {
        if (k%2 === 0) {
          if (k>a) {
            console.log('NO')
          } else {
            console.log('YES')
            const res = Array(k).fill(1)
            res[0] = a-k+1
            console.log(res.join(' '))
          }
        } else {
          const min = k*2
          if (min > a) {
            console.log('NO')
          } else {
            console.log('YES')
            const res = Array(k).fill(2)
            res[0] = a-k*2+2
            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)
})

var readline = require('readline');
var rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});

var input  = []
rl.on('line', function(line){
    input.push(line);
})

rl.on("close", ContestResponse);

function ContestResponse(){
    let index = 0;
    var nCases = parseInt(input[index++]);
    for (let i = 0; i < nCases; i++){

      var line = input[index++].split(" ");
      var n = parseInt(line[0]);
      var k = parseInt(line[1]);

      var str = '';

      if (n % 2 === 0 && (n - ((k - 1) * 2)) % 2 === 0 && n - ((k - 1) * 2) > 0){
        console.log("YES");
        for (var j = 0; j < k - 1; j++){
          str += "2 ";
        }
        str += ""+ (n - ((k - 1) * 2));
      }
      else if ((n - (k - 1)) % 2 !== 0 && (n - (k - 1)) % 2 > 0){
        console.log('YES');
        for (var j = 0; j < k - 1; j++){
          str += '1 ';
        }
        str += '' + (n - (k - 1));
      }
      else{
        console.log('NO');
        continue;
      }
      console.log(str);
    }
}

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

// your code goes here

// declare global variables
var input_stdin = "";
var noOfTestcase = 0;

// standard input is stored into input_stdin
process.stdin.on('data', function (data) {
    input_stdin += data;
});

// standard input is done and stored into an array
process.stdin.on('end', function () {
    chunks = input_stdin.split("\n");
    noOfTestcase = chunks[0];
    process.stdout.write('\n');
    for(let i=1; i < chunks.length; i++){
      let row = chunks[i].split(" ");
      if(isNaN(row[0]) || isNaN(row[1])){
        // do nothing
      }else{
        start(Number(row[0]), Number(row[1]));
      }
    }
});

function isEven(val){
  if(val%2 == 0){
    return true
  }
  return false
}

function start(sum,K){
  // console.log("sum = ",sum, " K=",K);
  let eS = isEven(sum);
  let eK = isEven(K);
  // console.log("eS = ",eS, " eK=",eK);
  if(sum < K ){
    // console.log("less than");
    process.stdout.write("NO"+ '\n');
  }else if (!eS && eK) {
    // console.log("odd - even condition");
    process.stdout.write("NO"+ '\n');
  }else if (eS && !eK && sum < (2*K)) {
    // console.log("even - odd but twice condition");
    process.stdout.write("NO"+ '\n');
  }else {
    process.stdout.write("YES"+ '\n');
    let str = ""
    if(!eS){
      for(let k=1; k < K; k++){
        str +="1 "
      }
      str+=(sum-K+1)
    }else{
      if(!eK){
        for(let k=1; k < K; k++){
          str +="2 "
        }
        str+=(sum-(2*K)+2)
      }else{
        for(let k=1; k < K; k++){
          str +="1 "
        }
        str+=(sum-K+1)
      }
    }
    process.stdout.write(str+ '\n');
  }
  return;
}

'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++];
}
/**
  8
10 3
100 4
8 7
97 2
8 8
3 10
5 3
1000000000 9

**/

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

    for(let r=0;r<range;r++) {
        let [n , k] = readline().split(" ").map(Number);

        if( n% 2 !== 0 && k % 2 === 0) {
            console.log('NO');
            continue;
        }

        let odd = n % 2 === 0 && k % 2 !== 0;
        let count = 0;
        let output = [];

        for(let i=0;i<k-1;i++) {
            output.push(odd ? 2: 1);
            count += odd ? 2 : 1;
        }

        if(count >= n) {
            console.log('NO');
            continue;
        }

        output.push(n - count);
        console.log('YES');
        console.log(output.join(" "));
    }

}

'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.replace(/\s*$/, '')
    .split('\n')
    .map(str => str.replace(/\s*$/, ''));
  main();
});

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

function solve(n, k) {
  let res = [];
  let total = 0;
  let base = 1;
  for (let i = 1; i <= k; i++) {
    if (i === k) {
      let last = n - total;
      if (last > 0 && last % 2 === 1) {
        res.push(last);
        return res;
      }
    }
    res.push(base);
    total += base;
  }
  res = [];
  total = 0;
  base = 2;
  for (let i = 1; i <= k; i++) {
    if (i === k) {
      let last = n - total;
      if (last > 0 && last % 2 === 0) {
        res.push(last);
        return res;
      }
    }
    res.push(base);
    total += base;
  }
  return 0;
}

function main() {
  const t = parseInt(readLine());
  for (let i = 0; i < t; i++) {
    let [n, k] = readLine().split(' ').map((val) => parseInt(val));
    // let a = readLine().split(' ').map((val) => parseInt(val));
    let res = solve(n, k);
    if (res.length > 0) console.log('YES', res.join(' '));
    else console.log('NO');
  }
  //process.stdout.write("hello: ");
}

'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() {

    let cases = parseInt(readline(), 10);
    for (var X = 0; X < cases; X++) {
      const [n,k] = readline().split(" ").map(e => parseInt(e));
      let result = new Array(k);

      let pairity = (k % 2) != (n %2) ? 0 : 1;
      if (pairity === 0) {
        result.fill(2);
        let first = n - ((k-1) * 2);
        if (first % 2 != 0 || first <= 0) {
          console.log('NO');
          continue;
        }
        result[0] = first;
      } else {
        result.fill(1);
        let first = n - (k-1);
        if (first % 2 != 1 || first <= 0) {
          console.log('NO');
          continue;
        }
        result[0] = first;
      }

      console.log('YES');
      console.log(result.join(' '))

    }

}

var ans ="";

function hasEven(x1 , x2){

	ans ="";

	var eq1 =(x2 -1) *2;
	var eq2 =x1 -eq1;

	if(eq2 >0 && !(eq2 &1) && eq1 +eq2 ==x1){

        x2 --;
        while(x2 --) ans +=" " +'2';
        ans +=" " +eq2.toString();

        return "YES";

    }
    return "NO";

}

function hasOdd(x1 , x2){

	ans ="";

	var eq1 =(x2 -1);
	var eq2 =x1 -eq1;

	if(eq2 >0 && (eq2 &1) && eq1 +eq2 ==x1){

        x2 --;
        while(x2 --) ans +=" " +'1';
        ans +=" " +eq2.toString();

        return "YES";

    }
    return "NO";

}

var cases =parseInt(readline());

while(cases --){

	ans ="";
	var read =readline().split(" ");
	var n =parseInt(read[0] , 10);
	var k =parseInt(read[1] , 10);

	if(k <=n && hasEven(n , k) =="YES"){

		print("YES");
		print(ans.trim());

	}else if(k <=n && hasOdd(n , k) =="YES"){

		print("YES");
		print(ans.trim());

	}else{
		print("NO");
	}

}

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
    const {EOL} = require('os')
    const lines = i.split(EOL);

    function foo (num, col) {
        let body = col - 1;
        let rest = num - body;

        if (rest < 0) return ['NO'];
        if (rest%2 === 1) {
            return ['YES', `${Array(body).fill(1).join(' ')} ${rest}`];
        }

        body = 2 * (col - 1);
        rest = num - body;

        if (rest < 0) return ['NO'];
        if (rest%2 === 0) {
            return ['YES', `${Array(body/2).fill(2).join(' ')} ${rest}`]
        }

        return ['NO'];
    }

    let testCount = 1;
    let answer = '';
    while(testCount <= +lines[0]) {
        let data = lines[testCount].split(" ").map(Number);
        let result = foo(data[0], data[1]);
        answer += result[0] +"\n";
        if (result[1]) answer += result[1] +"\n";
        testCount++;
    }
    console.log(answer);
})

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
    const {EOL} = require('os')
    const lines = i.split(EOL);

    function foo (num, col) {
        let body = col - 1;
        let rest = num - body;
        let arr = [];

        if (rest < 0) return ['NO'];
        if (rest%2 === 1) {
            arr = Array(body).fill(1);
            arr.push(rest);
            return ['YES', arr.join(' ')];
        }

        body = 2 * (col - 1);
        rest = num - body;

        if (rest < 0) return ['NO'];
        if (rest%2 === 0) {
            arr = Array(body/2).fill(2);
            arr.push(rest);
            return ['YES', arr.join(' ')]
        }

        return ['NO'];
    }

    let testCount = 1;
    let answer = '';
    while(testCount <= +lines[0]) {
        let data = lines[testCount].split(" ").map(Number);
        let result = foo(data[0], data[1]);
        answer += result[0] +"\n";
        if (result[1]) answer += result[1] +"\n";
        testCount++;
    }
    console.log(answer);
})

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

// your code goes here

// declare global variables
var input_stdin = "";
var noOfTestcase = 0;

// standard input is stored into input_stdin
process.stdin.on('data', function (data) {
    input_stdin += data;
});

// standard input is done and stored into an array
process.stdin.on('end', function () {
    chunks = input_stdin.split("\n");
    noOfTestcase = chunks[0];
    process.stdout.write('\n');
    for(let i=1; i < chunks.length; i++){
      let row = chunks[i].split(" ");
      start(Number(row[0]), Number(row[1]));
    }
});

function isEven(val){
  if(val%2 == 0){
    return true
  }
  return false
}

function start(sum,K){
  // console.log("sum = ",sum, " K=",K);
  let eS = isEven(sum);
  let eK = isEven(K);
  // console.log("eS = ",eS, " eK=",eK);
  if(sum < K ){
    // console.log("less than");
    process.stdout.write("NO"+ '\n');
  }else if (!eS && eK) {
    // console.log("odd - even condition");
    process.stdout.write("NO"+ '\n');
  }else if (eS && !eK && sum < (2*K)) {
    // console.log("even - odd but twice condition");
    process.stdout.write("NO"+ '\n');
  }else {
    process.stdout.write("YES"+ '\n');
    let str = ""
    if(!eS){
      for(let k=1; k < K; k++){
        str +="1 "
      }
      str+=(sum-K+1)
    }else{
      if(!eK){
        for(let k=1; k < K; k++){
          str +="2 "
        }
        str+=(sum-(2*K)+2)
      }else{
        for(let k=1; k < K; k++){
          str +="1 "
        }
        str+=(sum-K+1)
      }
    }
    process.stdout.write(str+ '\n');
  }
  return;
}

'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.replace(/\s*$/, '')
    .split('\n')
    .map(str => str.replace(/\s*$/, ''));
  main();
});

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

function solve(n, k) {
  let res = [];
  let base = n % 2 === 0 ? Math.ceil(n / k) : Math.floor(n / k);
  if (base === 0) return 0;
  let total = 0;
  for (let i = 1; i <= k; i++) {
    if (i === k) {
      let last = n - total;
      if ((last <= 0) || last % 2 !== base % 2) return 0;
      res.push(last);
      return res;
    }
    res.push(base);
    total += base;
  }
  return res;
}

function main() {
  const t = parseInt(readLine());
  for (let i = 0; i < t; i++) {
    let [n, k] = readLine().split(' ').map((val) => parseInt(val));
    // let a = readLine().split(' ').map((val) => parseInt(val));
    let res = solve(n, k);
    if (res.length > 0) console.log('YES', res.join(' '));
    else console.log('NO');
  }
  //process.stdout.write("hello: ");
}

'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.replace(/\s*$/, '')
    .split('\n')
    .map(str => str.replace(/\s*$/, ''));
  main();
});

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

function solve(n, k) {
  let res = [];
  let base = n % 2 === 0 ? Math.ceil(n / k) : Math.floor(n / k);
  let total = 0;
  for (let i = 1; i <= k; i++) {
    if (i === k) {
      let last = n - total;
      if ((last <= 0) || last % 2 !== base % 2) return 0;
      res.push(last);
      return res;
    }
    res.push(base);
    total += base;
  }
  return res;
}

function main() {
  const t = parseInt(readLine());
  for (let i = 0; i < t; i++) {
    let [n, k] = readLine().split(' ').map((val) => parseInt(val));
    // let a = readLine().split(' ').map((val) => parseInt(val));
    let res = solve(n, k);
    if (res.length > 0) console.log('YES', res.join(' '));
    else console.log('NO');
  }
  //process.stdout.write("hello: ");
}

'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.replace(/\s*$/, '')
    .split('\n')
    .map(str => str.replace(/\s*$/, ''));
  main();
});

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

function solve(n, k) {
  if ((n % 2 === 1 && k % 2 === 0) || k > n) return 0;
  let res = [];
  let base = n % 2 === 0 ? Math.ceil(n / k) : Math.floor(n / k);
  let total = 0;
  for (let i = 1; i <= k; i++) {
    if (i === k) {
      let last = n - total;
      if ((last < 0) || last % 2 !== base % 2) return 0;
      res.push(last);
      break;
    }
    res.push(base);
    total += base;
  }
  return res;
}

function main() {
  const t = parseInt(readLine());
  for (let i = 0; i < t; i++) {
    let [n, k] = readLine().split(' ').map((val) => parseInt(val));
    // let a = readLine().split(' ').map((val) => parseInt(val));
    let res = solve(n, k);
    if (res.length > 0) console.log('YES', res.join(' '));
    else console.log('NO');
  }
  //process.stdout.write("hello: ");
}

'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.replace(/\s*$/, '')
    .split('\n')
    .map(str => str.replace(/\s*$/, ''));
  main();
});

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

function solve(n, k) {
  let res = [];
  let base = n % 2 === 0 ? Math.ceil(n / k) : Math.floor(n / k);
  let total = 0;
  for (let i = 1; i <= k; i++) {
    if (i === k) {
      let last = n - total;
      if ((last < 0) || last % 2 !== base % 2) return 0;
      res.push(last);
      return res;
    }
    res.push(base);
    total += base;
  }
  return res;
}

function main() {
  const t = parseInt(readLine());
  for (let i = 0; i < t; i++) {
    let [n, k] = readLine().split(' ').map((val) => parseInt(val));
    // let a = readLine().split(' ').map((val) => parseInt(val));
    let res = solve(n, k);
    if (res.length > 0) console.log('YES', res.join(' '));
    else console.log('NO');
  }
  //process.stdout.write("hello: ");
}

var ans ="";

function hasEven(x1 , x2){

	ans ="";

	var eq1 =(x2 -1) *2;
	var eq2 =x1 -eq1;

	if(eq2 >0 && !(eq2 &1) && eq1 +eq2 ==x1){

        x2 --;
        while(x2 --) ans +=" " +'2';
        ans +=" " +eq2.toString();

        return "YES";

    }
    return "NO";

}

function hasOdd(x1 , x2){

	ans ="";

	var eq1 =(x2 -1);
	var eq2 =x1 -eq1;

	if(eq2 >0 && (eq2 &1) && eq1 +eq2 ==x1){

        x2 --;
        while(x2 --) ans +=" " +'1';
        ans +=" " +eq2.toString();

        return "YES";

    }
    return "NO";

}

var cases =parseInt(readline());

while(cases --){

	ans ="";
	var read =readline().split(" ");
	var n =parseInt(read[0] , 12);
	var k =parseInt(read[1] , 12);

	if(k <=n && hasEven(n , k) =="YES"){

		print("YES");
		print(ans.trim());

	}else if(k <=n && hasOdd(n , k) =="YES"){

		print("YES");
		print(ans.trim());

	}else{
		print("NO");
	}

}

var t = parseInt(readline());
for (var tc = 0; tc < t; tc++) {
  var nk = readline()
    .split(" ")
    .map((val) => parseInt(val));
  var n = nk[0],
    k = nk[1];
  var res = "";
  var flag = false;
  if (n % k == 0) {
    for (var j = 0; j < k; j++) {
      res += " " + n / k;
      flag = true;
    }
  } else if (n - k + 1 < k) res = "No";
  else {
    if (n % 2 == 0) {
      if (k % 2 == 0) {
        res += n - k + 1;
        for (var i = 0; i < k - 1; i++) res += " " + 1;
        flag = true;
      } else {
        res += n - 2 * (k - 1);
        for (var i = 0; i < k - 1; i++) res += " " + 2;
        flag = true;
      }
    } else {
      if (k % 2 == 0) {
        res = "No";
      } else {
        res += n - k + 1;
        for (var i = 0; i < k - 1; i++) res += " " + 1;
        flag = true;
      }
    }
  }
  if (flag) {
    print("Yes");
    print(res.trim());
  } else print(res.trim());
}

var t = parseInt(readline());
for (var tc = 0; tc < t; tc++) {
  var nk = readline()
    .split(" ")
    .map((val) => parseInt(val));
  var n = nk[0],
    k = nk[1];
  var res = "";
  var flag = false;
  if (n % k == 0) {
    for (var j = 0; j < 2; j++) {
      res += " " + n / k;
      flag = true;
    }
  } else if (n - k + 1 < k) res = "No";
  else {
    if (n % 2 == 0) {
      if (k % 2 == 0) {
        res += n - k + 1;
        for (var i = 0; i < k - 1; i++) res += " " + 1;
        flag = true;
      } else {
        if (n - 2 * (k - 1) >= 4) {
          res += n - 2 * (k - 1);
          for (var i = 0; i < k - 1; i++) res += " " + 2;
          flag = true;
        } else res = "No";
      }
    } else {
      if (k % 2 == 0) {
        res = "No";
      } else {
        res += n - k + 1;
        for (var i = 0; i < k - 1; i++) res += " " + 1;
        flag = true;
      }
    }
  }
  if (flag) {
    print("Yes");
    print(res.trim());
  } else print(res.trim());
}

'use strict';

let t = parseInt(readline(), 10);

while (t--) {
    const result = [];
    const parts = readline().split(' ');
    let n = parseInt(parts[0], 10);
    let k = parseInt(parts[1], 10);

    if (k === 1) {
        result.push(n);
        print('YES');
        print(result.join(' '));
        continue;
    }

    if (k > n) {
        print('NO');
        continue;
    }

    if (k === n) {
        for (let i = 0; i < k; i++) {
            result.push(1);
        }
        print('YES');
        print(result.join(' '));
        continue;
    }

    let chooseEven = n % 2 === 0;

    while (n > 0 && k > 0) {
        if (n % k === 0) {
            const div = n / k;
            if ((chooseEven && div % 2 === 0) || (!chooseEven && div % 2 !== 0)) {
                result.push(div);
                n -= div;
                k -= 1;
                continue;
            }
        }

        if (chooseEven) {
            result.push(2);
            n -= 2;
        } else {
            result.push(1);
            n -= 1;
        }
        k -= 1;
    }

    if (n === 0 && k === 0) {
        print('YES');
        print(result.join(' '));
    } else {
        print('NO');
    }
}

'use strict';

let t = parseInt(readline(), 10);

while (t--) {
    const parts = readline().split(' ');
    let n = parseInt(parts[0], 10);
    let k = parseInt(parts[1], 10);

    function helper(N, K, result, sub) {
        while (N > 0 && K > 1) {
            N -= sub;
            K -= 1;
            result.push(sub);
        }
        if (N % 2 === sub % 2) {
            result.push(N);
            K -= 1;
        }
        return {K, result};
    }

    const resultOdd = helper(n, k, [], 1);
    const resultEven = helper(n, k, [], 2);

    if (resultOdd.K === 0) {
        print('YES');
        print(resultOdd.result.join(' '));
    } else if (resultEven.K === 0) {
        print('YES');
        print(resultEven.result.join(' '));
    } 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++];
}
/**
  8
10 3
100 4
8 7
97 2
8 8
3 10
5 3
1000000000 9

**/

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

    for(let r=0;r<range;r++) {
        let [n, index] = readline().split(" ").map(Number);

        if( n < index || n - 1 === index ) {
            console.log("NO");
            continue;
        }

        let output = [];
        let total = 0;

        if(index % 2 === 0) {
            if(n % 2 === 0) {
                for(let i=0;i<index - 1;i++) {
                    output.push(1);
                    total = total + 1;
                }

                output.push(n - total);
            } else {
                console.log("NO");
                continue;
            }
        } else {
            if(n % 2 === 0) {
                for(let i=0;i<index - 1;i++) {
                    output.push(2);
                    total = total + 2;
                }

                output.push(n - total);
            } else {
                for(let i=0;i<index - 1;i++) {
                    output.push(1   );
                    total = total + 1;
                }

                output.push(n - total);
            }
        }

        console.log("YES");
        console.log(output.join(" "));
    }

}

'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++];
}
/**
  8
10 3
100 4
8 7
97 2
8 8
3 10
5 3
1000000000 9

**/

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

    for(let r=0;r<range;r++) {
        let [n , k] = readline().split(" ").map(Number);

        if(n < k || n - 1 === k) {
            console.log('NO');
            continue;
        }

        if( n % 2 === 0) {
            if( k % 2 === 0) {
                let output = [];
                let count = 0;

                for(let i=0;i<k-1;i++) {
                    output.push(1);
                    count++;
                }

                if(count >= n) {
                    console.log('NO');
                    continue;
                }

                output.push(n - count);

                console.log('YES');
                console.log(output.join(" "));
                continue;
            } else {
                let output = [];
                let count = 0;

                for(let i=0;i<k-1;i++) {
                    output.push(2);
                    count = count + 2;
                }

                if(count >= n) {
                    console.log('NO');
                    continue;
                }
                output.push(n - count);
                console.log('YES');
                console.log(output.join(" "));
                continue;
            }
        } else {
            if(k % 2 !== 0) {
                let output = [];
                let count = 0;

                for(let i=0;i<k-1;i++) {
                    output.push(1);
                    count++;
                }

                output.push(n - count);
                if(count >= n) {
                    console.log('NO');
                    continue;
                }
                console.log('YES');
                console.log(output.join(" "));
                continue;
            } else {
                console.log('NO');
                continue;
            }
        }

    }

}

'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++];
}
/**
  8
10 3
100 4
8 7
97 2
8 8
3 10
5 3
1000000000 9

**/

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

    for(let r=0;r<range;r++) {
        let [n, index] = readline().split(" ").map(Number);

        if( n < index || n - 1 === index ) {
            console.log("NO");
            continue;
        }

        let output = [];
        let total = 0;

        if(Math.abs(index) % 2 === 0) {
            if(Math.abs(n) % 2 === 0) {
                for(let i=0;i<index - 1;i++) {
                    output.push(1);
                    total = total + 1;
                }

                output.push(n - total);
            } else {
                console.log("NO");
                continue;
            }
        } else {
            if(Math.abs(n) % 2 === 0) {
                for(let i=0;i<index - 1;i++) {
                    output.push(2);
                    total = total + 2;
                }

                output.push(n - total);
            } else {
                for(let i=0;i<index - 1;i++) {
                    output.push(1   );
                    total = total + 1;
                }

                output.push(n - total);
            }
        }

        console.log("YES");
        console.log(output.join(" "));
    }

}

'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++];
}
/**
  8
10 3
100 4
8 7
97 2
8 8
3 10
5 3
1000000000 9

**/

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

    for(let r=0;r<range;r++) {
        let [n , k] = readline().split(" ").map(Number);

        if(n < k || n - 1 === k) {
            console.log('NO');
            continue;
        }

        if( n % 2 === 0) {
            if( k % 2 === 0) {
                let output = [];
                let count = 0;

                for(let i=0;i<k-1;i++) {
                    output.push(1);
                    count++;
                }

                output.push(n - count);
                console.log('YES');
                console.log(output.join(" "));
                continue;
            } else {
                let output = [];
                let count = 0;

                for(let i=0;i<k-1;i++) {
                    output.push(2);
                    count = count + 2;
                }

                output.push(n - count);
                console.log('YES');
                console.log(output.join(" "));
                continue;
            }
        } else {
            if(k % 2 !== 0) {
                let output = [];
                let count = 0;

                for(let i=0;i<k-1;i++) {
                    output.push(1);
                    count++;
                }

                output.push(n - count);
                console.log('YES');
                console.log(output.join(" "));
                continue;
            } else {
                console.log('NO');
                continue;
            }
        }

    }

}

'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++];
}
/**
  8
10 3
100 4
8 7
97 2
8 8
3 10
5 3
1000000000 9

**/

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

    for(let r=0;r<range;r++) {
        let [n , k] = readline().split(" ").map(Number);

        if(n < k || n - 1 === k) {
            console.log('NO');
            continue;
        }

        if( n % 2 === 0) {
            if( k % 2 === 0) {
                let output = [];
                let count = 0;

                for(let i=0;i<k-1;i++) {
                    output.push(1);
                    count++;
                }

                if(count <= n) {
                    console.log('NO');
                    continue;
                }

                output.push(n - count);

                console.log('YES');
                console.log(output.join(" "));
                continue;
            } else {
                let output = [];
                let count = 0;

                for(let i=0;i<k-1;i++) {
                    output.push(2);
                    count = count + 2;
                }

                if(count <= n) {
                    console.log('NO');
                    continue;
                }
                output.push(n - count);
                console.log('YES');
                console.log(output.join(" "));
                continue;
            }
        } else {
            if(k % 2 !== 0) {
                let output = [];
                let count = 0;

                for(let i=0;i<k-1;i++) {
                    output.push(1);
                    count++;
                }

                output.push(n - count);
                if(count <= n) {
                    console.log('NO');
                    continue;
                }
                console.log('YES');
                console.log(output.join(" "));
                continue;
            } else {
                console.log('NO');
                continue;
            }
        }

    }

}