n, a = io.read("*n", "*n") a = a * n for i = 1, n do a = a - io.read("*n") end if(a == 0) then print("YES") else print("NO") end