ss = input().split() a = int(ss[0]) b = int(ss[1]) x = b / a if x == int(x): print(int(x)) else: print("NO")