#include <iostream>
#include<iomanip>
#include<algorithm>
#define shosu(x) fixed<<setprecision(x)
using namespace std;

int lm,bud,an,cn,um;
pair<int,int> dp[1000005];

int main(){
	while(1){
		bool used=false;
		cin>>lm;
		if(lm==0) break;
		cin>>bud>>an>>cn>>um;
		for(int i=um;i>0;i--){
			int tmp=(bud-i*an)/cn;
			if(i+tmp>=lm){
				cout<<i<<' '<<tmp<<endl;
				used=true;
				break;
			}
		}
		if(!used) cout<<"NA"<<endl;
	}
}