#!/usr/bin/env python3

# from numba import njit

# input = stdin.readline

# @njit
def solve(n,a):
  a = sorted(a)
  return all(a[i] ^ a[(i+2)%n] == a[(i+1)%n] for i in range(n))



def main():
  N = int(input())
  # N,M = map(int,input().split())
  a = list(map(int,input().split()))
  print("Yes" if solve(N,a) else "No")
  return

if __name__ == '__main__':
  main()
