parseInt(x)=parse(Int,x)
parseMap(x::Array{SubString{String},1})=map(parseInt,x)

function main()
	n = readline() |> parseInt
	a = readline() |> split |> parseMap
	if sum(a) == 0
		println("Yes")
	elseif n%3!=0
		println("No")
	else
		d = Dict{Int,Int}()
		for i in 1:n
			if haskey(d,a[i])
				d[a[i]] += 1
			else
				d[a[i]] = 1
			end
		end
		f = 0
		for j in values(d)
			if j != div(n,3)
				f = 1
				break
			end
		end
		if f==1 && haskey(d,0)
			f = 0
			for j in keys(d)
				if (j == 0 && d[j] != div(n,3)) || (j != 0 && d[j] != 2*div(n,3))
					f = 1
					break
				end
			end
		end
		println(f==0?"Yes":"No")
	end	
end

main()