i=input a=i() b=i() if a.isdigit() and 0 <= int(a) <= 12345 and b.isdigit() and 0 <= int(b) <= 12345: print(int(a)+int(b)) else: print('NG')