a=input() b=input() if 2<=len(a) and a[0]=="0": print("NG") elif 2<=len(b) and b[0]=="0": print("NG") elif a.isdigit() and b.isdigit(): a_i=int(a) b_i=int(b) print(a_i+b_i) else: print("NG")