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