import scala.io.{StdIn => in}

object Main extends App {
  val Array(a, b, k) = in.readLine.split(" ").map(_.toInt)
  val ans = (1 to 100).filter(i => (a%i == 0 && b%i == 0)).reverse(k-1)
  println(ans)
}