#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <bitset>
using namespace std;

typedef vector<int> vi;
typedef pair<int, int> pii;

#define rep(i,n) for(int i=0; i<n; i++)
#define repa(i,s,e) for(int i=s; i<=e; i++)
#define repd(i,s,e) for(int i=s; i>=e; i--)

int q1, b, c1, c2, q2, a1, a2;
bool ok;

int main() {
	while( 1 ) {
		cin >> q1;
		if(q1 == 0) break;
		cin >> b >> c1 >> c2 >> q2;

		a1 = a2 = 0;
		ok = false;
		repd(i,q2,0) {
			a1 = i;
			if(a1 * c1 > b) continue;
			a2 = (b - c1 * a1) / c2;
			if(a1 + a2 >= q1 && a1 >= 1) {
				ok = true;
				break;
			}
		}
		if(ok) printf("%d %d\n", a1, a2);
		else printf("NA\n");
	}
}