# -*- coding:utf-8 -*- n = raw_input() for i in range (1,n+1,1): if not n%i: print "NO" break print "YES"