a,b=map(int,input().split());print(['NO',b//a][b%a==0])