#include <iostream>
#include <string>

using namespace std;

int main(int argc, const char* argv[])
{
	int a, b;
	string s;

	cin >> a >> b >> s;

	int tmp;
	tmp = b % a;

	if (tmp == 0) {
		int c = b / a;
		cout << c << endl;
		return 0;
	}
	cout << "NO" << endl;
	return 0;
}