fun main() { val a = readln().split(" ").map { it.toInt() } val counts = Array(13) { 0 } for(n in a) { counts[n-1]++ } var count3 = 0 var count2 = 0 for(c in counts) { when(c) { 2 -> count2++ 3 -> count3++ } } val msg = when { count3 == 1 && count2 == 1 -> "FULL HOUSE" count3 == 1 -> "THREE CARD" count2 == 2 -> "TWO PAIR" count2 == 1 -> "ONE PAIR" else -> "NO HAND" } println(msg) }