main :: IO () main = (readLn :: IO Int) >>= putStrLn . solve solve :: Int -> String solve n = if y >= 3 then "YES" else "NO" where x = sqrt $ (fromIntegral n) :: Double y = length $ filter (\x -> n `mod` x == 0) $ takeWhile (<= ceiling x) [1..]