def n(a): return sum([x not in '0123456789' for x in a])<1 z=lambda x:x[0]!='0' a=input() b=input() print('ONKG'[n(a+b)&z(a)&z(b)::2])