N = gets.to_i TWO = 'a'.to_i.succ.succ def f(x) x < TWO || (TWO...x).any? { |n| (x % n).zero? } end if f(N) puts 'NO' else puts 'YES' end