#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;

//// < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\b.txt"


int main() {
	while (1) {
		int Q1, B, C1, C2, Q2; cin >> Q1;
		if (!Q1)break;
		cin>> B >> C1 >> C2 >> Q2;
		pair<int, int>ans=make_pair(-1,-1);
		for (int a = Q2; a >= 1; --a) {
			int rest = B - a*C1;
			if (rest < 0)continue;
			int n = rest / C2;
			if (a + n >= Q1) {

				ans = make_pair(a, n);
				break;
			}
		}
		if (ans.first == -1)cout << "NA" << endl;
		else cout << ans.first << " " << ans.second << endl;
	}
	return 0;
}