imports System

Module Module1
  public Sub Main()

    Dim Multi as integer = convert.toint32(Console.ReadLine())
    Dim Betw as String() = Console.ReadLine().split(" ")

    Dim FromNum as integer = convert.toint32(Betw(0).tostring)
    Dim ToNum as integer  = convert.toint32(Betw(1).tostring)

    Dim Result as integer

    for i as integer = 0 to 600

        Result =  i * Multi

	if i * Result < FromNum then 
		
	elseif FromNum < Result and Result < ToNum then

		console.writeLine("OK".tostring)

	     exit for

	elseif Result  > ToNum then
	
		console.writeLine("NG".tostring)

	     exit for
	
	end if

    next

  End Sub
End Module
