import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines a,b = map(int,read().split()) q,r = divmod(b,a) answer = 'NO' if r else q print(answer)