fun main(args: Array<String>) {
    readLine()
    val numbers = readLine()?.split(" ")?.map(String::toInt) ?: throw IllegalArgumentException()
    val minimumValue = numbers.min() ?: 0
    (1..minimumValue / 2).forEach { num ->
        val a = numbers.firstOrNull { it %  num != 0 }
        if (a == null) {
            println(num)
        }
    }
}
