S=input().split(' ') a=int(S[0]) b=int(S[1]) if( b % a!=0): print('NO') else: print(int(b/a))