#include <iostream>
using namespace std;

int main()
{
	int q1,money,c1,c2,q2;
	while(cin >> q1){
		if(!q1)
			break;
			cin >> money >> c1 >> c2 >> q2;
			int zidori = min(money/c1,q2);
			int hutuu = 0;
			int kakaku = zidori*c1 + hutuu*c2;
			while(zidori+hutuu < q1){
				while(kakaku < money){
					if(kakaku+c2 < money){
						kakaku += c2;
						hutuu++;
					}
					else
						break;
				}
				if(zidori+hutuu >= q1)
					break;
				zidori--;
				kakaku -= c1;
				if(zidori <= 0)
					break;
			}
			if(zidori <= 0 || zidori + hutuu < q1)
				cout << "NA" << endl;
			else
				cout << zidori << " " << hutuu << endl;
	}
	return 0;
}