#define _USE_MATH_DEFINES
#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<stack>
#include<cmath>
#include<climits>
using namespace std;

int main(){
	int Q1, B, C1, C2, Q2;
	while(cin >> Q1 >> B >> C1 >> C2 >> Q2, Q1){
	
		int ans1 = -1, ans2;
		for(int i = 1; i <= Q2; i++){
			int common = (B - i*C1)/C2;
			if(B - i*C1 < 0) break;
			if(i + common >= Q1) ans1 = i, ans2 = common;
			//printf("%d, %d\n", i, common);
		}
		if(ans1 == -1) puts("NA");
		else printf("%d %d\n", ans1, ans2);
	}
	return 0;
}