import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String A = scan.next(); String B = scan.next(); scan.close(); if(isNumber(A) && isNumber(B)) { int a = Integer.parseInt(A); int b = Integer.parseInt(B); System.out.println("OK"); }else { System.out.println("NG"); } } public static boolean isNumber(String num) { try { if(num.length() > 1 && num.substring(0, 1).equals("0")) { return false; } Integer.parseInt(num); return true; } catch (NumberFormatException e) { return false; } } }