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