#include<iostream>
using namespace std;

int a,b,c,d,e,f;

int main(){
	while(cin>>a){
		if(a==0){break;}
		cin>>b>>c>>d>>e;
		if(a<=e){
			f=b/c;
			if(f>=a){cout<<f<<' '<<"0"<<endl;goto E;}
			else{goto F;}
		}
		if(c*e+d*(a-e)<=b){
			while(true){
				if(c*e+d*(a-e)>b){
					cout<<e<<' '<<a-e-1<<endl;
					goto E;
				}
				a++;
			}
		}
		else{
			while(true){
				if(a-e<0){break;}
				if(c*e+d*(a-e)<=b){
					cout<<e<<' '<<a-e<<endl;
					goto E;
				}
				e--;
			}
		}
		F:;
		cout<<"NA"<<endl;
		E:;
	}
}