def exist_not_combination(num_list):
    for x in range(len(num_list)):
        for y in range(len(num_list)):
            if x != y:
                if num_list[x] ^ num_list[y] == 0:
                    return True
                                      
    return False

n = int(input())
a = [int(x) for x in input().split()]

if n == 3:
    if exist_not_combination(a):
        print("No")
    else :
        print("Yes")
else :
    print("No")