try: A=input() B=input() if A!=int(A) or B!=int(B) or A>12345 or B>12345: print('NG') else: print(A+B) except: print('NG')