// 2011/08/22 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int q1;
		cin >> q1;
		if(q1==0)
			break;

		int b, c1, c2, q2;
		cin >> b >> c1 >> c2 >> q2;

		int A = (b-c2*q1)/(c1-c2);
		if(A<=0){
			cout << "NA" << endl;
			continue;
		}
		if(A>q2)
			A = q2;

		int B = (b-c1*A)/c2;
		if(B<0){
			A = b/c1;
			B = (b-c1*A)/c2;
		}

		cout << A << ' ' << B << endl;
	}

	return 0;
}