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