Class Main
    Public Shared Sub Main()
    Dim K As integer = Console.ReadLine
    dim str() as string = Split(Console.ReadLine())
    dim i1 as integer = cint(str(0))
    dim i2 as integer = cint(str(1))
    if (K = 1) or (fix(i1 / k) <> fix(i2 / K)) then
      Console.WriteLine("OK")
    else
      Console.WriteLine("NG")
    end if
        End Sub
End Class