#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 aizu = 0;
		int normal = 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.didori_nedan > s_input.yosan){
				break;
			}
			s_input.yosan -= s_input.didori_nedan;
			aizu++;
		}

		normal = s_input.yosan / s_input.normal_tori;
		s_input.yosan %= s_input.normal_tori;

		if (aizu + normal >= s_input.niku && aizu >= 1){
			cout << aizu << " " << normal << endl;
			continue;
		}

		while (s_input.niku > aizu + normal){
			if (aizu <= 1){
				break;
			}
			s_input.yosan += s_input.didori_nedan;
			aizu--;

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

		if (aizu + normal >= s_input.niku && aizu >= 1){
			cout << aizu << " " << normal << endl;
			continue;
		}
		cout << "NA" << endl;
	}

	return 0;
}