object Main { def main(arg:Array[String]) = { val Array(a, b) = scala.io.StdIn.readLine().trim.split(" ").map(BigInt(_)); println(a * b % 1000000007); } }