One hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that the watermelon was weighed, and the scales showed w kilos. They rushed home, dying of thirst, and decided to divide the berry, however they faced a hard problem.Pete and Billy are great fans of even numbers, that's why they want to divide the watermelon in such a way that each of the two parts weighs even number of kilos, at the same time it is not obligatory that the parts are equal. The boys are extremely tired and want to start their meal as soon as possible, that's why you should help them and find out, if they can divide the watermelon in the way they want. For sure, each of them should get a part of positive weight.

The first (and the only) input line contains integer number w (1 ≤ w ≤ 100) — the weight of the watermelon bought by the boys.

Print YES, if the boys can divide the watermelon into two parts, each of them weighing even number of kilos; and NO in the opposite case.

NoteFor example, the boys can divide the watermelon into two parts of 2 and 6 kilos respectively (another variant — two parts of 4 and 4 kilos).

var weight = readline();
print(weight && weight > 2 && !(weight % 2) ? "YES" : "NO");

//nodejs v4.2.6
process.stdin.resume();
	process.stdin.setEncoding('utf8');
	//Taking a usr input
	process.stdin.on('data', function (text) {
			//Printing out user input
			var input = parseInt(text)
				if(input===2){
					console.log('NO')
				}else
				if(input%2 === 0){
					console.log('YES');
				}else{
					console.log('NO')
				}
	});

var x = readline();

 if (x % 2 === 0 && x > 2 )
    print("yes")
else
    print("no")

var w =  readline();
if (w == 2){
    print("NO");
}
else if(w % 2 == 0){
        print("YES")
    }

else
    {
        print("NO")
    }

var line = readline().split(' ');
if ( line[0] > 3 && line % 2 == 0 ) {
    print('YES') ;
}
else {
    print('NO');
}

const readline = require('readline');

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

rl.question('', (w) => {
  main(w);
  rl.close();
});

function main(watermelon) {
  watermelon = parseInt(watermelon);
  let numbersPar = fragWatermelon(watermelon);
  let totalNumbers = numbersPar.length;
  if (numbersPar.length >= 1 && (numbersPar[0] + numbersPar[totalNumbers-1]) === watermelon){
    console.log('YES')
  } else {
    console.log('NO')
  }
}

function fragWatermelon(watermelon) {
  let numbersPar = [];
  for(let i = 1; i < watermelon; i++){
    if ((i%2) === 0){
      numbersPar.push(i)
    }
  }
  return numbersPar;
}

process.stdin.resume();
process.stdin.setEncoding('utf8');
let input= '', readline, cout;
process.stdin.on('data', (chunk) => input+=chunk);
process.stdin.on('end', () => {
    input = input.split('\n');
    cout = (data) => process.stdout.write(data+'\n');
    var inputLineIndex = 0;
    readline = function(){return inputLineIndex>=input.length?undefined:input[inputLineIndex++]};
    process.exit(main() || 0);
});

function main(){
    let a = readline();
    if(a > 2 && a % 2 === 0) console.log("YES");
    else console.log("NO")
    return 0;
}

var w = readline();

if ((w % 2 === 0) && (w != 2)) {
    print("YES");
} else {
    print("NO");
}

const { read } = require('fs');

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

readline.question('', w => {
    if(parseInt(w) %2==0 && parseInt(w)>=4){
        console.log('YES');
    }
    else{
        console.log('NO');
    }
    readline.close();
})

const input = readline();
const num = parseInt(input);

if ((num>2) && (num%2 === 0)) {
    print("YES");
} else {
    print("NO");
}

var input = readline().split(' ');
var check = false;
for(var i=2;i<input[0] ; i+=2) {
  if( (input[0] - i) % 2 == 0 ) check=true;
}
if(check) print("YES");
else print("NO");

var input = readline();
var w = parseInt(input)

if(w>2 && w%2===0){
	print('YES');
}
else{
	print('NO');
}

var stdin = process.stdin;
stdin.setEncoding( 'utf8' );
stdin.on( 'data', function( key ){
    const weight = parseInt(key);
    const available = (weight !== 2) && (weight % 2 === 0);
    process.stdout.write(available ? "YES" : "NO" );
});

var n = parseInt(readline());
print (n!=2 && n % 2 == 0 ? "YES" : "NO");

var fullWeight = readline(),
	vasyaWeight = petyaWeight = 0,
	output = 'NO';

for(var i = 1; i < fullWeight; i++){
	vasyaWeight = i;
	petyaWeight = fullWeight - vasyaWeight;
	if(!(vasyaWeight%2) && !(petyaWeight%2)){
		output = 'YES';
		break;
	}
}

write(output);

const w = readline()
if (w <= 2){
    print('NO')
} else if ( w % 2 == 0){
    print('YES')
} else {
    print('NO')
}

var w = readline();
if (w % 2 == 0 && w > 2){
	print("YES");
} else {
	print("NO")
}

var w = Number(readline());

function delitarbuz() {
	if (w%2 === 0 && w !== 2 && w !== 0){
		return ('Yes');
	}
	else if (w%2 !== 0 || w === 2 || w ===0){
		return ('No');
	}
  return 0;
}

print(delitarbuz());

const readline = require('readline');

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

    if (x%2 === 0 && x!=2 ) {
        console.log('YES');

    }else  {
        console.log('NO')
    }

  })

var x;
x = Number(readline());

if((x % 2 == 0) && (x > 2)){
  print("YES");
}
else{
  print("NO");
}

function printAans()
{
	var weight;

	weight=readline();

	if( weight!=2 )
    {
        if(weight%2===0)print("YES");
        else print("NO");

    }
    else print("NO");

}
printAans();

'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 main() {
  const x = readline();
  // process.stdout.write('hello')
  console.log(x % 2 == 0 && x > 3 ? 'YES' : 'NO');
}

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

// var getline;
var input = "";
var read;
var writeline = (x) => process.stdout.write(x + "\n");
var write = (x) => process.stdout.write(x);

process.stdin.on("data", (chunk) => input += chunk);
process.stdin.on("end", () => {
    // input = input.split(/\r?\n/);
    // getline = () => input.shift();
    input = input.trim().split(/\s+/);
    read = () => input.shift();
    process.exit(main() || 0);
});

function main() {
    let l;
    while ((l = read()) !== undefined) {
        let x = parseInt(l);
        if (x === 0 || (x > 2 && x % 2 === 0)) {
            writeline('YES')
        } else {
            writeline('NO')
        }
    }
    return 0;
}

const x = parseInt(readline());
    if (x < 4) {
        print('NO');
    }
    else if (x % 2) {
        // console.log('NO');
        print('NO');
    } else {
        // console.log('YES');
        print('YES');
    }

process.stdin.resume();
process.stdin.setEncoding('utf8');
var input= '', readline, cout;
process.stdin.on('data', function(chunk) {
    input+=chunk;
});
process.stdin.on('end', function() {
    input = input.split('\n');
    cout = function(data) {process.stdout.write(data+'\n')};
    var inputLineIndex = 0;
    readline = function(){return inputLineIndex>=input.length?undefined:input[inputLineIndex++]};
    process.exit(main() || 0);
});

function main()
{
    let a = readline();
    if(a > 2 && a % 2 === 0) console.log("YES");
    else console.log("NO")
    return 0;
}

    var arbuz = readline();
    arbuz = parseInt(arbuz);
    print(devideWaterMellon(arbuz))

function devideWaterMellon(weight) {
    var result = 'NO';
    for (var index = 2; index < weight; index++) {
        if (index % 2 == 0 && ((weight - index) % 2 == 0) && weight > 3) {
            result = 'YES'
            break;
        }
    }
    return result
}

const state = { stdin: Buffer.alloc(0) };
const consume = (chunk) =>
  (state.stdin = Buffer.concat(
    [state.stdin, chunk],
    state.stdin.length + chunk.length
  ));
const commit = (answer) => process.stdout.write(answer);
//
const main = (args) => {
  let data = parseInt(state.stdin.toString("utf8"));
  let solution = "NO";
//   if (data < 1 || data > 100) return commit(solution);

  for (let i = 1; i < data; i++) {
    let part = (data - i) % 2 ===0;
    if (i % 2 === 0 && part) {
      solution = "YES";
      commit(solution);
      return;
    }
  }
  commit(solution);
};

process.stdin.on("data", consume).on("end", main);

var line = readline().split(' ');
if ( line[0] > 3 && line[0] % 2 == 0 ) {
    print('YES') ;
}
else {
    print('NO');
}

'use strict';

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

let inputString = '';
let currentLine = 0;

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

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

    main();
});

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

function main() {
    const parameterVariable = readLine();
    const line2 = readLine();

    if(parameterVariable > 2 && parameterVariable % 2 === 0) console.log('YES')
    else console.log('NO')

}

    var weight;

	weight=readline();

	if( weight!=2 )
    {
        if(weight%2===0)print("YES");
        else print("NO");

    }
    else print("NO");

process.stdin.on('data', (n) => {
  if (n > 3 && n % 2 === 0) console.log('YES');
  else console.log('NO');
});

function checkDivide(weight){
    if( weight % 2 === 0 && weight !== 0 && weight != 2){
      print("YES");
    }
    else {
      print("NO");
    }

}

checkDivide(readline());

function main(){
  var n = +readline();
  var m = n/2;
  if(n == 2 || m.toString().includes("."))
    print("NO");
  else
    print("YES");
}

main();

var line = readline()
// var firstLine = lines[0]

print((line % 2 === 0 && line > 2) ? 'YES' : 'NO')

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

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

  process.stdin.resume();
  process.stdin.setEncoding('utf-8');
  process.stdin.on('data', (input) => { stdinInput += input; });
  process.stdin.on('end', () => { main(); });

var n;
function main() {
    const is = new Scanner();

    // const s = is.nextArray(Number);
    // const t = is.nextArray(Number);
    // // const k = is.nextArray();

    n = parseInt(is.nextLine());
    // console.log(n);

    if(kt()==1)
        console.log("YES");
		else
        console.log("NO");
  }

  function kt(){
    for(var i=2; i<n; i=i+2)
	{
		if((n-i)%2==0)
			return 1;
	}
	return 0;
}

function printAnss()
{
	var weight;

	weight=readline();

	if( weight!=2 )
    {
        if(weight%2===0)print("YES");
        else print("NO");

    }
    else print("NO");

}
printAnss();

var line = readline().split(' ');
if ( line[0] > 3 && line % 2 == 0 ) {
    print('YES') ;
}
else {
    print('NO');
}

const readline = require('readline');
const z=2 ;
const x=1;
const c=100
const rl = readline.createInterface({
  input: process.stdin
});
rl.on('line', (input) => {
  if (input.trim()>=x && input.trim()<=c){
  if (input.trim() % z != 0 || input.trim()==2 )
  {
    console.log("NO");
  }
  else
  {
    console.log("YES");
  }
}
  rl.close();
});

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

