N = int(input()) a = list(map(int,input().split())) flg = [1] * N cnt = 0 for i in range(N): if flg[i]: idx = i Roop = 0 while flg[idx]: flg[idx] = 0 idx = a[idx] - 1 Roop += 1 if Roop % 2 == 0: cnt += 1 if cnt % 2 == 0: print('Yes') else: print('No')