#include <stdio.h>

int main(void)
{
	int q1, zidori, hutuu, q2, yosan;
	int ans;
	
	while (1){
		scanf("%d", &q1);
		if (q1 == 0){
			break;
		}
		scanf("%d%d%d%d",  &yosan, &zidori, &hutuu, &q2);
		
		ans = -1;
		for (int i = q2; i >= 1; i--){
			int mon = yosan;
			mon -= zidori * i;
			if (mon >= 0 && (i + mon / hutuu) >= q1){
				ans = i;
				break;
			}
		}
		
		if (ans == -1){
			printf("NA\n");
		}
		else {
			printf("%d %d\n", ans, (yosan - ans * zidori) / hutuu);
		}
	}
	return (0);
}