#include<iostream>

using namespace std;

int main(){
	int q_lower,bud,c_aizu,c_normal,q_aizuupper;
	while(cin>>q_lower>>bud>>c_aizu>>c_normal>>q_aizuupper){
		if(q_aizuupper==0){
			cout<<"NA"<<endl;
			continue;
		}

		int q_aizu=0,q_normal=0;
		q_aizu+=q_aizuupper;
		bud-=q_aizu*c_aizu;
		if(bud<0){
			while(bud<0){
				q_aizu--;
				bud+=c_aizu;
			}
			if(q_aizu<=0){
				cout<<"NA"<<endl;
				continue;
			}
		}
		q_normal+=bud/c_normal;
		bud-=q_normal*c_normal;

		while(q_aizu+q_normal<q_lower && q_aizu>0){
			q_aizu--;
			bud+=c_aizu;
			q_normal+=bud/c_normal;
			bud-=(bud/c_normal)*c_normal;
		}
		if(q_aizu<=0){
			cout<<"NA"<<endl;
			continue;
		}
		if(q_aizu+q_normal>=q_lower)	cout<<q_aizu<<' '<<q_normal<<endl;
		else	cout<<"NA"<<endl;
	}

	return 0;
}