#include <stdio.h>

int main(void)
{
	int k, a, b;
  	int i = 1;
	scanf("%d%d%d",&k, &a, &b);
  	while(1){
      if(k >= a && k <= b){
        printf("OK\n");
        break;
      }else if(k > b){
        printf("NG\n");
        break;
      }
      k *= i;
      i++;
    }
  
}