#include <iostream>

using namespace std;

int q1, b, c1, c2, q2;

int check (int x )
{
	int y = (b - c1*x)/c2;

	if (x + y < q1 ) return -1;
	if (y < 0 ) return -1;
	if (b - c1*x < 0 ) return -1;
	
	return y;
}

int main()
{

	while (cin >> q1 >> b >> c1 >> c2 >> q2 && q1 ){

		int x, y;
		int l = 0;
		int r = q2;

		while (l <= r ){
			x = (l + r )/2;
			if ((y = check(x ) ) == - 1 ){
				r = x - 1;
			}else{
				l = x + 1;
			} // end if
		} // end while
		x = min (l, r );
		y = check(x );

		if (x <= 0 ){
			cout << "NA" << endl;
		}else{
			cout << x << ' ' << y << endl;
		} // end if
	} // end while

	return 0;
}