function main(weight) {
  process.stdout.write(weight > 2 && weight % 2 === 0 ? 'YES' : 'NO')
}

// Handle standard input
process.stdin.resume()
process.stdin.setEncoding('utf-8')

let inputString = ''

process.stdin.on('data', (inputStdin) => inputString += inputStdin)
process.stdin.on('end', () => main(+inputString.trim()))

'use strict';

const fs = require('fs');

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) {
    return n%2===0 && n>=4 ? `YES`: `NO`;
}

function main() {

    const nk = readLine().split(' ');

    const n = parseInt(nk[0], 10);

    let result = solve(n);
    console.log(result);
}

x = readline();
if (!(x & 1) && x != 2)print("YES"); else print("NO");

var input = readline();
(input > 2 && input%2 == 0) ? print("YES") : print("NO");

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

function divideEvenly(w){
    if (w < 3 || w > 100) return 'NO';
    if (w % 2 === 0 ) return 'YES'
    return 'NO';
}

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

function solution(input){
    if(input === "2"){
        return "NO"
    }
    return input % 2 === 0 ? "YES" : "NO"
}

rl.on('line', function(line){
    console.log(solution(line))
})

const readline = require('readline')

class ReadStream {
    lines = []

    currPromise = undefined

    readlineHandler = input => {
        this.lines.push(input)
    }

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

        this.rl.on('line', this.readlineHandler)
    }

    async next() {
        this.currPromise = new Promise((resolve, reject) => {
            const tempPromise = this.currPromise ? this.currPromise : Promise.resolve()

            tempPromise.then(_ => {
                if (this.lines .length) {
                    resolve(this.lines.shift())
                }
                else {
                    this.rl.off('line', this.readlineHandler)
                    this.rl.once('line', (input) => {
                        resolve(input)
                        this.rl.on('line', this.readlineHandler)
                    })
                }
            })

        })
        return this.currPromise
    }

    close() {
        this.rl.off('list', this.readlineHandler)
        this.rl.close()
    }
}

const cin = new ReadStream()

async function main() {
    const weight = parseInt(await cin.next())

    if (weight % 2 === 0 && weight > 2) {
        console.log('YES')
    } else {
        console.log('NO')
    }

    // cin.close()
}

main()

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

// read each line
rl.on("line", (lineInput) => {
  if (lineInput % 2 == 0 && lineInput != 2) {
    console.log("Yes");
  } else console.log("NO");
});

// when all file readed
rl.on("close", () => {});

    var arbuz = readline();
    arbuz = parseInt(arbuz);
    write(devideWaterMellon(arbuz))

function devideWaterMellon(weight) {
    var result = 'NO';
    for (var index = 2; index < weight; index++) {
        if (index % 2 == 0 && ((weight - index) % 2 == 0) && weight > 3) {
            result = 'YES'
            break;
        }
    }
    return result
}

var a = readline();
a = parseInt(a);
if (a % 2 === 0 && a !== 2){
    print("YES");
}else{
    print("NO");
}

var ent = parseInt(readline());
if (ent<=2) print("NO");
else
{
    if (ent%2==0) print("YES");
    else print("NO");
}

(function f(){
var n = parseInt(readline());
	if(n!=2&&n%2==0){
		//console.log("NO");
		 print("YES");
	}
	else
		//console.logt("YES");
	 print("NO");

})();

const readline = require('readline')

class ReadStream {
    lines = []

    currPromise = undefined

    readlineHandler = input => {
        this.lines.push(input)
    }

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

        this.rl.on('line', this.readlineHandler)
    }

    async next() {
        this.currPromise = new Promise((resolve, reject) => {
            const tempPromise = this.currPromise ? this.currPromise : Promise.resolve()

            tempPromise.then(_ => {
                if (this.lines .length) {
                    resolve(this.lines.shift())
                }
                else {
                    this.rl.off('line', this.readlineHandler)
                    this.rl.once('line', (input) => {
                        resolve(input)
                        this.rl.on('line', this.readlineHandler)
                    })
                }
            })

        })
        return this.currPromise
    }

    close() {
        this.rl.off('list', this.readlineHandler)
        this.rl.close()
    }
}

const cin = new ReadStream()

async function main() {
    const weight = parseInt(await cin.next())

    if (weight % 2 === 0 && weight > 2) {
        console.log('YES')
    } else {
        console.log('NO')
    }

    cin.close()
}

main()

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

let input = [];
rl.on('line', function(line) {
	input.push(line);
	if (input.length === 1) {
		waterMelon(parseInt(input[0]));
		rl.close();
	}
});

let waterMelon = (input) => {
	let start = 1;
	let end = input - 1;
	let result = 'NO';
	for (let i = start; i <= end; i++) {
		if (i % 2 === 0 && end % 2 === 0) {
			result = 'YES';
		}
		end--;
	}
	console.log(result);
};

    const map = {
        true: 'YES',
        false: 'NO'
    }

    const w = readline().split(' ').map(i => parseInt(i))[0];
if (w > 2) {
    write(map[(w - 2) % 2 === 0]);
} else {
    write('NO')
}

'use strict';

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

let inputString = '';
let currentLine = 0;

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

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

    main();
});

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

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

    let result = isTrue(theNum);

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

function isTrue(theNum) {
    if(theNum == 2) {
        return false;
    }
    let secondNum = theNum - 2;
    for(let i = 2; i <= theNum; i+=2, secondNum-=2) {
        if(i + secondNum == theNum) {
            if(i % 2 == 0 && secondNum % 2 == 0) {
                return true;
            }
        }
    }
    return false;
}

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

function divideEvenly(w){
    if (w < 3 || w > 100) return console.log('NO');
    if (w % 2 === 0 ){ return console.log('YES')}
    else{ return console.log('NO');}
}

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

let inp = 0
process.stdin.on("data",input=>{
    inp = input
})
process.stdin.on("end",input=>{

    main();

})

function main(){
if(inp%2===0&&inp!=2){console.log("YES")} else {console.log("NO")}}

(function f(){
	 var nums = readline().split(' ');
    var n = nums[0];
//	var n = parseInt(s);
	if(n!=2&&n%2==0){
		//console.log("NO");
		 print("YES");
	}
	else
		//console.logt("YES");
	 print("NO");

})();

var a= readline();
if(a>2&&a%2===0) print("YES");
else print("NO");

const state = { stdin: Buffer.alloc(0) };
const consume = (chunk) =>
  (state.stdin = Buffer.concat(
    [state.stdin, chunk],
    state.stdin.length + chunk.length
  ));
const commit = (answer) => process.stdout.write(answer);
//
const main = (args) => {
  let data = parseInt(state.stdin.toString("utf8"));
  let solution = "NO";
  if (data < 1 || data > 100) return commit(solution);

  // divide the watermelon into two parts,
  // each of them weighing even (%2==0) number of kilos;

  for (let i = 1; i < data; i++) {
    let part = (data - i) % 2 ===0;
    if (i % 2 === 0 && part) {
      solution = "YES";
    //   console.log(data, partOne, partTwo)
      commit(solution);
      return;
    }
  }
  commit(solution);
};

process.stdin.on("data", consume).on("end", main);

var input = readline().split(' ')[0];
print((input > 2 && !(input % 2)) ? 'YES' : 'NO');

var num = parseInt(readline());
if (num % 2 || num < 4)
{
    print('NO');
}
else
{
    print('YES');
}

var input = null;
//input = ['2'];
function main(input) {
    var w = parseInt(input[0]);
    if (w == 2)
        solution('NO');
    for (var i = 2; i < 50; i += 2) {
        if (w % 2 == 0)
            solution('YES');
    }
    solution('NO');
}
///////////////////////////////////////////////////////////////////////////////////////
if (!input) {
    var input_1 = '';
    process.stdin.on('data', function (char) { return input_1 += char; });
    process.stdin.on('end', function () {
        var EOL = require('os').EOL;
        var inputs = input_1.split(EOL).slice(0, -1);
        main(inputs);
    });
}
else
    main(input);
function solution(data) {
    console.log(data);
    process.exit(0);
}

function divideBerry(w) {
    if (w % 2 === 0 && w !== 2) {
        print('YES');
    } else {
        print('NO');
    }
}

var input = readline();
divideBerry(parseInt(input));

var w = readline();
print(w%2===0 && w>2 ? "YES":"NO");

var n =parseInt(readline());
var b = false;
for (var i = 4; i <= n; i+=2){
    if(i == 100) break;
        if(((i % 2 === 0) && (n-i) % 2 ===0) || n == 4)
            b = true;

    }
 write(b  ? "YES":"NO");

var weight = readline();

if(weight <= 100 && weight >= 1){
    if(weight > 2 && weight % 2 == 0){
        print("YES");
    }else{
        print("NO");
    }
}

function printAnss()
{
	var weight;

	weight=readline();

	if( weight!=2 )
    {
        if(weight%2===0)print("YES");
        else print("NO");

    }
    else print("NO");

}
printAnss();

let i = ''

function main(w) {
    // let dem = 0;
    // for(let i = 2; i <= w ; i++){
    //     if(w % i == 0){
    //         dem++;
    //     }
    // };
    //
    // if(dem >= 2){
    //     console.log("YES");
    // }else {
    //     console.log("NO");
    // }
    if(w % 2 == 0 && w > 2){
        console.log("YES");
    }else {
        console.log("NO");
    }
}
// main(6);

process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
    const {EOL} = require('os')
    const lines = i.split(EOL)
    const line1Array = lines[0].split(' ').map(x => parseInt(x))
    const w = line1Array[0]

    main(w);
})

var w = readline();
if (w % 2 == 0 && w > 2){
	print("YES");
} else {
	print("NO")
}

// Problem #    : 4A
// Created on   : 2019-01-15 00:36:24
process.stdin.resume();
process.stdin.setEncoding("utf8");

var input = "",
  readline,
  print;

process.stdin.on("data", function(chunk) {
  input += chunk;
});

process.stdin.on("end", function() {
  input = input.split("\n");
  print = function(data) {
    process.stdout.write(data + "\n");
  };
  var inputLineIndex = 0;
  readline = function() {
    return inputLineIndex >= input.length ? undefined : input[inputLineIndex++];
  };
  process.exit(main() || 0);
});

function main() {
  // Your code here
  let l = readline();
  let n = Number(l);
  if (n > 2 && n % 2 == 0) {
    print("YES");
  } else {
    print("NO");
  }

  return 0;
}

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

//main
function main() {
    var n = parseInt(readline());
    console.log((n<=2 || n%2) ? "NO" : "YES");
}

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

