A, B = map(int, input().split()) print(['NO', B//A][B//A == B/A])