#include <iostream>
using namespace std;

int main(){
	int q1,b,c1,c2,q2;
	while(cin >> q1 && q1){
		cin >> b >> c1 >> c2 >> q2;
		int X = 0 , Y = 0;
		while( X < q2 && b - c1 >= 0 ) X++ , b -= c1;
		while( b - c2 >= 0 ){
			Y++;
			b -= c2;
		}
		while( X && X+Y < q1){
			X --;
			b += c1;
			while( b - c2 >= 0 ){
				Y++;
				b -= c2;
			}
		}
		while( b - c2 >= 0 ){
			Y++;
			b -= c2;
		}
		if( X+Y < q1 || !X || b < 0) cout << "NA" << endl;
		else cout << X << " " << Y << endl;
	}
	
}