#include <iostream>
using namespace std;

int main() {
	int q1, b, c1, c2, q2;
	while(cin >> q1, q1) {
		cin >> b >> c1 >> c2 >> q2;
		int jidori, normal;
		jidori = normal = -1;
		for(int i = 1; i <= q2; i++) {
			if(b >= c1 * i && i + (b - c1 * i) / c2 >= q1) {
				jidori = i;
				normal = (b - c1 * i) / c2;
			}
		}
		if(jidori >= 0 && normal >= 0)
			cout << jidori << " " << normal << endl;
		else
			cout << "NA" << endl;
	}
}