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