require "prime" N = gets.to_i d = N.prime_division.inject(1) { |r, (p, e)| r * ((p**(e + 1) - 1) / (p - 1)) } puts (d == N * 2) ? "Yes" : "No"