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: #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
    int n,x=2;
    cin>>n;
    int cnt1=0,cnt2=0;
    while(n>0){
        if(n&1){
        cnt1++;    
        }
        else{
            cnt2++;
        }
        n/=2;
    }
    if(cnt1%2==0 || cnt2%2==0){
        cout<<"YES";
    }
    else{
    cout<<"NO";}
    //cout<<cnt1<<" "<<cnt2;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?