#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <functional>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
 
using namespace std;
 
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define rep(i,n) REP(i, 0, n)
#define pb push_back
#define mp make_pair
#define all(r) (r).begin(),(r).end()
#define rall(r) (r).rbegin(),(r).rend()
#define fi first
#define se second
 
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
 

 
const int INF = 1000000;
const double EPS = 1e-8;
const int mod = 1e9 + 7;

int dx[] ={-1,0,1,0};
int dy[] ={0,-1,0,1};

int q1, b, c1, c2, q2;

bool check(int m){
	if(m > q2) return false;
	if(m * c1 > b) return false;
	int n = b - m * c1;
	if(m + n / c2 < q1) return false;
	return true;
}

int main(){
	int l, r, m;
	int a1, a2;
	while(cin>>q1 && q1){
		cin>>b>>c1>>c2>>q2;
		l = 0; r = q2;
		rep(i, 30){
			m = (l + r) / 2;
			if(check(m+1)){
				l = m+1;
			}
			else if(check(m)){
				l = m;
			}
			else {
				r = m;
			}
		}
		if(l == 0){
			cout<<"NA"<<endl;
			continue;
		}
		cout<<l<<" "<<(b-m*c1)/c2<<endl;
	}
}