A,B = (int(i) for i in (input().split())) """ x = B/A """ if B % A == 0: print(B//A) else: print('NO')