#include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<stack>
#include<functional>
#include<list>
#include<unordered_map>
#include<map>
#define int long long
using namespace std;

signed main() {
	int a, b, c, d, e;
	while (cin >> a, a) {
		cin >> b >> c >> d >> e;
		if ((b - c) / d + 1 < a) { puts("NA"); continue; }
		int s = 1, g = e+1;
		while (g - s > 1) {//????´\??°?¶????K??°????????\???????????????
			int k = (s + g) / 2;
			int f = c*k;
			if (f > b) { g = k; continue; }
			f = b-f;
			f = f / d;
			if (k + f >= a) {
				s = k;
			}
			else {
				g = k;
			}
		}
		cout << s<<" "<<(b - (s*c))/d << endl;
	}
}