a = input() b = input() try: int(a)+int(b) if a[0] != "0" and b[0] != 0: print("OK") else: print("NG") except: print("NG")