A, B = map(int, input().split()) Q, R = divmod(B, A) print(Q if R == 0 else "NO")