#include <iostream>
using namespace std;
int main(){
	int q1, b, c1, c2, q2;
	while(cin >> q1, q1) {
		cin >> b >> c1 >> c2 >> q2;
		int k1, k2;
		bool f = 1;
		k1 = b/c1;
		if(k1>q2) k1 = q2;
		for(int i = k1; i>0; --i) {
			k2 = (b-c1*i)/c2;
			if(i+k2>=q1) {
				cout << i << " " << k2 << endl;
				f = 0;
				break;
			}
		}
		if(f) cout << "NA" << endl;
	}
}