#include <iostream>

using namespace std;

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

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

		int add = 0;		// ª
		bool no_ans = false;
		int resx = 0, resy = 0;
		while (1){
			int l = 0;
			int r = q2;
			int x = 0, y = 0;	// ïÃn{ÌÊAÊÌ{÷ÌÊ
			while (l <= r ){
				x = (l+r)/2;
				y = q1 + add - x;
				if (y < 0 ){
					r = x - 1;
					continue;
				} // end if
				if (c1*x + c2*y <= b ){
					l = x + 1;
				}else{
					r = x - 1;
				} // end if
			} // end while
			x = min (l, r );
			y = q1 + add - x;
			
			if (add == 0 ){
				if (x <= 0 ){
					no_ans = true;
					break;
				}else{
					resx = x, resy = y;
				} // end if	
			}else{
				if (x >= resx && y >= resy ){
					resx = x, resy = y;
				}else if (x == resx && y > resx ){
					resx = x, resy = y;
				}else if (x > resx && y >= 0 ){
					resx = x, resy = y;
				}else{
					break;
				} // end if
			} // end if
			add++;
		} // end while		
		if (no_ans ){
			cout << "NA" << endl;
		}else{
			cout << resx << ' ' << resy << endl;
		} // end if
	} // end while
		
	return 0;
}