object Main extends App {
    def gcd(n: Int, m: Int): Int = {
        if (n % m == 0) m
        else gcd(m, n % m)
    }
    val Array(w, h, c) = io.StdIn.readLine.split(" ").map(_.toInt)
    println(w * h / gcd(w, h) / gcd(w, h))
}