package net.ipipip0129.kotlin.yukicoder import kotlin.math.pow import kotlin.math.sqrt private fun checkNumPrime(num: Long): Boolean { when { num < 2L -> return false num == 2L -> return true num % 2L == 0L -> return false else -> { val sqrtNum = sqrt(num.toDouble()) for (i in 3..sqrtNum.toLong() step 2) { if (num % i == 0L) return false } } } return true } fun main(args: Array) { val posList = readLine()!!.split(" ").map { it.toLong() } var maxX = 10.0.pow(1333).toLong() var maxY = 10.0.pow(1333).toLong() for (i in posList[0] until 10.0.pow(1333).toLong()) { if (checkNumPrime(i)) { maxY = i break } } for (i in posList[1] until 10.0.pow(1333).toLong()) { if (checkNumPrime(i)) { maxX = i break } } var isFirst = true var npX = posList[1] var npY = posList[0] while (true) { if (npX < maxX && npY < maxY) { if (npX < maxX) { npX += 1 } else if (npY < maxY) { npY += 1 } } else { break } isFirst = !isFirst } if (isFirst) { println("First") } else { println("Second") } }