For this Question: Given a number N, You have to find if the binary representation of N can be rearranged to form a palindrome.Input contains a single integer N.

Constraints:-
1 <<= N <= 1000000000Print "YES" if the binary representation of N can be rearranged to form a palindrome, else print "NO".Sample Input:- 
6

Sample Output:-
YES

Explanation:-
The binary representation of 6 = 110 which can be rearranged as 101

Sample Input:-
14

Sample Output:-
NO, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static boolean oddeven(int cntzero,int cntone){
             if(cntzero%2==0 && cntone%2!=0 || cntzero%2!=0 && cntone%2==0)
             {
                 return true;
             }
             if(cntzero%2==0 && cntone==cntzero){
                 return true;
             }
             return false;
    }
    public static boolean Binary(int n){
        int cntzero=0;
        int cntone=0;
        while(n!=0){
        if(n%2==1){
            cntone++;
        }
        else{
            cntzero++;
        }
        n=n/2;
        }
        return oddeven(cntzero,cntone);
    }
    public static void main (String[] args) {
     Scanner sc=new Scanner(System.in);
     int n=sc.nextInt();
     if(Binary(n)==true){
         System.out.println("YES");
     }
     else{
         System.out.println("NO");
     }
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?