i = input().split(" ") if int(int(i[1]) % int(i[0])) == 0: print(int(int(i[1]) / int(i[0]))) else: print("NO")