import java.util.*;

public class Main {
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      int str1 = Integer.parseInt((String)scan.nextLine());
      String tmp = scan.nextLine();
      
     String[] hani = tmp.split(" ",0);
      
      String result = "NG";
      for(int i=Integer.parseInt(hani[0]);i<=Integer.parseInt(hani[1]);i++){
        if(i%str1==0){
           result="OK";
          break;
        }
      }
      
      System.out.println(result);
      scan.close();
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      int str1 = Integer.parseInt((String)scan.nextLine());
      String tmp = scan.nextLine();
      
     String[] hani = tmp.split(" ",0);
      
      String result = "NG";
      for(int i=Integer.parseInt(hani[0]);i<=Integer.parseInt(hani[1]);i++){
        if(i%str1==0){
           result="OK";
          break;
        }
      }
      
      System.out.println(result);
      scan.close();
    }
} Main public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      int str1 = Integer.parseInt((String)scan.nextLine());
      String tmp = scan.nextLine();
      
     String[] hani = tmp.split(" ",0);
      
      String result = "NG";
      for(int i=Integer.parseInt(hani[0]);i<=Integer.parseInt(hani[1]);i++){
        if(i%str1==0){
           result="OK";
          break;
        }
      }
      
      System.out.println(result);
      scan.close();
    } main {
      Scanner scan = new Scanner(System.in);
      int str1 = Integer.parseInt((String)scan.nextLine());
      String tmp = scan.nextLine();
      
     String[] hani = tmp.split(" ",0);
      
      String result = "NG";
      for(int i=Integer.parseInt(hani[0]);i<=Integer.parseInt(hani[1]);i++){
        if(i%str1==0){
           result="OK";
          break;
        }
      }
      
      System.out.println(result);
      scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int str1 = Integer.parseInt((String)scan.nextLine()); str1 Integer.parseInt((String)scan.nextLine()) Integer.parseInt Integer (String)scan.nextLine() scan.nextLine scan String tmp = scan.nextLine(); tmp scan.nextLine() scan.nextLine scan String[] hani = tmp.split(" ",0); hani tmp.split(" ",0) tmp.split tmp " " 0 String result = "NG"; result "NG" for(int i=Integer.parseInt(hani[0]);i<=Integer.parseInt(hani[1]);i++){
        if(i%str1==0){
           result="OK";
          break;
        }
      } int i=Integer.parseInt(hani[0]); int i=Integer.parseInt(hani[0]); i Integer.parseInt(hani[0]) Integer.parseInt Integer hani[0] hani 0 i<=Integer.parseInt(hani[1]) i Integer.parseInt(hani[1]) Integer.parseInt Integer hani[1] hani 1 i++ i++ i {
        if(i%str1==0){
           result="OK";
          break;
        }
      } {
        if(i%str1==0){
           result="OK";
          break;
        }
      } if(i%str1==0){
           result="OK";
          break;
        } i%str1==0 i%str1 i str1 0 {
           result="OK";
          break;
        } result="OK" result "OK" break; System.out.println(result) System.out.println System.out System System.out result scan.close() scan.close scan String[] args args public class Main {
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      int str1 = Integer.parseInt((String)scan.nextLine());
      String tmp = scan.nextLine();
      
     String[] hani = tmp.split(" ",0);
      
      String result = "NG";
      for(int i=Integer.parseInt(hani[0]);i<=Integer.parseInt(hani[1]);i++){
        if(i%str1==0){
           result="OK";
          break;
        }
      }
      
      System.out.println(result);
      scan.close();
    }
} public class Main {
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      int str1 = Integer.parseInt((String)scan.nextLine());
      String tmp = scan.nextLine();
      
     String[] hani = tmp.split(" ",0);
      
      String result = "NG";
      for(int i=Integer.parseInt(hani[0]);i<=Integer.parseInt(hani[1]);i++){
        if(i%str1==0){
           result="OK";
          break;
        }
      }
      
      System.out.println(result);
      scan.close();
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      int str1 = Integer.parseInt((String)scan.nextLine());
      String tmp = scan.nextLine();
      
     String[] hani = tmp.split(" ",0);
      
      String result = "NG";
      for(int i=Integer.parseInt(hani[0]);i<=Integer.parseInt(hani[1]);i++){
        if(i%str1==0){
           result="OK";
          break;
        }
      }
      
      System.out.println(result);
      scan.close();
    }
}