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