module Main where

    factors :: Int -> [Int]
    factors n = [x | x <- [1..n], n `mod` x == 0]

    prime :: Int -> Bool
    prime n = factors n == [1, n]

    primesTo :: Int -> [Int]
    primesTo n = [x | x <- [2..n], prime x]
