#yuki1594
n=int(input())
e=list(map(int,input().split()))
s=sum(e)
if s%3:
 print('No')
else:
 print('Yes')