#include <cstdio>

int main(void)
{
	long q1, b, c1, c2, q2;
	
	while (1){
		scanf("%ld", &q1);
		if (q1 == 0) break;
		scanf("%ld %ld %ld %ld", &b, &c1, &c2, &q2);
		
		if ((b < (c2 * (q1 - 1)) + c1) && (c2 < c1)){
			printf("NA\n");
			continue;
		}
		
		long aizu = 0, normal = 0;
		
		aizu = b / c1;
		b = b % c1;
		if (q2 < aizu){
			long over = aizu - q2;
			aizu -= over;
			b += (over * c1);
		}
//		printf("%ld %ld\n", aizu, b);
		
		normal = b / c2;
		b = b % c2;
//		printf("%ld %ld\n", normal, b);
		
		while ((aizu + normal) < q1){
			aizu--;
			b += c1;
			normal += (b / c2);
			b %= c2;
		}
		
		printf("%ld %ld\n", aizu, normal);
	}
	
	return (0);
}