#include<stdio.h>

int main()
{
        int K,A,B,distance;
        
        scanf("%d",&K);
        scanf("%d %d",&A,&B);
        
        if(distance%K==0){ printf("OK\n");}
        else{ printf("NG\n");}    
        
            return 0;
}