// single line input
readline.on('line', line => {
  readline.close(), console.log(parseInt(line) % 2 === 0 && parseInt(line) > 2 ? "YES" : "NO");
});

const input = readline();
const num = parseInt(input);

if ((num>2) && (num%2 === 0)) {
    print("YES");
} else {
    print("NO");
}

// let x = readline()
//   .split(" ")
//   .map(function (x) {
//     return parseInt(x);
//   });

var x = readline();

if (x > 2 && x % 2 == 0) {
  write("YES");
} else {
  write("NO");
}

var ent = parseInt(readline());
if (ent<=2) print("NO");
else
{
    if (ent%2==0) print("YES");
    else print("NO");
}

var readline = require('readline'),
    rl = readline.createInterface(process.stdin, process.stdout);

rl.on('line', function (line) {

    var n=line.split(' ')
    n%2==0 && n!=2 ? console.log("YES") : console.log("NO");
    rl.close();

}).on('close', function () {

    process.exit(0);
});

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

var input_stdin = "";
var input_stdin_array = "";
var input_currentline = 0;

process.stdin.on('data', function (data) {
    input_stdin += data;
});

process.stdin.on('end', function () {
    input_stdin_array = input_stdin.split("\n");
    main();
});

function readLine() {
    return input_stdin_array[input_currentline++];
}

function solveMeFirst(a) {
  // Hint: Type return a+b below
  return a > 2 && a % 2 === 0 ? "YES" : "NO";
}

function main() {
    var a = parseInt(readLine());

    var res = solveMeFirst(a);
    console.log(res);
}

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

rl.on('line', function(line){
    const weight = parseInt(line);
    if(weight <= 2 || weight % 2 !== 0) {
        console.log("NO");
    } else {
        console.log("YES");
    }
})

var input = readline();
(input > 2 && input%2 == 0) ? print("YES") : print("NO");

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

// var numbers = readline().split(" ").map(function(x) { return parseInt(x); });

readline.on('line', line => {
    readline.close();

    const number = line.split(" ")[0];

    if (number > 2 && number % 2 === 0) {
        console.log('YES');
    } else {
        console.log('NO');
    }
});

var num = parseInt(readline());
if (num % 2 || num < 4)
{
    print('NO');
}
else
{
    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", function() {
  inputString = inputString
    .replace(/\s*$/, "")
    .split("\n")
    .map(str => str.replace(/\s*$/, ""));

  main();
});

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

function main() {
  const firstLine = readLine();
  const weight = parseInt(firstLine, 10);
  // const a = readLine().split(' ').map(aTemp => parseInt(aTemp, 10));

  console.log(watermelon(weight));
}

function watermelon(weight) {
  return weight === 2 || (weight & 1) === 1 ? "NO" : "YES";
}

const readline = require('readline');

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

rl.question('', (input) => {
    if (input > 2 && input % 2 === 0) {
        console.log('YES')
    } else {
        console.log('NO')
    }
    rl.close();
});

var kilos = +readline();
var isEven = false;
for (var i = 1; i < kilos; i++) {
    for (var j = kilos - 1; j > 0; j--) {
        if (i % 2 === 0 && j % 2 === 0 && i + j === kilos) {
            isEven = true;
            print('YES');
            break;
        }
    }
    if (isEven) break;
}
if (!isEven) print('NO');

    var weight;

	weight=readline();

	if( weight!=2 )
    {
        if(weight%2===0)print("YES");
        else print("NO");

    }
    else print("NO");

var weight = parseInt(readline('weight? '));
if (weight%2===0 && weight !==0 && weight>2)
print('YES');
else
print('NO');

// Sample code to perform I/O:

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

process.stdin.on("data", function (input) {
    stdin_input += input;                               // Reading input from STDIN
});

process.stdin.on("end", function () {
    main(stdin_input);
});

function main(input) {
    let output = nameLookUp(input);

    process.stdout.write(output);       // Writing output to STDOUT
}

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail

// Write your code here
function nameLookUp(arr) {
    let nLines = arr.split('\n');
    let nWeight = nLines[0];
    let quotient = nWeight % 2 === 0 && nWeight > 2 ? 'yes' : 'no';
    return quotient;

}

// const readline = require('readline');

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

// let w;
// rl.on('line', (input) => {
//   w = input;
//   console.log(w % 2 === 0 ? 'YES' : 'NO');

//   rl.close();
// });

const numbers = readline();
print(numbers % 2 === 0 ? 'YES' : 'NO');

const readline = require('readline');

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

rl.question('', (weight) => {
    if (weight <= 3) console.log('NO');

    var answer = weight % 2;
    console.log(answer === 1 ? 'NO' : 'YES');
    rl.close();
});

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

readline.question("", (weight) => {
    if (weight % 2 == 0)
        console.log("YES")
    else
        console.log("NO")
    readline.close()
})

(function f(s){
	var n = 5;//  parseInt(s);
	if(n>2&&n%(2!==0)){
		//console.log("NO");
		print("NO");
	}
	else
		//console.logt("YES");
	  print("YES");

})();

#!/usr/bin/env nodejs

// 4A - Watermelon

function main(stdin) {
  console.log(parseInt(stdin) % 4 === 0 ? "YES" : "NO");
}

main(require("fs").readFileSync(0, "utf-8"));

(function f(s){
	var n =  parseInt(s);
	if(n>2&&n%2!=0){
		 print("YES");
	}
	else
		print("NO");

	 return 0;
})();

var myArgs = process.argv.slice(2);
if(myArgs[0]%2==0)console.log('YES');

function selicomArbuz(w) {
  var selicom = w % 2
  if (selicom === 0) {
    print("YES")
  } else {
    print("NO")
  }
}

selicomArbuz()

let state = {stdin:Buffer.alloc(0)}
process.stdin
    .on('data', chunk=> {
        state.stdin = Buffer.concat([state.stdin, chunk], state.stdin.length+chunk.length )
    })
    .on('end', ()=> {
        let data = state.stdin.toString('utf8')
        process.stdout.write( (data/2)%2===0 ? 'YES': 'NO')
    })

const readline = require('readline');

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

    if (x%2 === 0 || x===2 ) {
        console.log('YES');

    }else  {
        console.log('NO')
    }

  })

(function f(s){
	var n = parseInt(s);
	if(n>2&&n%2===0)
		print("YES");
	else
	    print("NO");
})();

    var n = +readline();

	if (n%2==0){
        print("Yes")
    } else {
        print("No")
    }

function f(chislo){
 this.ch  = chislo;

	if(chislo%2==0)
		return true;

	return false;
}

var n = readline();

if (n % 2 === 0) {
    print("YES")
} else if (n == 2) {
    print("NO")
} else {
    print("NO")
}

console.log(parseInt(process.argv[2])%2 === 0 ? "YES":"NO")

var value = parseInt(readline())
var response = value % 2 == 0 && (value / 2) % 2 == 0? "YES" : "NO"
print(response)

const a = parseInt(readline());
const d = a % 2 === 0;

d ? r = 'YES' : r = 'NO';

print(r);

a = readline();
if (a <= 2 ){
    print("NO")
}
if (a % 2 === 0){
    print("YES");
}
print("NO") ;

var b = readline();
if(b<2)print("NO")
print((b%2===0)?"YES":"NO");

function Watermelon(w) {
    if(w % 2 == 0)  {
        print('yes');
    } else {
        print('no');
    }
}

var w = readline();

    print('input');
    print(w);

if(w>=1 && w<=100) {
    print('output');
    Watermelon(w);
}  else {
    print('wrong input');
}

const readline = require('readline');

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

rl.question('', (answer) => {
  if (answer % 2 === 0) {
      console.log('YES');
  } else {
      console.log('NO');
  }

  rl.close();
});

	var n = readline();

	print(n % 2 === 0 ? "YES" : "NO");

var print = this.print || require('lol-io').print
var write = this.write || require('lol-io').write
var readline = this.readline || require('lol-io').readline
// a + b

if(readline%2==0){
print('YES');
}else{
    print('NO');
}

const wWeight = readline();

checkIfWatermelonIsEven(wWeight);

function checkIfWatermelonIsEven(w){
    print(((w/2)%2?'NO':'YES'));
}

var stdin = "";
process.stdin.resume();
process.stdin.setEncoding("ascii");
process.stdin.on("data", function(data) {
  stdin += data;
});
process.stdin.on("end", function() {
  main(stdin);
});

const debug = 0;
var log = console.log;
var dbg = debug ? console.log : _ => {};

/////////////// ignore above this line ////////////////////

function main(stdin) {
  log(stdin % 2 ? "NO" : "YES");
}

var x;
x = readline();

if(Number(x) % 2 == 0){
  print("YES");
}
else{
  print("NO");
}

function watermellon(n){if (n % 2 === 0) {return "YES";} else {return "NO";}}

process.stdin.on('data', function(chunk){
   console.log(Number(chunk) % 2 === 0);
});

function selicomArbuz(w) {
  var selicom = w % 2
  if (selicom === 0) {
    return "YES"
  } else {
    console.log("NO")
  }
}

var a=readline();
evenOdd(a);

function evenOdd(weight){
   if(weight%2===0){
     print('YES')

   }else{
       print('NO')
   }
}

a=readline();
if (a <= 2){
    print("NO")
}
if (a % 2 === 0){
    print("YES");
}
print("NO") ;

var num = readline();

if (num % 2 === 0 && num !== 2) {
  var isOk = true;
  for (var i = 2; i <= num; i+=2) {
    if ((num - i) % 2 !== 0) {
      isOk = false;
    }
  }

  print(isOk ? 'YES' : 'NO')
} else {
  print('NO')
}

var n = readline();

if(n%2 !== 0 && n ==2) {
  print('NO');
} else {
  print('YES');
}

var lines = readline().split('\n').join('')
var firstLine = lines[0]

print(firstLine % 2 === 0 ? 'YES' : 'NO')

process.stdin.on('data', chunk => console.log(chunk.toString() % 2 === 0 ? "YES":"NO"))

var n = readline();
if (n % 2 === 0) {print('YES');} else {print('NO');}

const input = readline();
const num = parseInt(input);

if ((num>2) && (num%2 === 0)) {
    //console.log("YES");
} else {
    //console.log("NO");
}

var arr = [];
function watemelon(input){
    if((input % 2) === 0){
        print('YES');
    } else {
        print('NO');
    }
}

var n = readline();
if (n % 2 === 0 && n > 2 && n < 100)  {print('YES');} else {print('NO');}

var a= readline().split(" ");
if(a%2===0){
    var b=a/2;
    if(b%2===0){
        print("YES");
    }
    else {
        print("NO");
    }
}
else print("NO");

