unittest
{
	assert( [ "7", "500 600" ].parse.expand.solve == "OK" );
	assert( [ "4", "5 7" ].parse.expand.solve == "NG" );
	assert( [ "1", "11 11" ].parse.expand.solve == "OK" );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto k = input.front.to!( long );
	input.popFront;
	auto ab = input.front.split.to!( long[] );
	return tuple( k, ab[ 0 ], ab[ 1 ] );
}

auto solve( long k, long a, long b )
{
	auto c = ( b / k ) * k;
	return ( a <= c ) ? "OK" : "NG";
}
