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: import java.io.*;
import java.util.*;



class Main {
    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64];
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }  while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }
    }
	public static void main (String[] args) throws IOException {

        Reader sc=new Reader();
        int n=sc.nextInt();
        int[] a=new int[n];
        int counter=0;
        for(int i=0;i<n;i++){
            a[i]=sc.nextInt();
            if(a[i]%2!=0) counter++;
        }

        String ans="NO";
        if((a[0]%2!=0)&&(a[n-1]%2!=0)&&(n%2!=0))
        ans="YES";


        System.out.println(ans);
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?