#include <iostream>
#include <vector>
#include <array>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <tuple>
#include <bitset>
#include <memory>
#include <cmath>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <numeric>
#include <climits>
#include <cfloat>
#include <cassert>
#include <random>

int main() {
	while (true) {
		long long int q1, b, c1, c2, q2; std::cin >> q1; if (q1 == 0) break; std::cin >> b >> c1 >> c2 >> q2;
		int max_aizu = 0;
		int normal_with_max_aizu = 0;
		for (auto aizu = 0; aizu <= q2 && aizu * c1 <= b; ++aizu) {
			if ((b - (aizu * c1)) / c2 + aizu >= q1) {
				max_aizu = aizu;
				normal_with_max_aizu = (b - (aizu * c1)) / c2;
			}
		}
		if (max_aizu == 0) {
			std::cout << "NA\n";
		}
		else {
			std::cout << max_aizu << ' ' << normal_with_max_aizu << '\n';
		}
	}
}