num = process.argv[0]

function test(t) {
    if ( t<1 || t>100 ) {
        console.log("input error")
        process.exit()
    }
}

test(num)

for(let i = 1; i < num; i++) {
    if (i%2 == 0) {
        let m = num-i
        if (m%2 == 0) {
            console.log("YES");
            process.exit();
        }

    }
}
console.log("NO")

var w = readline();
	if(w==2)
	{
		print("NO");
	}
	if(w%2==0)
	{
		print("YES");
	}
	else
	{
		print("NO");
	}

let i = ''

function main(w) {
    let tong = 0;
    for(let i = 1; i < w ; i++){
        if(i % 2 === 0){
            tong += i;
        }
    }

    if(tong == w){
        console.log("YES");
    }else {
        console.log("NO");
    }
}
// main(5);

process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
    const {EOL} = require('os')
    const lines = i.split(EOL)
    const line1Array = lines[0].split(' ').map(x => parseInt(x))
    const w = line1Array[0]

    main(w);
})

var x;
x = readline();
if (x === 2 || (x % 2) == 1) {
    print("NO\n");
} else {
    print("YES\n");
}

var num = readline();

print(num % 2 === 0 ? 'YES' : 'NO');

var w = readline();

w > 0 && w % 2 === 0 ? print('YES') : print('NO');

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {

    const {EOL} = require('os')
    const lines = i.split(EOL) /*your input text, split by lines*/
    console.log(lines);

})

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

readline.on('line', line => {
  readline.close(), problem(parseInt(line));
});

function problem(i) {
    console.log(i % 2 === 0);
}

#!/usr/bin/env nodejs

// 4A - Watermelon

function main(stdin) {
  console.log(parseInt(stdin) % 2 === 0 ? "YES" : "NO");
}

main(require("fs").readFileSync(0, "utf-8"));

function watermelon (){
	w = prompt ("Introduce kg");
	w = parseInt(w);
	if ((w>=1)&&(w<=100)&&(w%2===0)&&(w>2)){
		alert ("YES");
	} else {alert ("NO");
	}
}

function watermelon(num) {
    var media;
    media = num / 2;
    if (media % 2 == 0) {
        return "YES";
    }

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

function main() {
    const parameterVariable = readLine();
    const line2 = readLine();

    console.log(line2)
    console.log(typeof line2)

    if(parseInt(line2) % 2 === 0) {
        console.log('YES')

    }
    else {console.log('NO');}

}

var cli = +readline() / 2;
if (cli % 2 === 0) {
    print('YES');
} else {
    print('NO');
}

//nodejs v4.2.6
process.stdin.resume();
	process.stdin.setEncoding('utf8');
	//Taking a usr input
	process.stdin.on('data', function (text) {
			//Printing out user input
			var input = parseInt(text)
				if(input%2 === 0){
					console.log('Yes');
				}else{
					console.log('No')
				}
	});

let i = '';
process.stdin.on('data', c => i += c);
process.stdin.on('end', () => {
  const { EOL, } = require('os');
  const weight = i.split(EOL);
  const res = (weight) => weight % 2 === 0 ? 'YES' : 'NO';
  const ver = res(weight);

  console.log(weight, ver);
});

'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 theNum = readline();

    let result = isTrue(theNum);

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

function isTrue(theNum) {
    let secondNum = theNum - 2;
    for(let i = 2; i <= theNum; i+=2, secondNum-=2) {
        if(i + secondNum == theNum) {
            if(i % 2 == 0 && secondNum % 2 == 0) {
                return true;
            }
        }
    }
    return false;
}

var w = readline();

if (w % 2=== 0) {
    print("YES");
} else {
    print("NO");
}

function divideBerry(w) {
    if (w % 2 === 0 && w !== 2) {
        print('YES');
    } else {
        print('NO');
    }
}

divideBerry(readline());

function task1(a){if((a/2)%2==0){return "yes"}else{ return "no"}};

var weight = readline();

if(weight <= 100 && weight >= 1 && weight % 2 == 0){
    print('YES');
}else{
    print('NO');
}

var input = readline().split(' ');
var watermelon_weight = input[0];

for(var even = 0; even <= watermelon_weight; even += 2){
    if(watermelon_weight === 2) { var verdict = 'NO'; break;}
    var verdict = watermelon_weight%2 === 0 ? 'YES' : 'NO';
    if(verdict === 'YES') { break; }
}
print(verdict);

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 = getArray(inputString, '\n');

  main();
});

function getArray(str, delimiter) {
  return str
    .trim()
    .split(delimiter)
    .map((string) => {
      return string.trim();
    });
}

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

function pi(str) {
  return parseInt(str);
}

function main() {
  var n = readLine();
  if (pi(n) %2 === 0 && pi(n) > 0) {
    console.log("YES");
  } else {
    console.log("NO");
  }
}

const state = {stdin:Buffer.alloc(0)}
const consume = chunk => state.stdin = Buffer.concat([state.stdin, chunk], state.stdin.length+chunk.length )
const commit = answer => process.stdout.write(answer)
//
const main = args => {
    let data = parseInt(state.stdin.toString('utf8'))
    let solution = 'NO'
    if(data < 1 || data > 100) return null

    // divide the watermelon into two parts,
    // each of them weighing even number of kilos;

    for(let i = 1; i < data; i++){
        let partOne = data-i
        let partTwo = data-partOne
        if( partOne % 2 == 0 && partTwo % 2 == 0 ) {
            solution = 'YES'
            return commit(solution)
        }
    }
}

process.stdin
    .on('data', consume)
    .on('end', main)

var a= parseInt(readline().split(" "));
if(a%2===0){
    print("YES");
}
else
{
    print("NO");
}

function f(chislo){
	if(chislo&1)
		console.log(YES);
	else
	console.log(NO);
}

// Sample code to perform I/O:

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

process.stdin.on("data", function (input) {
    stdin_input += input;                               // Reading input from STDIN
});

process.stdin.on("end", function () {
    main(stdin_input);
});

function main(input) {
    let output = nameLookUp(input);

    process.stdout.write(output);       // Writing output to STDOUT
}

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail

// Write your code here
function nameLookUp(arr) {
    let nLines = arr.split('\n');
    let nWeight = nLines[0];
    let quotient = (nWeight / 2) % 2 == 0 ? 'yes' : 'no';
    return quotient;

}

function main(){
  var n = +readline();
  if(n == 2 || n.toString().includes("."))
    print("NO");
  else
    print("YES");
}

main();

let i = ''

function main(w) {
    let dem = 0;
    for(let i = 1; i < w ; i++){
        if(w % i == 0){
            dem++
        }
    };

    if(dem >= 2){
        console.log("YES");
    }else {
        console.log("NO");
    }
}
// main(5);

process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
    const {EOL} = require('os')
    const lines = i.split(EOL)
    const line1Array = lines[0].split(' ').map(x => parseInt(x))
    const w = line1Array[0]

    main(w);
})

"use stict"

var current = write();
if(current > 2 && current % 2 == 0){
  print("YES");
}
else{
  print("NO");
}

const readline = require('readline');

const r1= readline.createInterface({
	input: process.stdin,
	output: process.stdout
})
r1.on('line', (line) => {
	watermelon(+line)
	r1.close();
})

function watermelon(kg) {
	return kg % 2 ? 'NO' : '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 main() {
    const parameterVariable = readLine();
    const line2 = readLine();

    if(parameterVariable >= 2 && parameterVariable % 2 === 0) console.log('YES')
    else console.log('NO')

}

var input = readline().split(' ');
var watermelon_weight = input[0];
print((watermelon_weight/2)%2 === 0 ? 'YES' : 'NO');

const a = parseInt(readline());
const d = a % 2 === 0;

d ? r = 'YES' : r = 'NO';

print(r);

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

const readable = process.stdin;

readable.on('data', (data) => {
	let a = data
 	if (a !== null) {
 		console.log(a % 2 === 0 ? "YES" : "NO")
 		process.exit(0)
 	}
})

function divideEvenly(w){
    if (w < 1 || w > 100) return console.log('NO');
    if (w % 2 === 0) return console.log('YES');
    return console.log('NO');
}
console.log(divideEvenly());

const num = parseInt(readline());
if(num%2===0){
    print('YES');
}
else{
    print('NO');
}

function divide(weight){
  return weight > 2 && weight % 2 === 0;
}

var numbers = readline().split(" ").map(function(x) { return parseInt(x); });

write(numbers)
write(numbers[0])
write('test')

process.stdin.resume();
process.stdin.setEncoding("ascii");
_input = "";
process.stdin.on("data", function (input) {
    _input += input;
});

process.stdin.on("end", function () {
   processData(_input);
});

function processData(input) {
    const values = input.split('\n')
    if (values && values.length > 0 && values[0]%2 === 0) {
        const temp = Math.floor(values[0]/2)
        if (temp%2 === 0) {
                        console.log("YES")

        } else {
                        console.log("NO")

        }

    } else {
            console.log("NO")
    }
}

var w = readline();

w%2 === 0 ? print('YES') : print('NO');

var w = readline();
    print('input');
    print(w);

    print('output');
    (w % 2 == 0 && w!=2)? print('YES'): print('NO');

(function f(){
	 var nums = readline().split(' ');
    var n = nums[0];
//	var n = parseInt(s);
	if(n=>2&&n%2!==0){
		//console.log("NO");
		print("NO");
	}
	else
		//console.logt("YES");
	  print("YES");

	return 0;
})();

var lines = readline().split('\n').join('')
var firstLine = lines[0]

print(firstLine % 2 === 0 && firstLine > 2) ? 'YES' : 'NO'

const readline = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout,
});
let input;
readline.on("line", (line) => {
  readline.close(), input=line;
});

console.log(`这是我的输入: ${input}`)

a = readline();
if (a <= 2 ){
    print("NO")
}
if (a % 2 === 0){
    print("YES");
}
print("NO") ;

var kilo = readline();
write((kilo/2)%2? 'NO':'YES');

var w = readline();
	if(w%2==0)
	{
		print("YES");
	}
		else
		{
			print("NO");
		}

var a= readline().split(" ");
if(a%2===0){
    var b=a/2;
    if(b%2===0){
        print("YES");
    }
    else {
        print("NO");
    }
}
else print("NO");

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

// single line input
// readline.on("line", (line) => {
//   readline.close();
// });

// multi line input
readline.on("line", (line) => {
  const input = +line.split(" ")[0];
  readline.close();
  const half = input / 2;
  if (input % 2 === 0) {
    if (half % 2 === 0) {
      console.log("YES");
      return;
    }
  }
  console.log("NO");
});

function selicomArbuz(w) {
  var selicom = w % 2
  if (selicom === 0) {
    print("YES")
  } else {
    print("NO")
  }
}

