#include <bits/stdc++.h>
using namespace std;

int q1, b, c1, c2, q2;

void solve()
{
	for (int aizu = q2; aizu > 0; aizu--){
		int x = b - c1 * aizu;
		if (x < 0) continue;
		int nor = x / c2;
		if (aizu + nor < q1) continue;
		
		printf("%d %d\n", aizu, nor);
		return;
	}
	puts("NA");
}

int main()
{
	while (scanf("%d", &q1), q1){
		scanf("%d %d %d %d", &b, &c1, &c2, &q2);
		solve();
	}
	return 0;
}