#include<iostream>
#include<cstring>
#include<algorithm>

using namespace std;

int main() {
	int q, money, special, common, specialLimit, sWeight, cWeightMax, restWeightMax, i;

	while (cin >> q, q) {
		cin >> money >> special >> common >> specialLimit;

		cWeightMax = min(money / special, specialLimit);
		//cout << "最大会津Chicken=" << cWeightMax << endl;
		for (i = cWeightMax; i > 0; --i) {
			restWeightMax = (money - special * i) / common;
			//cout << i << " " << restWeightMax << endl;
			if (restWeightMax < 0 || i + restWeightMax < q) {
				continue;
			}
			break;
		}
		if (i == 0) {
			cout << "NA" << endl;
		}
		else {
			cout << i << " " << restWeightMax << endl;
		}
		
	}

	return 0;
}