selicomArbuz(8);


A triangular number is the number of dots in an equilateral triangle uniformly filled with dots. For example, three dots can be arranged in a triangle; thus three is a triangular number. The n-th triangular number is the number of dots in a triangle with n dots on a side. . You can learn more about these numbers from Wikipedia (http://en.wikipedia.org/wiki/Triangular_number).Your task is to find out if a given integer is a triangular number.

The first line contains the single number n (1 ≤ n ≤ 500) — the given integer.

If the given integer is a triangular number output YES, otherwise output NO.

var n = Number(readline())
var i = 1
while (true) {
    if (i * (i+1) / 2 == n) {
        print('YES')
        break
    }

    if (i * (i+1) / 2 > n) {
        print('NO')
        break
    }

    i++
}

function trim(s) {
	return s.replace(/^\s+|\s+$/gm, '');
}

function tokenize(s) {
	return trim(s).split(/\s+/);
}

function tokenizeIntegers(s) {
	var tokens = tokenize(s);
	for (var i = 0; i < tokens.length; i += 1) {
		tokens[i] = parseInt(tokens[i]);
	};
	return tokens;
}

function solve(target) {
	var triangle = 1, naturalNumber = 1;
	while (triangle < target) {
		++naturalNumber;
		triangle += naturalNumber;
	}
	return (triangle == target);
}

function main() {
	var target = parseInt(readline());
	print(solve(target) ? "YES" : "NO");
}

main();

'use strict'

let N = +readline()
print(Number.isInteger(Math.sqrt(1 + 8 * N)) ? 'YES' : 'NO')

var tokenizer;
var index = 0;

function next(){
    while(tokenizer == null || index == tokenizer.length){
        tokenizer = readline().split(" ");
        index = 0;
    }
    var res = tokenizer[index++];
    return res;
}

function nextInt(){
    return parseInt(next());
}

function nextFloat(){
    return parseFloat(next());
}

function solve(){
    var n = nextInt();
    var t = 0;
    var flag = false;
    for(var i = 0; t <= n; ++i){
        if(t == n) flag = true;
        t = (i*(i+1))/2;
    }
    if(flag){
        print("YES");
    } else {
        print("NO");
    }
}
solve();

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

rl.on('line', (d) => {
  let curr = 0;
  let n = +d;
  let ans = 'NO';

  let inc = 0;
  while (curr <= n) {
    curr = inc * (inc + 1) / 2;
    if (curr === n) {
      ans = 'YES';
    }
    inc++;
  }

  console.log(ans);

  c++;
});


The finalists of the "Russian Code Cup" competition in 2214 will be the participants who win in one of the elimination rounds.The elimination rounds are divided into main and additional. Each of the main elimination rounds consists of c problems, the winners of the round are the first n people in the rating list. Each of the additional elimination rounds consists of d problems. The winner of the additional round is one person. Besides, k winners of the past finals are invited to the finals without elimination.As a result of all elimination rounds at least n·m people should go to the finals. You need to organize elimination rounds in such a way, that at least n·m people go to the finals, and the total amount of used problems in all rounds is as small as possible.

The first line contains two integers c and d (1 ≤ c, d ≤ 100) — the number of problems in the main and additional rounds, correspondingly. The second line contains two integers n and m (1 ≤ n, m ≤ 100). Finally, the third line contains an integer k (1 ≤ k ≤ 100) — the number of the pre-chosen winners.

In the first line, print a single integer — the minimum number of problems the jury needs to prepare.

if (!this.readline) print = console.log, readline = require('./readline');

function readNums() {
	return readline().split(' ').map(Number);
}

print(function(cb, ca, na, nb, k) {
	nb -= ~~(k / na);
	k %= na;

	if (nb <= 0) {
		return 0;
	}
	return (Math.min(nb * cb, Math.min((na - k) * ca + (nb - 1) * cb, (na - k) * ca + (nb - 1) * na * ca)));
}.apply(0, readNums().concat(readNums()).concat(readNums())));

function trim(s) {
	return s.replace(/^\s+|\s+$/gm, '');
}

function tokenize(s) {
	return trim(s).split(/\s+/);
}

function tokenizeIntegers(s) {
	var tokens = tokenize(s);
	for (var i = 0; i < tokens.length; i += 1) {
		tokens[i] = parseInt(tokens[i], 10);
	};
	return tokens;
}

function main() {
	var data = tokenizeIntegers(readline()),
		sizeA = data[0], sizeB = data[1];
	data = tokenizeIntegers(readline());
	var winA = data[0], multiple = data[1],
		seeds = parseInt(readline());
	var needWinners = Math.max(0, winA*multiple - seeds),
		needProblems = 0;
	if (winA*sizeB > sizeA) {
		var rounds = Math.floor(needWinners / winA);
		needProblems = rounds * sizeA;
		needWinners -= rounds * winA;
		needProblems += Math.min(sizeA, needWinners * sizeB);
	} else {
		needProblems = needWinners * sizeB;
	}
	print(needProblems);
}

main();

function tokenize(s) {
	return s.split(/\s+/);
}

function tokenize_integers(s) {
	var tokens = tokenize(s);
	for (var i = 0; i < tokens.length; i++) {
		tokens[i] = parseInt(tokens[i], 10);
	};
	return tokens;
}
function nextArray() {
	return tokenize_integers(readline());
}
function nextInt() {
	return parseInt(readline());
	//	return tokenize_integers(readline())[0];
}
function main() {
	var data = nextArray();
	var c = data[0], d = data[1];
	data = nextArray();
	var n = data[0], m = data[1];
	var k = nextInt();
	var needWinners = Math.max(0, n * m - k);
//	print(needWinners);
	var ret = -1;
	for(var x = 0; x <= 10000; x++) {
		var y = needWinners - x * n ;
		y = Math.max(y, 0);
		var tmp = c * x + y * d;
//		if(x < 10)print(tmp);
		if(ret == -1 || tmp < ret) {
			ret = tmp;
		}
	}
	print(ret);
}
main();

function main() {

    var arr1 = readline().split(' ').map(Number);
    var c = arr1[0], d = arr1[1];
    var arr2 = readline().split(' ').map(Number);
    var n = arr2[0], m = arr2[1];
    var k = Number(readline());

    var winners = Math.max(0, n * m - k);

    var problems = -1;

    for (var x = 0; x <= 10000; x++) {
        var y = winners - x * n;
        y = Math.max(y, 0);
        var temp = c * x + y * d;

        if (problems == -1 || temp < problems) {
            problems = temp;
        }
    }
    print(problems);

}

main();

if (!this.readline) print = console.log, readline = require('./readline');

function readNums() {
	return readline().split(' ').map(Number);
}

print(function(c, d, n, m, k) {
	m -= Math.floor(k / n);
	k %= n;
	return m <= 0 ? 0 : Math.min(m * c, Math.min((n - k) * d + (m - 1) * c, (n - k) * n + (m - 1) * n * n));
}.apply(0, readNums().concat(readNums()).concat(readNums())));

function trim(s) {
	return s.replace(/^\s+|\s+$/gm, '');
}

function tokenize(s) {
	return trim(s).split(/\s+/);
}

function tokenizeIntegers(s) {
	var tokens = tokenize(s);
	for (var i = 0; i < tokens.length; i += 1) {
		tokens[i] = parseInt(tokens[i], 10);
	};
	return tokens;
}

function main() {
	var data = tokenizeIntegers(readline()),
		sizeA = data[0], sizeB = data[1];
	data = tokenizeIntegers(readline());
	var winA = data[0], multiple = data[1],
		seeds = parseInt(readline());
	var needWinners = winA*multiple - seeds,
		needProblems = 0;
	if (winA*sizeB > sizeA) {
		var rounds = Math.floor(needWinners / winA);
		needProblems = rounds * sizeA;
		needWinners -= rounds * winA;
		needProblems += Math.min(sizeA, needWinners * sizeB);
	} else {
		needProblems = needWinners * sizeB;
	}
	print(needProblems);
}

main();

function tokenize(s) {
	return s.split(/\s+/);
}

function tokenize_integers(s) {
	var tokens = tokenize(s);
	for (var i = 0; i < tokens.length; i++) {
		tokens[i] = parseInt(tokens[i], 10);
	};
	return tokens;
}
function nextArray() {
	return tokenize_integers(readline());
}
function nextInt() {
	return parseInt(readline());
	//	return tokenize_integers(readline())[0];
}
function main() {
	var data = nextArray();
	var c = data[0], d = data[1];
	data = nextArray();
	var n = data[0], m = data[1];
	var k = nextInt();
	var needWinners = Math.max(0, n * m - k);
//	print(needWinners);
	var ret = -1;
	for(var x = 0; x <= 10000; x++) {
		var y = needWinners - c * x * n ;
		y /= d;
		y = Math.max(y, 0);
		var tmp = c * x + y * d;
		if(ret == -1 || tmp < ret) {
			ret = tmp;
		}
	}
	print(ret);
}
main();


Two-gram is an ordered pair (i.e. string of length two) of capital Latin letters. For example, "AZ", "AA", "ZA" — three distinct two-grams.You are given a string $$$s$$$ consisting of $$$n$$$ capital Latin letters. Your task is to find any two-gram contained in the given string as a substring (i.e. two consecutive characters of the string) maximal number of times. For example, for string $$$s$$$ = "BBAABBBA" the answer is two-gram "BB", which contained in $$$s$$$ three times. In other words, find any most frequent two-gram.Note that occurrences of the two-gram can overlap with each other.

The first line of the input contains integer number $$$n$$$ ($$$2 \le n \le 100$$$) — the length of string $$$s$$$. The second line of the input contains the string $$$s$$$ consisting of $$$n$$$ capital Latin letters.

Print the only line containing exactly two capital Latin letters — any two-gram contained in the given string $$$s$$$ as a substring (i.e. two consecutive characters of the string) maximal number of times.

NoteIn the first example "BA" is also valid answer.In the second example the only two-gram "ZZ" can be printed because it contained in the string "ZZZAA" two times.

// http://codeforces.com/contest/977/problem/B

var arg1 = readline();
var arg2 = readline();

var length = parseInt(arg1);
var string = arg2;

function main(length, string) {
    var hash = {};

    for (var i = 0; i < length - 1; i++) {
        var substring = `${string[i]}${string[i + 1]}`;
        if (hash[substring]) {
            hash[substring] = hash[substring] + 1;
        } else {
            hash[substring] = 1;
        }
    }

    var twogrammaList = Object.keys(hash);
    var biggest = twogrammaList[0];

    for (var j = 1; j < twogrammaList.length; j++) {
        var tg = twogrammaList[j];

        if (hash[tg] > hash[biggest]) {
            biggest = twogrammaList[j];
        }
    }

    return biggest;
}

print(main(length, string));

var n = parseInt(readline());
var s = readline();
var twoGram;
var testTwoGram;
var counter = 0;
var tempCounter = 0;
var result;
var x;
var y;

for(var i = 0; i < n - 1; i++)
{
    x = s[i];
    y = s[i + 1];
    twoGram = x + y;

    for(var j = 0; j < n - 1; j++)
    {
        x = s[j];
        y = s[j + 1];

        testTwoGram = x + y;

        if(testTwoGram == twoGram)
            tempCounter++;
    }
    if(tempCounter > counter)
    {
        result = twoGram;
        counter = tempCounter;
    }
    tempCounter = 0;
}

print(result);

var n = +readline();
var s = readline();
var mx = 0, id = 0;
for(var i = 0; i < n-1; i ++){
    var cnt = 0;
    for(var j = 0; j < n-1; j ++){
        if(s[i] == s[j] && s[i+1] == s[j+1]){
            cnt ++;
        }
    }
    if(cnt > mx){
        mx = cnt;
        id = i;
    }
}
var res = s[id] + s[id+1];
print(res);

var n = readline(), str = readline().split('');
var cnt = new Map();
var ans = str[0] + str[1], max = 1;
for(var i = 0; i < str.length - 1; i++) {
    var tp = str[i] + str[i + 1];
    if(cnt.has(tp)) {
        cnt.set(tp, cnt.get(tp) + 1);
        if(max < cnt.get(tp)) {
            max = cnt.get(tp);
            ans = tp;
        }
    }
    else {
        cnt.set(tp, 1);
    }
}
print(ans);

var t = Number(readline());
var str = readline().split('');
var arr = [];
str.forEach((cur, i) => {
    arr.push(str.slice(i,i+2).join(''));
});
var obj= {}, maxEl, maxCount = 0;
arr.forEach((cur, i) => {
    if(!obj[cur]){
        obj[cur] = 1;
    }else{
      obj[cur]++;
    }

    if(obj[cur] > maxCount){
        maxCount = obj[cur];
        maxEl = cur;
    }
});

print(maxEl);

var n = readline().split(" ").map(function(x) { return parseInt(x); });
var input = readline();

var k = 0;
var out = "";
var maxK = -1;

for(var i = 0; i < n - 1; i++) {
	var str1 = input.substr(i,2);
	k = 0;
	for(var j = 0; j < n - 1; j++){
		var str2 = input.substr(j,2);
		if(str2 == str1)
			k++;
	}
	if(maxK < (k-1)) {
		maxK = k - 1;
		out = str1;
	}
}

print(out);

var uselessLine = readline();
var input = readline();

var splitted = input.split('');
var maximal = 0;
var twogram = '';

function check(str,currentTwogram) {
    var n = 0;
    for(var j = 0; j<str.length;j++) {
        if(str[j] + str[j+1] == current){
            n++;
        }
    }

    return n;
}

for(var i= 0; i< splitted.length; i++) {

    var current = splitted[i] + splitted[i+1];

    var numOccurr = check(splitted, current);

    if(numOccurr > maximal) {
        maximal = numOccurr;
        twogram = current;
    }
}

print(twogram)

var n = readline();
var s = readline();

var map = {};

for (var i = 0; i < n - 1; i++) {
    var d = s[i] + s[i+1];
    map[d] === undefined ? map[d] = 1 : map[d]++;
}
var max = 0;
var ans = "";
Object.keys(map).map(function(key) {
    if (map[key] > max ) {
        ans = key;
        max = map[key];
    }
});

print(ans);

var n = readline().split("").map(function(elem) {
	return parseInt(elem);
});
var inputs = readline();

// var n = 7, inputs = 'ABABCABA';

function divide(n, inputs){
	var arr = new Map();
 	for(var i = 0; i<inputs.length-1; i++){
 		var key = inputs[i]+''+inputs[i+1];
 		if(arr.has(key)){
 			var num = arr.get(key);
 			arr.set(key,num+1);
 		}else{
 			arr.set(key,1);
 		}
	}
	var max_value = 0;
	var max_key = '';
	arr.forEach(function(value,key,map){
		if(value > max_value){
			max_value = value;
			max_key = key;
		}
	});
	print(max_key);
	// console.log(max_key);
}
divide(n,inputs);

var n = readline();
var s = readline();
var d = {},tmp, max=0, v, out=s.substring(0,2);

for(var i=0;i<s.length-1;i++){
    tmp = s.substring(i,i+2);
    if(d[tmp]==undefined){
        d[tmp]=1;
    }
    else{
        d[tmp]++;
        if(d[tmp]>max){
            max=d[tmp];
            out=tmp;
        }
    }
}

print(out)

var n = readline();
var s = readline();
var d = {};
var tmp, max=0, v, out="";

for(var i=0;i<s.length-1;i++){
    tmp = s.substring(i,i+2);
    if(d[tmp]==undefined){
        d[tmp]=1;
        if(out==""){
            out=tmp;
        }
    }
    else{
        v = d[tmp];
        d[tmp] = v+1;
        if(v+1>max){
            max=v+1;
            out=tmp;
        }
    }
}

print(out)

var n = readline();
var s = readline();
//print(str)
var d = {};
var tmp;
var max=0;
var v;
var out="";
for(var i=0;i<s.length-1;i++){
    tmp = s.substring(i,i+2);
    //print(tmp);
    if(d[tmp]==undefined){
        d[tmp]=1;
        if(out==""){
            out=tmp;
        }
    }
    else{
        v = d[tmp];
        d[tmp] = v+1;
        if(v+1>max){
            max=v+1;
            out=tmp;
        }
    }
}
print(out)

var n = readline();
var s = readline();
var d = {},tmp, max=0, v, out=s.substring(0,2);

for(var i=0;i<s.length-1;i++){
    tmp = s.substring(i,i+2);
    if(d[tmp]==undefined){
        d[tmp]=1;
    }
    else{
        v = d[tmp];
        d[tmp] = v+1;
        if(v+1>max){
            max=v+1;
            out=tmp;
        }
    }
}

print(out)

function calculateProb(str1, str2) {
    var num = parseInt(str1);
    var max = 0;
    var ans = '';
    var ob = {};

    for (var i = 0; i < str2.length - 1; i++) {
        var str = str2[i] + str2[i + 1];

        if (!ob[str]) {
            ob[str] = 0;
        }

        ob[str]++;
    }

    for (var j in ob) {
        if (ob.hasOwnProperty(j)) {
            if (max < ob[j]) {
                max = ob[j];
                ans = j;
            }
        }
    }

    return ans;
}

var s1 = readline();
var s2 = readline();

print(calculateProb(s1, s2));

let i = '';

process.stdin.on('data', c => i += c);
process.stdin.on('end', function(data) {
    const {EOL} = require('os')
    const [length, input] = i.split(EOL);
    const n = parseInt(length);
    const s = input.trim();
    console.log(getTwoGrams(n, s));
})

function getTwoGrams(n, s) {
  let max = 0;
  let pair;
  let i = 0;
  let sub = s.substring(i, i+2);

  function getReducer(matches) {
    return (carry, match, index) => {
      carry = carry + (matches[index].length - 1);
      return carry;
    };
  }

  while (sub.length === 2) {
    const regex = sub[0] == sub[1] ? `${sub}+` : `${sub}`;

    const matches = s.match(new RegExp(regex, 'g'));
    const occurances = matches.reduce(getReducer(matches), 0);

    if (max <= occurances) {
      max = occurances;
      pair = sub;
    }
    i++;
    sub = s.substring(i, i+2);
  }

  return pair;
}

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[0])
  const a = arr[1]
  const map = {}
  for(let i = 1; i < n; i ++) {
    var key = a[i - 1] + a[i]
    if(!map[key]) map[key] = 1
    else map[key] = map[key] + 1
  }

  var max = 0
  var maxK = ''
  for(let i in map) {
    if(map[i] > max) {
      max = map[i]
      maxK = i
    }
  }
  console.log(maxK)

})

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(/\r?\n/);
    const testCases = data[0] * 1;

    solve(data[1], testCases)
}

