import kotlin.math.*
class Solution {
fun solution(brown: Int, yellow: Int): IntArray {
(1..sqrt(yellow.toDouble()).toInt()).forEach{
if(yellow % it == 0){
val x = it + 2
val y = yellow / it + 2
if(x*y == brown + yellow){
return intArrayOf(y, x)
}
}
}
return intArrayOf()
}
}