import java.io.*;
class Main
{
public static void main(String[] args)throws IOException {
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    int K=Integer.parseInt(br.readLine());
    String S=br.readLine();
    String tokens[]=S.split(" ");
    int A=Integer.parseInt(tokens[0]);
    int B=Integer.parseInt(tokens[1]);
    int result=multiple(A,B,K);
    if (result==1)
        System.out.print("OK");
    else
        System.out.print("NG");
}

static int multiple(int a, int b,int x){

    int f=0;
    for (int i=a;i<=b;i++)
    {
        if(i%x==0)
            {f=1;
            break;
            }

    }
    return f;
}

} import java.io.*; io.* java class Main
{
public static void main(String[] args)throws IOException {
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    int K=Integer.parseInt(br.readLine());
    String S=br.readLine();
    String tokens[]=S.split(" ");
    int A=Integer.parseInt(tokens[0]);
    int B=Integer.parseInt(tokens[1]);
    int result=multiple(A,B,K);
    if (result==1)
        System.out.print("OK");
    else
        System.out.print("NG");
}

static int multiple(int a, int b,int x){

    int f=0;
    for (int i=a;i<=b;i++)
    {
        if(i%x==0)
            {f=1;
            break;
            }

    }
    return f;
}

} Main public static void main(String[] args)throws IOException {
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    int K=Integer.parseInt(br.readLine());
    String S=br.readLine();
    String tokens[]=S.split(" ");
    int A=Integer.parseInt(tokens[0]);
    int B=Integer.parseInt(tokens[1]);
    int result=multiple(A,B,K);
    if (result==1)
        System.out.print("OK");
    else
        System.out.print("NG");
} main {
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    int K=Integer.parseInt(br.readLine());
    String S=br.readLine();
    String tokens[]=S.split(" ");
    int A=Integer.parseInt(tokens[0]);
    int B=Integer.parseInt(tokens[1]);
    int result=multiple(A,B,K);
    if (result==1)
        System.out.print("OK");
    else
        System.out.print("NG");
} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int K=Integer.parseInt(br.readLine()); K Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String S=br.readLine(); S br.readLine() br.readLine br String tokens[]=S.split(" "); tokens S.split(" ") S.split S " " int A=Integer.parseInt(tokens[0]); A Integer.parseInt(tokens[0]) Integer.parseInt Integer tokens[0] tokens 0 int B=Integer.parseInt(tokens[1]); B Integer.parseInt(tokens[1]) Integer.parseInt Integer tokens[1] tokens 1 int result=multiple(A,B,K); result multiple(A,B,K) multiple A B K if (result==1)
        System.out.print("OK");
    else
        System.out.print("NG"); result==1 result 1 System.out.print("OK") System.out.print System.out System System.out "OK" System.out.print("NG") System.out.print System.out System System.out "NG" String[] args args static int multiple(int a, int b,int x){

    int f=0;
    for (int i=a;i<=b;i++)
    {
        if(i%x==0)
            {f=1;
            break;
            }

    }
    return f;
} multiple {

    int f=0;
    for (int i=a;i<=b;i++)
    {
        if(i%x==0)
            {f=1;
            break;
            }

    }
    return f;
} int f=0; f 0 for (int i=a;i<=b;i++)
    {
        if(i%x==0)
            {f=1;
            break;
            }

    } int i=a; int i=a; i a i<=b i b i++ i++ i {
        if(i%x==0)
            {f=1;
            break;
            }

    } {
        if(i%x==0)
            {f=1;
            break;
            }

    } if(i%x==0)
            {f=1;
            break;
            } i%x==0 i%x i x 0 {f=1;
            break;
            } f=1 f 1 break; return f; f int a a int b b int x x
import java.io.*;
class Main
{
public static void main(String[] args)throws IOException {
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    int K=Integer.parseInt(br.readLine());
    String S=br.readLine();
    String tokens[]=S.split(" ");
    int A=Integer.parseInt(tokens[0]);
    int B=Integer.parseInt(tokens[1]);
    int result=multiple(A,B,K);
    if (result==1)
        System.out.print("OK");
    else
        System.out.print("NG");
}

static int multiple(int a, int b,int x){

    int f=0;
    for (int i=a;i<=b;i++)
    {
        if(i%x==0)
            {f=1;
            break;
            }

    }
    return f;
}

}