import java.util.*; import java.lang.NumberFormatException; public class Rain { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] array = new String[2]; array[0] = sc.next(); array[1] = sc.next(); try { for (String x : array) { if (x.startsWith("0") && x.length() > 1) { throw new NumberFormatException(); } Integer.parseInt(x); } } catch(NumberFormatException e) { System.out.println("NG"); return; } System.out.println("OK"); } }