#include<stdio.h>                                                 
                                                                  
int main(void){                                                   
                                                                  
   int k,a,b,ans,i;                                               
   int c = 0;                                                     
   scanf("%d",&k);                                                
                                                                  
   scanf("%d %d",&a,&b);                                          
   i = b;                                                         
                                                                  
   while(c != 1){                                                 
      if(i % k == 0){                                             
         ans = i;                                                 
         c++;                                                     
      }else{                                                      
         i--;                                                     
      }                                                           
   }                                                              
                                                                  
   if( ans <= a){                                                 
      printf("NG");                                               
   }else{                                                         
      printf("ok");                                               
   }                                                              
   return 0;                                                      
}                                                                 
           