A,B = map(int,input().split()) C = B/A if int(C) == C: print(int(C)) else: print("NO")