Imports System

Module Program
    Sub Main(args As String())

        Dim iDistance As Integer = Console.ReadLine
        Dim iDistanceFromTo As String() = (Console.ReadLine).Split(" ")
        Dim iFromDistance As Integer = iDistanceFromTo(0)
        Dim iToDistance As Integer = iDistanceFromTo(1)

        Dim sResult As String
        For i = 0 To (iToDistance - iFromDistance)
            If (iFromDistance + i) Mod iDistance = 0 Then
                sResult = "OK"
                Exit For
            End If
            sResult = "NG"
        Next
        Console.WriteLine(sResult)

    End Sub
End Module
