import scala.io.StdIn.{readInt,readLine}

object Main {
  def euclid(m:Int,n:Int):Int = if(n==0) m else euclid(n,m%n)

  def main(args:Array[String]) = {
    val n = readInt
    val nums = readLine.split(" ").map(_.toInt)
    var gcm = nums(0)
    for(i <- 1 until n) {
      gcm = euclid(gcm,nums(i))
    }
    for(i<-1 to gcm if gcm%i==0)
      println(i)
  }
}