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) if b_i