a,b =input.split(" ") hanbetu=1 if a.isdigit()==TRUE: hanbetu=1 else: hanbetu=0 if b.isdigit()==TRUE: hanbetu=1 else: hanbetu=0 if hanbetu ==1: if int(a) <=12345 and int(a) >=0: hanbetu=0 if int(b) >=12345 and int(b) >=0: hanbetu=0 else: hanbetu=1 if hanbetu==1: print("OK") else: print("NG")