import sequtils proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" .} proc scan(): int = while true: let k = getchar_unlocked() if k < '0': break result = 10 * result + k.ord - '0'.ord let R = scan() let r = scan() if r > R: quit "K",0 if 3 * r > R : quit "S",0 echo "K"