main :: IO ()
main = do
  k <- read <$> getLine :: IO Int
  (a:b:_) <- map read . words <$> getLine :: IO [Int]
  putStrLn $ if (b-a+1) >= k
             then "OK"
             else if all (/=0) (map (`mod` k) [a..b])
                  then "NG"
                  else "OK"
