#include <iostream>
#include <string>

using namespace std;

int q1, b, c1, c2, q2;

bool C(int x)
{
	if (x > q2) return false;

	if (b - (c1 * x) < 0) return false;
	//if (c2 * (q1 - x) < 0) return false;

	if (b - (c1 * x) >= c2 * (q1 - x)) return true;
	else return false;
}

int main()
{
	while (cin >> q1, q1)
	{
		cin >> b >> c1 >> c2 >> q2;

		if (c1 > b)
		{
			cout << "NA" << endl;
			continue;
		}

		int lb = 1, ub = 1000000;
		bool flag = false;

		for (int i = 0; i < 100; i++)
		{
			int mid = (lb + ub) / 2;
			if (C(mid))
			{
				lb = mid;
				flag = true;
			}
			else
			{
				ub = mid;
			}
		}

		if (flag)
		{
			int x = lb;
			int y = (b - (c1 * x)) / c2;
			cout << x << " " << y << endl;
		}
		else
		{
			cout << "NA" << endl;
		}
	}
}