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