fun main() { val builder = StringBuilder() val (n, z) = readInputLine().split(" ").map { it.toInt() } for (x in 1..100) { var xTmp = 1 repeat(n) { xTmp *= x if (xTmp >= z) { println("No") return } } for (y in 1..100) { var yTmp = 1 repeat(n) { yTmp *= y if (xTmp + yTmp > z) { return@repeat } } if (xTmp + yTmp == z) { println("Yes") return } } } print(builder.toString()) } fun readInputLine(): String { return readLine()!! }