function solve(line, length) {
    let map = {}
    let i;
    for(i = 0; i < length - 1; i++) {
        let twogram = line.substring(i, i + 2)
        map[twogram] = twogram in map ? map[twogram] + 1 : 1
    }

    let maxtg = ""
    let curMax = 0
    let keys = Object.keys(map)
    keys.forEach( key =>
        {
            if (map[key] > curMax) {
                curMax = map[key]
                maxtg = key
            }
        }
    )
    console.log(maxtg)
}

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

let standardInputString= '';
let currentLine = 0;

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

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

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

  main();
})

function main(){

  //first line in input
  let [n] = readLine().split(' ').map(Number);

  let line = readLine().split('');
  let prev = 0;

  let result = '';
  for(let i = 0; i<line.length; i++){
    let counter = 0;
    for(let j  =0; j<line.length; j++){
      if(line[i] === line[j] && line[i+1] === line[j+1]){
        counter++;
      }
    }
    if(counter > prev){
      prev = counter;
      result = line[i] + line[i+1];
    }
  }
  console.log(result);

}

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

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

  const obj = {};

  for (let i = 0; i < str.length - 1; i++) {
    let pair = str[i] + str[i + 1];

    if (obj[pair]) {
      obj[pair]++;
    }
    else {
      obj[pair] = 1;
    }
  }

  let ans;
  let max = 0;

  Object.keys(obj).forEach(x => {
    if (obj[x] > max) {
      max = obj[x];
      ans = x;
    }
  });

  console.log(ans);

  c++;
});

'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 main(){
let n=readLine();
let twoGram=readLine();
let res=0;
let answer=" ";
for(let i=0;i<n-1;i++){
    let cur=0;
    for(let j=0;j<n-1;j++){
        if(twoGram[j]==twoGram[i] && twoGram[j+1] == twoGram[i+1])
        cur++;
        if(res<cur){
            res=cur;{
                answer=twoGram[i]+twoGram[i+1];
            }

        }

    }

}

     console.log(answer);
}

// https://codeforces.com/problemset/problem/977/B
// Big O:
// Time complexity: O(n)
// Space complexity: O(n)

const readline = require("readline");

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

let stringLength;
rl.on('line', (input) => {
    if (stringLength) {
        console.log(findMostCommonGram(input, stringLength));
        rl.close();
    } else {
        stringLength = input;
    }
});

