input_num = [1,2,4,8]
input_num = [i for i in reversed(input_num)]
input_size = len(input_num)-1
print(input_num[input_size])

for i in range(len(input_num)):
    left = i-1
    right = i+1
    if left < 0:
        left = input_size
    if right > input_size:
        right = 0
    if input_num[left]^input_num[right] == input_num[i]:
        continue
    else:
        print("No")
        break
else:
    print("Yes")