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