#include <iostream>
using namespace std;

int main()
{
	int q1, b, c1, c2, q2;
	
	while (cin>>q1,q1){
		bool flag=false;
		cin >> b >> c1 >> c2 >> q2;
		for (int i = q2; i > 0&&!flag; i--){
		int x = b - c1 * i;
		if (x < 0) continue;
		int tori = x / c2;
		if (i + tori < q1) continue;

		cout << i << " "<< tori << endl;
		flag = true;
	}
		if(!flag)cout << "NA" << endl;
	}
	return 0;
}