#include <iostream>
using namespace std;

int main(){
	int b,c1,c2,q1,q2,aizu,ord;
	while(cin>>q1,q1){
		bool flag=false;
		cin>>b>>c1>>c2>>q2;
		if(b/c1>q2){
			aizu=q2;
			ord=(b-c1*q2)/c2;
		}else{
			aizu=b/c1;
			ord=(b%c1)/c2;
		}
		//cout<<aizu<<" "<<ord<<endl;
		if(c1>b){cout<<"NA"<<endl;}
		
		else if((aizu+ord)<q1){
			for(int i=aizu-1;i>0;i--){
				if((b-c1*i)/c2>=q1-i){
					flag=true;
					cout<<i<<" "<<(b-c1*i)/c2<<endl;
					break;
				}
			}
			if(!flag){
				cout<<"NA"<<endl;
			}
		}else{
			cout<<aizu<<" "<<ord<<endl;
		}
	}
	return 0;
}