a, b = map(int, input().split()) q, r = divmod(b, a) if r: ans = "NO" else: ans = q print(ans)