import java.util.Scanner object Problem212 { def proc(p: Double, c: Double): Double = { val prime = Seq(2, 3, 5, 7, 11, 13) val composite = Seq(4, 6, 8, 9, 10, 12) val primeAvg = prime.sum.toDouble / prime.size val comAvg = composite.sum.toDouble / composite.size Math.pow(primeAvg, p) * Math.pow(comAvg, c) } def main(args: Array[String]) { val sc = new Scanner(System.in) val (p, c) = (sc.nextInt, sc.nextInt) val result = proc(p, c) println(result) } }