import java.util.*;
import java.io.*;

class Main{
    public static void main(String args[])throws IOException{
        try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int K = Integer.parseInt(br.readLine());
            String[] tmp = br.readLine().split(" ");
            int A = Integer.parseInt(tmp[0]);
            int B = Integer.parseInt(tmp[1]);

            int max = Math.max(A, B);
            int min = Math.min(A, B);
            int result = 0;

            for(int i = min; i <= max; i++){
              if((i%K) == 0){
                result = 1;
              }else{
                continue;
              }
            }

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

            int max = Math.max(A, B);
            int min = Math.min(A, B);
            int result = 0;

            for(int i = min; i <= max; i++){
              if((i%K) == 0){
                result = 1;
              }else{
                continue;
              }
            }

            if(result == 1){
              System.out.println("OK");
            }else{
              System.out.println("NG");
            }
        }
    }
} Main public static void main(String args[])throws IOException{
        try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int K = Integer.parseInt(br.readLine());
            String[] tmp = br.readLine().split(" ");
            int A = Integer.parseInt(tmp[0]);
            int B = Integer.parseInt(tmp[1]);

            int max = Math.max(A, B);
            int min = Math.min(A, B);
            int result = 0;

            for(int i = min; i <= max; i++){
              if((i%K) == 0){
                result = 1;
              }else{
                continue;
              }
            }

            if(result == 1){
              System.out.println("OK");
            }else{
              System.out.println("NG");
            }
        }
    } main {
        try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int K = Integer.parseInt(br.readLine());
            String[] tmp = br.readLine().split(" ");
            int A = Integer.parseInt(tmp[0]);
            int B = Integer.parseInt(tmp[1]);

            int max = Math.max(A, B);
            int min = Math.min(A, B);
            int result = 0;

            for(int i = min; i <= max; i++){
              if((i%K) == 0){
                result = 1;
              }else{
                continue;
              }
            }

            if(result == 1){
              System.out.println("OK");
            }else{
              System.out.println("NG");
            }
        }
    } try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int K = Integer.parseInt(br.readLine());
            String[] tmp = br.readLine().split(" ");
            int A = Integer.parseInt(tmp[0]);
            int B = Integer.parseInt(tmp[1]);

            int max = Math.max(A, B);
            int min = Math.min(A, B);
            int result = 0;

            for(int i = min; i <= max; i++){
              if((i%K) == 0){
                result = 1;
              }else{
                continue;
              }
            }

            if(result == 1){
              System.out.println("OK");
            }else{
              System.out.println("NG");
            }
        } {
            int K = Integer.parseInt(br.readLine());
            String[] tmp = br.readLine().split(" ");
            int A = Integer.parseInt(tmp[0]);
            int B = Integer.parseInt(tmp[1]);

            int max = Math.max(A, B);
            int min = Math.min(A, B);
            int result = 0;

            for(int i = min; i <= max; i++){
              if((i%K) == 0){
                result = 1;
              }else{
                continue;
              }
            }

            if(result == 1){
              System.out.println("OK");
            }else{
              System.out.println("NG");
            }
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) 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[] tmp = br.readLine().split(" "); tmp br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int A = Integer.parseInt(tmp[0]); A Integer.parseInt(tmp[0]) Integer.parseInt Integer tmp[0] tmp 0 int B = Integer.parseInt(tmp[1]); B Integer.parseInt(tmp[1]) Integer.parseInt Integer tmp[1] tmp 1 int max = Math.max(A, B); max Math.max(A, B) Math.max Math A B int min = Math.min(A, B); min Math.min(A, B) Math.min Math A B int result = 0; result 0 for(int i = min; i <= max; i++){
              if((i%K) == 0){
                result = 1;
              }else{
                continue;
              }
            } int i = min; int i = min; i min i <= max i max i++ i++ i {
              if((i%K) == 0){
                result = 1;
              }else{
                continue;
              }
            } {
              if((i%K) == 0){
                result = 1;
              }else{
                continue;
              }
            } if((i%K) == 0){
                result = 1;
              }else{
                continue;
              } (i%K) == 0 (i%K) i K 0 {
                result = 1;
              } result = 1 result 1 {
                continue;
              } continue; if(result == 1){
              System.out.println("OK");
            }else{
              System.out.println("NG");
            } result == 1 result 1 {
              System.out.println("OK");
            } System.out.println("OK") System.out.println System.out System System.out "OK" {
              System.out.println("NG");
            } System.out.println("NG") System.out.println System.out System System.out "NG" String args[] args
import java.util.*;
import java.io.*;

class Main{
    public static void main(String args[])throws IOException{
        try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
            int K = Integer.parseInt(br.readLine());
            String[] tmp = br.readLine().split(" ");
            int A = Integer.parseInt(tmp[0]);
            int B = Integer.parseInt(tmp[1]);

            int max = Math.max(A, B);
            int min = Math.min(A, B);
            int result = 0;

            for(int i = min; i <= max; i++){
              if((i%K) == 0){
                result = 1;
              }else{
                continue;
              }
            }

            if(result == 1){
              System.out.println("OK");
            }else{
              System.out.println("NG");
            }
        }
    }
}