a,b=map(int,input().split());print((b%a)and"NO"or b//a)