// 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 = 1;
		int B = (b-c1*A)/c2;
		if(b-c1*A<0||A+B<q1){
			cout << "NA" << endl;
			continue;
		}

		do{
			A++;
			B = (b-c1*A)/c2;
		}while(b-c1*A>=0&&A+B>=q1&&A<=q2);
		A--;
		B = (b-c1*A)/c2;

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

	return 0;
}