import java.io.*;
public class MyClass {
static boolean check_same_set_and_unset_bits(int n) {
int set = 0, unset = 0;
while (n != 0) {
if ((n & 1) == 1)
set++;
else
unset++;
n = n >> 1;
}
if (set == unset)
return true;
return false;
}
public static void main(String args[]) {
int n = 178;
System.out.println(Integer.toBinaryString(n));
if (check_same_set_and_unset_bits(n))
System.out.println("Yes\n");
else
System.out.println("No\n");
n = 179;
System.out.println(Integer.toBinaryString(n));
if (check_same_set_and_unset_bits(n))
System.out.println("Yes\n");
else
System.out.println("No\n");
}
}
/*
run:
10110010
Yes
10110011
No
*/