-- primality test written in haskell
-- github.com/v0idpwn

intSqrt :: Int -> Int
intSqrt x = floor . sqrt . fromIntegral $ x

multipliers = [y | k <- [1..], y <- [(6*k)-1, (6*k)+1]]

used :: Int -> [Int]
used n = [2,3] ++ takeWhile (< intSqrt n) multipliers

check_div :: Int -> Int -> Bool
check_div k p
  | mod k p == 0 = True
  | otherwise = False

primality_test :: Int -> [Bool]
primality_test x = map (check_div x) (used x)  

check :: [Bool] -> Bool
check xs
  | or xs = False
  | otherwise = True 

main = print 7
