with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

procedure Solve is
   X : Integer;
begin
   Get (X);
   if X = 7 then
      Put_Line ("YES");
   elsif X = 5 then
      Put_Line ("YES");
   elsif X = 3 then
      Put_Line ("YES");
   else
      Put_Line ("NO");
   end if;
end Solve;