#include <iostream>

using namespace std;

int main() {
	int q1, b, c1, c2, q2;
	while (cin >> q1) {
		if (q1 == 0) {
			break;
		} 
		cin >> b >> c1 >> c2 >> q2;
		if (b < c1) {
			cout << "NA" << endl;
		} else {
			int counter = 0;
			while (q2 > 0 && b >= c1) {
				b -= c1;
				q1--;
				q2--;
				counter++;
			}
			int counter2 = 0;
			while (b >= c2) {
				b -= c2;
				q1--;
				counter2++;
			}
			if (q1 > 0) {
				while (q1 > 0) {
					counter--;
					b += c1;
					q1++;
					if (counter == 0) {
						break;
					}
					while (b >= c2) {
						b -= c2;
						q1--;
						counter2++;
					}
				}
				if (counter > 0) {
					cout << counter << " " << counter2 << endl;
				} else {
					cout << "NA" << endl;
				}
			} else {
				cout << counter << " " << counter2 << endl;
			}
		}
	}
	return 0;
}