#include <iostream>

using namespace std;

void solve()
{
	long long int q1, b, c1, c2, q2;
	while(cin >> q1, q1)
	{
		cin >> b >> c1 >>  c2 >>  q2;
		if(b / c1 > q1 && b / c1 <= q2)
		{
			cout << b / c1 << " " << 0 << endl;
		}
		else
		{
			long long int chicken = (q1 * c1 - b) / (c1 - c2) + 1;
			long long int aizu_chicken = q1 - chicken;
			bool flag = true;
			if(aizu_chicken <= 0)
			{
				cout << "NA" << endl;
				flag = false;
			}
			if(flag)
			{
				if(aizu_chicken > q2)
				{
					aizu_chicken = q2;
					chicken = (b - c1 * q2) / c2;
				}
				cout << aizu_chicken << " " << chicken << endl;
			}
		}
	}
}

int main()
{
	solve();
	return(0);
}