#include<iostream>
using namespace std;

#define min(a,b) (a<b?a:b)

int main() {
	int q1, b, c1, c2, q2;
	int amax, A, B;
	while(1) {
		cin >> q1;
		if(!q1) break;
		cin >> b >> c1 >> c2 >> q2;
		amax = min(b/c1, q2);
		for(A=amax; A>0; --A) {
			B = (b-A*c1)/c2;
			if(A+B>=q1) break;
		}
		if(!A) cout << "NA" << endl;
		else cout << A << " " << B << endl;
	}
	return 0;
}