#include<iostream>
using namespace std;
int a, b, c, d, e;
int main() {
	while (true) {
		cin >> a; if (a == 0)break;
		cin >> b >> c >> d >> e;
		int H = 0, I = 0;
		for (int i = 0; i <= e; i++) {
			int Y = c*i; if (Y > b)break;
			int P = (b - Y) / d;
			if (i + P < a)break;
			H = i, I = P;
		}
		if (H == 0)cout << "NA" << endl;
		else { cout << H << ' ' << I << endl; }
	}
	return 0;
}