n = int(input())
a = list(map(int, input().split()))

ret = 0
for i in range(n):
    ret ^= (i + 1)
    if a[i] == 0:
        print('No')
        exit()
    ret ^= a[i]

print('Yes' if ret == 0 else 'No')
