#include <stdio.h>

void PrintOutput(int inputK, int inputA, int inputB, int multiplyA, int multiplyB)
{
	if (inputK * multiplyA == inputA)
	{
		printf_s("OK \n");
	}
	else if (inputK * (multiplyA + 1) <= inputB)
	{
		printf_s("OK \n");
	}
	else
	{
		printf_s("NG \n");
	}
}

void StartProgram()
{
	int inputK, inputA, inputB, multiplyA, multiplyB;

	printf_s("Enter the value of K \n");
	scanf("%d", &inputK);
	printf_s("Enter the value of A and B \n");
	scanf("%d %d", &inputA, &inputB);

	if (inputK > 1000 || inputK < 1)
	{
		printf_s("Wrong input... \n");
		StartProgram();
	}
	else if (inputB > 1000 || inputB < 1 || inputA < 1)
	{
		printf_s("Wrong input... \n");
		StartProgram();
	}
	else if (inputA > inputB)
	{
		printf_s("Wrong input... \n");
		StartProgram();
	}

	multiplyA = inputA / inputK;
	multiplyB = inputB / inputK;

	PrintOutput(inputK, inputA, inputB, multiplyA, multiplyB);
}

int main(int argc, const char* argv[]) {

	StartProgram();

	return 0;
}