// Problem
function findMostCommonGram(string, stringLength) {
    let mostCommonGram = "";
    let mostCommonGramOccurrences = 0;
    const gramOccurrences = {};

    for (let i = 0; i < stringLength - 1; i++) {
        const twogram = string[i] + string[i + 1];
        const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] : 0;
        const currentOcurrences = occurrences + 1;
        if (currentOcurrences > mostCommonGramOccurrences) {
            mostCommonGram = twogram;
            mostCommonGramOccurrences = currentOcurrences;
        }

        gramOccurrences[twogram] = currentOcurrences;
    }

    return mostCommonGram;
}

// https://codeforces.com/problemset/problem/977/B
// Big O:
// Time complexity: O(n)
// Space complexity: O(n)

const readline = require("readline");

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

let stringLength;
rl.on('line', (input) => {
    if (stringLength) {
        console.log(findMostCommonGram(input, stringLength));
        rl.close();
    } else {
        stringLength = input;
    }
});

// Problem
function findMostCommonGram(string, stringLength) {
    let mostCommonGram = "";
    let mostCommonGramOccurrences = 0;
    const gramOccurrences = {};

    for (let i = 0; i < stringLength - 1; i++) {
        const twogram = string[i] + string[i + 1];
        const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;
        const currentOcurrences = occurrences + 1;
        if (currentOcurrences > mostCommonGramOccurrences) {
            mostCommonGram = twogram;
            mostCommonGramOccurrences = currentOcurrences;
        }

        gramOccurrences[twogram] = currentOcurrences;
    }

    return mostCommonGram;
}

// https://codeforces.com/problemset/problem/977/B
// Big O:
// Time complexity: O(n)
// Space complexity: O(n)

const readline = require("readline");

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

let stringLength;
rl.on('line', (input) => {
    if (stringLength) {
        console.log(findMostCommonGram(input, stringLength));
        rl.close();
    } else {
        stringLength = input;
    }
});

// Problem
function findMostCommonGram(string, stringLength) {
    let mostCommonGram = "";
    let mostCommonGramOccurrences = 0;
    const gramOccurrences = {};

    for (let i = 0; i < stringLength - 1; i++) {
        const twogram = string[i] + string[i + 1];
        const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;
        if (occurrences > mostCommonGramOccurrences) {
            mostCommonGram = twogram;
            mostCommonGramOccurrences = occurrences;
        }

        gramOccurrences[twogram] = occurrences;
    }

    return mostCommonGram;
}

// https://codeforces.com/problemset/problem/977/B
// Big O:
// n: string length
// Time complexity: O(n)
// Space complexity:

const readline = require("readline");

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

let stringLength;
rl.on('line', (input) => {
    if (stringLength) {
        console.log(findMostCommonGram(input, stringLength));
        rl.close();
    } else {
        stringLength = input;
    }
});

// Problem
function findMostCommonGram(string, stringLength) {
    let mostCommonGram = "";
    const gramOccurrences = {};

    for (let i = 0; i < stringLength - 1; i++) {
        const twogram = string[i] + string[i + 1];
        const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;
        const mostCommonOccurrences = gramOccurrences[mostCommonGram] ? gramOccurrences[mostCommonGram] : 0;
        if (occurrences > mostCommonOccurrences) {
            mostCommonGram = twogram;
        }

        gramOccurrences[twogram] = occurrences;
    }

    return mostCommonGram;
}

// https://codeforces.com/problemset/problem/977/B
// Big O:
// Time complexity:
// Space complexity:

const readline = require("readline");

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

let stringLength;
rl.on('line', (input) => {
    if (stringLength) {
        console.log(findMostCommonGram(input, stringLength));
        rl.close();
    } else {
        stringLength = input;
    }
});

// Problem
function findMostCommonGram(string, stringLength) {
    let mostCommonGram = "";
    let mostCommonGramOccurrences = 0;
    const gramOccurrences = {};

    for (let i = 0; i < stringLength - 1; i++) {
        const twogram = string[i] + string[i + 1];
        const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] : 0;
        const currentOcurrences = occurrences + 1;
        if (currentOcurrences > mostCommonGramOccurrences) {
            mostCommonGram = twogram;
            mostCommonGramOccurrences = currentOcurrences;
        }

        gramOccurrences[twogram] = currentOcurrences;
    }

    return mostCommonGram;
}

// https://codeforces.com/problemset/problem/977/B
// Big O:
// n: string length
// Time complexity: O(n)
// Space complexity: O(n)

const readline = require("readline");

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

let stringLength;
rl.on('line', (input) => {
    if (stringLength) {
        console.log(findMostCommonGram(input, stringLength));
        rl.close();
    } else {
        stringLength = input;
    }
});

// Problem
function findMostCommonGram(string, stringLength) {
    let mostCommonGram = "";
    let mostCommonGramOccurrences = 0;
    const gramOccurrences = {};

    for (let i = 0; i < stringLength - 1; i++) {
        const twogram = string[i] + string[i + 1];
        const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;
        if (occurrences > mostCommonGramOccurrences) {
            mostCommonGram = twogram;
            mostCommonGramOccurrences = occurrences;
        }

        gramOccurrences[twogram] = occurrences;
    }

    return mostCommonGram;
}

// https://codeforces.com/problemset/problem/977/B
// Big O:
// Time complexity:
// Space complexity:

const readline = require("readline");

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

let stringLength;
rl.on('line', (input) => {
    if (stringLength) {
        console.log(findMostCommonGram(input, stringLength));
        rl.close();
    } else {
        stringLength = input;
    }
});

// Problem
function findMostCommonGram(string, stringLength) {
    let mostCommonGram = "";
    let mostCommonGramOccurrences = 0;
    const gramOccurrences = {};

    for (let i = 0; i < stringLength - 1; i++) {
        const twogram = string[i] + string[i + 1];
        const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;
        if (occurrences > mostCommonGramOccurrences) {
            mostCommonGram = twogram;
            mostCommonGramOccurrences = occurrences;
        }

        gramOccurrences[twogram] = occurrences;
    }

    return mostCommonGram;
}

// https://codeforces.com/problemset/problem/977/B
// Big O:
// n: string length
// Time complexity: O(n)
// Space complexity:

const readline = require("readline");

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

let stringLength;
rl.on('line', (input) => {
    if (stringLength) {
        console.log(findMostCommonGram(input, stringLength));
        rl.close();
    } else {
        stringLength = input;
    }
});

// Problem
function findMostCommonGram(string, stringLength) {
    let mostCommonGram = "";
    let mostCommonGramOccurrences = 0;
    const gramOccurrences = {};

    for (let i = 0; i < stringLength - 1; i++) {
        const twogram = string[i] + string[i + 1];
        const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] + 1 : 1;
        if (occurrences > mostCommonGramOccurrences) {
            mostCommonGram = twogram;
            mostCommonGramOccurrences = occurrences;
        }

        gramOccurrences[twogram] = occurrences;
    }

    return mostCommonGram;
}

// https://codeforces.com/problemset/problem/977/B
// Big O:
// n: string length
// Time complexity: O(n)
// Space complexity:

const readline = require("readline");

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

let stringLength;
rl.on('line', (input) => {
    if (stringLength) {
        console.log(findMostCommonGram(input, stringLength));
        rl.close();
    } else {
        stringLength = input;
    }
});

// Problem
function findMostCommonGram(string, stringLength) {
    let mostCommonGram = "";
    let mostCommonGramOccurrences = 0;
    const gramOccurrences = {};

    for (let i = 0; i < stringLength - 1; i++) {
        const twogram = string[i] + string[i + 1];
        const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] : 0;
        const currentOcurrences = occurrences + 1;
        if (currentOcurrences > mostCommonGramOccurrences) {
            mostCommonGram = twogram;
            mostCommonGramOccurrences = currentOcurrences;
        }

        gramOccurrences[twogram] = currentOcurrences;
    }

    return mostCommonGram;
}

// https://codeforces.com/problemset/problem/977/B
// Big O:
// Time complexity: O(n)
// n: string length
// Space complexity: O(n)

const readline = require("readline");

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

let stringLength;
rl.on('line', (input) => {
    if (stringLength) {
        console.log(findMostCommonGram(input, stringLength));
        rl.close();
    } else {
        stringLength = input;
    }
});

// Problem
function findMostCommonGram(string, stringLength) {
    let mostCommonGram = "";
    let mostCommonGramOccurrences = 0;
    const gramOccurrences = {};

    for (let i = 0; i < stringLength - 1; i++) {
        const twogram = string[i] + string[i + 1];
        const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] : 0;
        const currentOcurrences = occurrences + 1;
        if (currentOcurrences > mostCommonGramOccurrences) {
            mostCommonGram = twogram;
            mostCommonGramOccurrences = currentOcurrences;
        }

        gramOccurrences[twogram] = currentOcurrences;
    }

    return mostCommonGram;
}

// https://codeforces.com/problemset/problem/977/B
// Big O:
// Time complexity: O(n)
// Space complexity:

const readline = require("readline");

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

let stringLength;
rl.on('line', (input) => {
    if (stringLength) {
        console.log(findMostCommonGram(input, stringLength));
        rl.close();
    } else {
        stringLength = input;
    }
});

// Problem
function findMostCommonGram(string, stringLength) {
    let mostCommonGram = "";
    let mostCommonGramOccurrences = 0;
    const gramOccurrences = {};

    for (let i = 0; i < stringLength - 1; i++) {
        const twogram = string[i] + string[i + 1];
        const occurrences = gramOccurrences[twogram] ? gramOccurrences[twogram] : 0;
        const currentOcurrences = occurrences + 1;
        if (currentOcurrences > mostCommonGramOccurrences) {
            mostCommonGram = twogram;
            mostCommonGramOccurrences = currentOcurrences;
        }

        gramOccurrences[twogram] = currentOcurrences;
    }

    return mostCommonGram;
}

const f = (n, s) => {
    const k = 2;

    const result = new Map();
    let best = null;
    let preBest = null;

    const compare = (sub) => {
        result[sub] = result[sub] ? result[sub] + 1 : 1;
        if (!best) {
            best = sub;
        } else if (result[sub] > result[best]) {
            preBest = best;
            best = sub;
        }
    };

    for (let i = 0; i < n - 1; i += 1) {
        if (result[best] > n / 2) {  return best; }
        if (preBest) {
            const leftSteps = n - 1 - i;
            const bestLeadSteps = result[best] - result[preBest];
            if (leftSteps < bestLeadSteps) { return best; }
        }

        compare(s.slice(i, i + k));
    }

    return best;
};

let i = '';
process.stdin.on('data', c => i += c);
process.stdin.on('end', () => {
    const {EOL} = require('os');
    const [ n, s ] = i.split(EOL);
    console.log(f(n, s));
});

var uselessLine = readline();
var input = readline();

var splitted = input.split('');
var maximal = 0;
var twogram = '';

