#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007
#define EPS 1e-10
#define MAX_N 20000
#define MAX_M 16

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;
typedef pair<P, char> PC;

int q1, b, c1, c2, q2;
P ans;

int main(){
	while (cin >> q1&&q1){
		cin >> b >> c1 >> c2 >> q2;
		ans = P(-1, -1);
		if (c2 < c1){
			FOR(i, 1, q2 + 1){
				if (q1 - i >= 0){
					if (i*c1 + (q1 - i)*c2 <= b){
						int co = (b - i*c1) / c2;
						if (ans.first < i&&co >= 0){
							ans = P(i, co);
						}
					}
				}
				else{
					if (i*c1 <= b){
						ans = P(i, 0);
					}
				}
			}
			if (ans.first >= 0 && ans.second >= 0)cout << ans.first << " " << ans.second << endl;
			else cout << "NA" << endl;
		}
		else{
			ans = P(0, 0);
			REP(i, q2){
				if (b - c2 >= 0){
					b -= c2;
					ans.first++;
				}
			}
			while (b - c1 >= 0){
				b -= c1;
				ans.second++;
			}
			if (ans.first + ans.second < q1)cout << "NA" << endl;
			else cout << ans.first << " " << ans.second << endl;
		}
	}
}