#include int main(void){ int A,B; int d; scanf("%d",&A); scanf("%d",&B); d=B%A; if(d==0)printf("%d\n",B/A); else printf("NO\n"); return 0; }