for(var  j= 0; j< splitted.length; j++) {
    if(j+1 < splitted.length) {
        var current = splitted[j] + splitted[j+1];
        var numOcurr = input.match(new RegExp(current, 'g')).length;
    if(numOcurr > maximal)
        maximal = numOcurr;
        twogram = current;
    }
}

print(twogram);

var n = readline().split("").map(function(elem) {
	return parseInt(elem);
});
var inputs = readline();

// var n = 7, inputs = 'ABABCABA';

function divide(n, inputs){
	var arr = new Map();
 	for(var i = 0; i<inputs.length-1; i++){
 		var key = inputs[i]+''+inputs[i+1];
 		if(arr.has(key)){
 			var num = arr.get(key);
 			arr.set(key,num+1);
 		}else{
 			arr.set(key,1);
 		}
	}
	var max_value = 0;
	arr.forEach(function(value,key,map){
		if(value > max_value){
			max_value = value;
		}
	});
	print(max_value);
	// console.log(max_value);
}
divide(n,inputs);

var n = readline();
var s = readline();
var d = {},tmp, max=0, v, out=s.substring(0,2);

for(var i=0;i<s.length-1;i++){
    tmp = s.substring(i,i+2);
    if(d[tmp]==undefined){
        d[tmp]=1;
    }
    else{
        d[tmp]++;
        if(d[tmp]>max){
            max=v+1;
            out=tmp;
        }
    }
}

print(out)

// http://codeforces.com/contest/977/problem/B

var arg1 = readline();
var arg2 = readline();

print(arg1);
print(arg2);

//let length = parseInt(arg1);
//let string = arg2;

//function main(length, string) {
    //let hash = {};

    //for (let i = 0; i < length - 1; i++) {
        //let substring = `${string[i]}${string[i + 1]}`;
        //if (hash[substring]) {
            //hash[substring] = hash[substring] + 1;
        //} else {
            //hash[substring] = 1;
        //}
    //}

    //let twogrammaList = Object.keys(hash);
    //let biggest = twogrammaList[0];

    //for (let i = 1; i < twogrammaList.length; i++) {
        //let tg = twogrammaList[i];

        //if (hash[tg] > hash[biggest]) {
            //biggest = twogrammaList[i];
        //}
    //}

    //return biggest;
//}

//print(main(length, string));

let n, s;

process.stdin.on('data', function(data) {
  if (!n) {
    n = parseInt(data.toString());
  } else {
    s = data.toString().trim();
    console.log(getTwoGrams(n, s));
    s = undefined;
    n = undefined;
  }
});

function getTwoGrams(n, s) {
  let max = 0;
  let pair;
  let i = 0;
  let sub = s.substring(i, i+2);

  while (sub.length === 2) {
    const regex = sub[0] == sub[1] ? `${sub}+` : `${sub}`;
    const matches = s.match(new RegExp(regex, 'g'));

    const occurances = matches.reduce((carry, match, index) => {
      carry = carry + (matches[index].length - 1);
      return carry;
    }, 0);

    if (max <= occurances) {
      max = occurances;
      pair = sub;
    }
    i++;
    sub = s.substring(i, i+2);
  }

  return pair;
}

let i = '';

process.stdin.on('data', c => i += c);
process.stdin.on('end', function(data) {
    const {EOL} = require('os')
    const [length, input] = i.split(EOL);
    const n = parseInt(length);
    const s = input.trim();
    console.log(getTwoGrams(n, s));
})

function getTwoGrams(n, s) {
  let max = 0;
  let pair;
  let i = 0;
  let sub = s.substring(i, i+2);

  const regex = sub[0] == sub[1] ? `${sub}+` : `${sub}`;
  const matches = s.match(new RegExp(regex, 'g'));
  const reducer = (carry, match, index) => {
    carry = carry + (matches[index].length - 1);
    return carry;
  };

  while (sub.length === 2) {
    const occurances = matches.reduce(reducer, 0);

    if (max <= occurances) {
      max = occurances;
      pair = sub;
    }
    i++;
    sub = s.substring(i, i+2);
  }

  return pair;
}


There are three points marked on the coordinate plane. The goal is to make a simple polyline, without self-intersections and self-touches, such that it passes through all these points. Also, the polyline must consist of only segments parallel to the coordinate axes. You are to find the minimum number of segments this polyline may consist of.

Each of the three lines of the input contains two integers. The i-th line contains integers xi and yi ( - 109 ≤ xi, yi ≤ 109) — the coordinates of the i-th point. It is guaranteed that all points are distinct.

Print a single number — the minimum possible number of segments of the polyline.

NoteThe variant of the polyline in the first sample:  The variant of the polyline in the second sample:  The variant of the polyline in the third sample:

var readp = () => {
  var temp = readline().split(' ');
  return [parseFloat(temp[0]), parseFloat(temp[1])];
};
var p = [readp(), readp(), readp()];
var memo = [];
var cp = (c) => (i, j) => {
  if (p[i][c] === p[j][c]) {
    memo.push({i:i, j:j, c:c});
    return 1;
  } else {
    return 0;
  }
}
var cnt = (c) => cp(c)(0, 1) + cp(c)(0, 2) + cp(c)(1, 2);
var between = () => {
  var o = memo[0];
  var k = 3-o.i-o.j;
  var c = 1-o.c;
  return p[o.i][c]<p[k][c] && p[k][c]<p[o.j][c] ||
    p[o.i][c]>p[k][c] && p[k][c]>p[o.j][c];
};
if (cnt(0)===3 || cnt(1)===3) {
  print(1);
} else if (cnt(0)===1 && cnt(1)===1) {
  print(2);
} else if ((cnt(0)===1 || cnt(1)===1) && !between()){
  print(2);
} else {
  print(3);
}

var points = new Array(3);
for (var i = 0; i < points.length; ++i) {
    points[i] = readline().split(" ", 2);
    for (var j = 0; j < 2; ++j) {
        points[i][j] = Number(points[i][j]);
    }
}

function same(x, y, z) {
    return x === y && y === z;
}
function right(a, b, c) {
    return b[0] === c[0] && (a[1] >= Math.max(b[1], c[1]) || a[1] <= Math.min(b[1], c[1])) ||
        b[1] === c[1] && (a[0] >= Math.max(b[0], c[0]) || a[0] <= Math.min(b[0], c[0]));
}

if (same(points[0][0], points[1][0], points[2][0]) ||
    same(points[0][1], points[1][1], points[2][1])) {
        print(1);
} else if (right(points[0], points[1], points[2]) ||
    right(points[1], points[0], points[2]) ||
    right(points[2], points[0], points[1])) {
    print(2);
} else {
    print(3);
}

var points = new Array(3);
for (var i = 0; i < points.length; ++i) {
    points[i] = readline().split(" ", 2);
}

function same(x, y, z) {
    return x === y && y === z;
}
function right(a, b, c) {
    return b[0] === c[0] && (a[1] >= Math.max(b[1], c[1]) || a[1] <= Math.min(b[1], c[1])) ||
        b[1] === c[1] && (a[0] >= Math.max(b[0], c[0]) || a[0] <= Math.min(b[0], c[0]));
}

if (same(points[0][0], points[1][0], points[2][0]) ||
    same(points[0][1], points[1][1], points[2][1])) {
        print(1);
} else if (right(points[0], points[1], points[2]) ||
    right(points[1], points[0], points[2]) ||
    right(points[2], points[0], points[1])) {
    print(2);
} else {
    print(3);
}

var readp = () => {
  var temp = readline().split(' ');
  return [parseFloat(temp[0]), parseFloat(temp[1])];
};
var p = [readp(), readp(), readp()];
var dis2 = (i, j) =>
  Math.pow(p[i][0]-p[j][0], 2) + Math.pow(p[i][1]-p[j][1], 2);
var cos = (i) => {
  var j = i-1 < 0 ? i+2 : i-1;
  var dj = dis2(i, j);
  var k = i+1 > 2 ? i-2 : i+1;
  var dk = dis2(i, k);
  var di = dis2(j, k);
  var cos = (dj+dk-di) / (2*Math.sqrt(dj*dk));
  return Math.round(1E6*cos) / 1E6;
};
(() => {
  for (var i = 0; i < 3; ++i) {
    switch (cos(i)) {
      case -1:
      case 1:
        print(1);
        return ;
      case 0:
        print(2);
        return ;
    }
  }
  print(3);
})();

var points = new Array(3);
for (var i = 0; i < points.length; ++i) {
    points[i] = readline().split(" ", 2);
}

function same(x, y, z) {
    return x === y && y === z;
}
function right(a, b, c) {
    return a[0] === b[0] && a[1] === c[1] ||
        a[1] === b[1] && a[0] === c[0];
}

if (same(points[0][0], points[1][0], points[2][0]) ||
    same(points[0][1], points[1][1], points[2][1])) {
        print(1);
} else if (right(points[0], points[1], points[2]) ||
    right(points[1], points[0], points[2]) ||
    right(points[2], points[0], points[1])) {
    print(2);
} else {
    print(3);
}

var points = new Array(3);
for (var i = 0; i < points.length; ++i) {
    points[i] = readline().split(" ", 2);
    for (var j = 0; j < 2; ++j) {
        points[i][j] = Number(points[i][j]);
    }
}

function same(x, y, z) {
    return x === y && y === z;
}
function right(a, b, c) {
    return b[0] === c[0] && (a[1] > Math.max(b[1], c[1]) || a[1] < Math.min(b[1], c[1])) ||
        b[1] === c[1] && (a[0] > Math.max(b[0], c[0]) || a[0] < Math.min(b[0], c[0]));
}

if (same(points[0][0], points[1][0], points[2][0]) ||
    same(points[0][1], points[1][1], points[2][1])) {
        print(1);
} else if (right(points[0], points[1], points[2]) ||
    right(points[1], points[0], points[2]) ||
    right(points[2], points[0], points[1])) {
    print(2);
} else {
    print(3);
}

var points = new Array(3);
for (var i = 0; i < points.length; ++i) {
    points[i] = readline().split(" ", 2);
}

function same(x, y, z) {
    return x === y && y === z;
}
function right(a, b, c) {
    return b[0] === c[0] && (a[1] > Math.max(b[1], c[1]) || a[1] < Math.min(b[1], c[1])) ||
        b[1] === c[1] && (a[0] > Math.max(b[0], c[0]) || a[0] < Math.min(b[0], c[0]));
}

if (same(points[0][0], points[1][0], points[2][0]) ||
    same(points[0][1], points[1][1], points[2][1])) {
        print(1);
} else if (right(points[0], points[1], points[2]) ||
    right(points[1], points[0], points[2]) ||
    right(points[2], points[0], points[1])) {
    print(2);
} else {
    print(3);
}