A=input() B=input() if A.isdigit() and B.isdigit(): a=int(B) if a<=12345: print("OK") else: print("NG")