#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;
		for (x = q2; x > 0; x-- ){
			if ( (y = check (x ) ) != -1 ){
				cout << x << ' ' << y << endl;
				break;
			} // end if
		} // end for

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

	} // end while

	return 0;
}