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