#include using namespace std; int main() { int A, B; cin >> A >> B; const int d = B/A; if(A*d==B){ cout << d << endl; } else { cout << "NO" << endl; } return 0; }