Doubt in solving assignments

Problem-Mike has got an array A of n numbers where binary representations of two consecutive numbers differ by only one bit. Now, he has a problem for you. He wants you to tell if there exists four numbers A[i1],A[ i2], A[i3],A[ i4] such that xor of these numbers is equal to 0. You can find this problem here.

Input Format
First line contains one integer n. Second line contains n space separated non-negative integers denoting the sequence A.

Constraints
4 <= n <= 100000

Output Format
Output YES if there exist four distinct indices i1, i2, i3, i4 such that A[i1] xor A[i2] xor A[i3] xor A[i4] = 0. Otherwise, output NO.

Sample Input
5
1 0 2 3 7
Sample Output
YES

Its not giving right ans for all test casec ,plz correct the code and send it

hello @Somasree
check now->

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.