#include <iostream>
#include <algorithm>
using namespace std;
int q1, b, c1, c2, q2;
int main() {
	while (cin >> q1, q1) {
		cin >> b >> c1 >> c2 >> q2;
		int ret1 = -1, ret2 = -1;
		for (int x = 1; x <= q2; x++) {
			for (int y = max(q1 - x, 0); c1 * x + c2 * y <= b; y++) {
				ret1 = x;
				ret2 = y;
			}
		}
		if(ret1 != -1) cout << ret1 << ' ' << ret2 << endl;
		else cout << "NA" << endl;
	}
	return 0;
}