#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>
#include <queue>

using namespace std;

int main(){

	long long int must_amount,budget,price_aizu,price_normal,aizu_limit,left,right,max_aizu,max_normal,m,tmp_normal;

	while(true){
		scanf("%lld",&must_amount);
		if(must_amount == 0)break;

		scanf("%lld %lld %lld %lld",&budget,&price_aizu,&price_normal,&aizu_limit);

		max_aizu = 0;

		left = 1,right = aizu_limit;
		m = (left + right)/2;

		while(left <= right){
			if(price_aizu*m > budget){
				right = m - 1;
				m = (left + right)/2;
			}else{
				tmp_normal = (budget - price_aizu*m)/price_normal;
				if(tmp_normal + m >= must_amount){
					max_aizu = m;
					max_normal = tmp_normal;
					left = m + 1;
					m = (left + right)/2;
				}else{
					if(price_aizu < price_normal){
						left = m + 1;
						m = (left + right)/2;
					}else{
						right = m - 1;
						m = (left + right)/2;
					}
				}
			}
		}

		if(max_aizu == 0)printf("NA\n");
		else{
			printf("%lld %lld\n",max_aizu,max_normal);
		}
	}
	return 0;
}