#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
		{
			if(c1 != c2)
			{
				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;
				}
			}
			else
			{
				long long int aizu_chicken = b / c1;
				long long int chicken;
				if(aizu_chicken > q2)
				{
					aizu_chicken = q2;
					chicken = (b - c1 * q2) / c2;
				}
				else
				{
					chicken = (b - c1 * aizu_chicken) / c2;
				}
				if(aizu_chicken + chicken < q1)
				{
					cout << "NA" << endl;
				}
				else
				{
					cout << aizu_chicken << " " << chicken << endl;
				}
			}
		}
	}
}

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