A, B = list(map(int, input().split())) print(B//A) if B%A==0 else print("NO")