#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main(){
	int q1,b,c1,c2,q2;
	while(cin >> q1 , q1){
		cin >> b >> c1 >> c2 >> q2;
		int one = min(q2,b/c1) , two = 0;
		int cur = b - c1 * one;
		while(one+two<q1 && one > 0){
			if(cur<c2) one-- , cur += c1;
			while(cur - c2 >= 0){
				two++;
				cur -= c2;
			}	
		}
		if(one == 0 || cur < 0 || one+two < q1){
			cout << "NA" << endl;
		}else{
			cout << one << " " << two << endl;
		}
		
	}
}