#include<iostream>


using namespace std;


typedef struct struct_input
{
	//欲しい肉の量
	int niku;
	//予算
	int yosan;
	//地鶏の値段
	int didori_nedan;
	//普通の
	int normal_tori;
	//地鶏を最大で買える数
	int didori_max;
}S_input;


S_input s_input;




int main(void)
{
	while (true)
	{
		int ans1 = 0 , ans2 = 0;

		cin >> s_input.niku;

		if (s_input.niku == 0)	{	return 0;	}

		cin >> s_input.yosan >> s_input.didori_nedan >> s_input.normal_tori >> s_input.didori_max;
	
		//地鶏の最大
		for (int i = 0; i < s_input.didori_max; i++)
		{
			//金の少ない多い
			if (s_input.yosan < s_input.didori_nedan)
			{
				break;
			}
			s_input.yosan -= s_input.didori_nedan;
			ans1++;
		}

		//残りの金で鶏肉を買う
		while (s_input.yosan > s_input.normal_tori)
		{
			ans2++;
			s_input.yosan -= s_input.normal_tori;
		}

		if (ans1 == 0)
		{
			cout << "NA" << endl;
			continue;
		}
		if (ans1 + ans2 >= s_input.niku)
		{
			cout << ans1 << " " << ans2 << endl;
			continue;
		}

		//2つの肉の差
		int sa = s_input.didori_nedan - s_input.normal_tori;
		while (ans1 > 0)
		{
			ans1--;
			ans2++;
			s_input.yosan += sa;

			while (s_input.yosan >= s_input.normal_tori)
			{
				ans2++;
				s_input.yosan -= s_input.normal_tori;
			}

			if (ans1 + ans2 >= s_input.niku)
			{
				break;
			}
		}
		

		if (ans1 + ans2 >= s_input.niku)
		{
			cout << ans1 << " " << ans2 << endl;
		}
		else
		{
			cout << "NA" << endl;
		}
	
	}

	return 0;
}