n=gets.to_i x=gets.split.map(&:to_i).sort puts x.inject{|s,l|s+l%n}%n==0 && x.uniq.size==n ? "YES" : "NO"