For this Question: Siddharth, a great entrepreneur, chooses a person as an intern if he/she good at maths. Thus Sid gives a simple maths problem to the candidate based on which he decides to who is gonna get the offer. Below is the description of the problem asked by Sid
Given arr <b>A[]</b> containing <b>N</b> positive integers. The task is to check whether it is possible to divide the given array into an <b>odd number of non-empty subarrays each of odd length such that each sub-array starts and ends with an odd number</b>. If it is possible to divide the array then print "<b>YES</b>" otherwise "<b>NO</b>".

<b>Note:</b> Don't forget that the complete array is also considered as a subarrayThe first line of each test case contains N size of array. Second-line contains N space-separated elements.

<b>Constraints:</b>
1 <= N <= 999999
0 <= A[i] <= 999999999Print "YES", if it is possible to divide the array. Otherwise, print "NO". Without quotes.Sample Input 1:
5
9 0 3 1 5

Sample Output 1:
YES

Sample Input 2:
3
1 2 0

Sample Output 2:
NO

Explanation:
Testcase 1: Array {9, 0, 3, 1, 5} can be divided as {9, 0, 3}, {1}, {5}., I have written this Solution Code: 'use strict'

function main(input)
{
    const inputList = input.split('\n');
    const arrSize = Number(inputList[0].split(' ')[0])
    const arr = inputList[1].split(' ').
                    map(x => Number(x))

    if(arrSize %2 == 0 || Number(arr[0]) %2 == 0 || 
       Number(arr[arrSize-1])%2 == 0)
       console.log("NO")
    else console.log("YES")


}
main(require("fs").readFileSync("/dev/stdin", "utf8"));, In this Programming Language: JavaScript, Now tell me if this Code is compilable or not?