#include<iostream>
using namespace std;
int main(){
	while(true){
		int aizu_ckn = 0, ckn = 0;
		int q1,q2,b,c1,c2;
		cin>>q1;
		if(q1==0)
			break;
		cin>>b>>c1>>c2>>q2;

		aizu_ckn=b/c1;
		if(aizu_ckn>q2)
			aizu_ckn=q2;
		b-=aizu_ckn*c1;
		if(aizu_ckn+ckn<q1){
			ckn=q1-aizu_ckn;
			b-=ckn*c2;
			if( b<0 ){
				if(c1<=c2){
					cout<<"NA\n";
					continue;
				}
				int change=-b/(c1-c2)+1;
				aizu_ckn-=change;
				ckn+=change;
				b+=change*(c1-c2);
			}else{
				ckn+=b/c2;
			}
		}

		if( b<0||aizu_ckn<1 )
			cout<<"NA\n";
		else
			cout<<aizu_ckn<<' '<<ckn<<endl;
	}
	return 0;
}