n,a,*x=$<.read.split.map &:to_i;c=0 puts x.reduce(:*)==n*a ?:YES: :NO