#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){

	int q1,b,c1,c2,q2;
	while(cin>>q1>>b>>c1>>c2>>q2&&q1!=0){
		// Ü¸ïÃ{÷ðAé¾¯¤
		int aizu=min(b/c1,q2);
		if(aizu==0){
			cout<<"NA"<<endl;
			continue;
		}
		int left = b-aizu*c1;
		// ÉÊÌ{÷ðãÀÜÅ¤
		int usu=left/c2;
		left-=usu*c2;
		// »ÝÌóÔÅðð½µÄ¢é©
		if(aizu+usu>=q1){
			cout<<aizu<<" "<<usu<<endl;
		}
		// ½µÄ¢È©Á½êAaizu÷ðèAusu÷ð+
		else{
			bool f=false;
			for(int i = aizu-1; i >= 1; i--){
				aizu=i;
				left+=c1;
				int tmp=left/c2;
				left-=tmp*c2;
				usu+=tmp;
				if(aizu+usu>=q1){
					f=true;
					cout<<aizu<<" "<<usu<<endl;
					break;
				}
			}
			if(!f){
				cout<<"NA"<<endl;
			}
		}
	}

	return 0;
}