CSES - HIIT Open 2019 - Results
Submission details
Task:Just Solve It
Sender:Omochiikaeri~!
Submission time:2019-05-25 11:20:44 +0300
Language:Haskell
Status:COMPILE ERROR

Compiler report

input/code.hs:7:8: error:
    Precedence parsing error
        cannot mix `==' [infix 4] and `>' [infix 4] in the same infix expression

input/code.hs:7:8: error:
    Precedence parsing error
        cannot mix `>' [infix 4] and `>' [infix 4] in the same infix expression

Code

main = do
    l <- getLine
    let [n, k] = map read $ words l
    putStrLn (solve n k)

solve n k =
    if n % 2 == 0 and k > 1 or k > 2 then
        "YES"
    else
        "NO"