object Main extends App {
  var N = readInt
  var get = readLine.split(" ")
  var max = 0
  var min = 1000000001
  var check = 0
  for(i <- 0 until N){
    max = math.max(max,get(i).toInt)
    min = math.min(min,get(i).toInt)
  }
  for(i <- 1 until min){
    if(max % i == 0 && min % i == 0)
    check = i
  }
  println(check)
}