#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

#define reps(i,f,n) for(int i=f; i<int(n); ++i)
#define rep(i,n) reps(i,0,n)

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;

int main()
{
	ll q1, b, c1, c2, q2;
	while(scanf("%lld", &q1), q1){
		scanf("%lld%lld%lld%lld", &b, &c1, &c2, &q2);
		b -= c1;
		q1--; q2--;
		
		int ans[2] = {0};
		rep(i, q1+1){
			ll cost = i*c1 + (q1-i)*c2;
			if(cost <= b){
				ans[0] = i + (b-cost)/c1;
				ans[1] = q1-i + ((b-cost)%c1)/c2;
			}
		}
		
		if(ans[0] > q2){
			ans[0] = q2;
			ans[1] = (b-q2*c1)/c2;
		}
		
		if(ans[0]+ans[1] >= q1)
			printf("%d %d\n", ans[0]+1, ans[1]);
		else
			puts("NA");
	}
	return 0;
}