#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long ll;
main(){
  while(1){
    int q1;
    scanf("%lld",&q1);
    if(!q1) break;
    ll b,c1,c2,q2;
    scanf("%lld %lld %lld %lld",&b,&c1,&c2,&q2);
    ll res1=0,res2=0;

    if(c1<=c2){
      if(b >= c1*q2){
	b-=c1*q2;
	res1 = q2;
      }else{
	b-=(b/c1)*c1;
	res1 = b/c1;
      }
      res2 = b/c2;
      if(res1 + res2 < q1 || res1==0) puts("NA");
      else printf("%lld %lld\n",res1,res2);
      continue;
    }

    ll st=1,ed=q2;
    while(st<=ed){
      ll h=(st+ed)/2;
      ll x=b;
      x -= c1*h;
      if(x < 0){
	ed = h-1;
	continue;
      }
      ll t2 = (x/c2);
      x -= t2*c2;
      if( x>=0 && h+t2>=q1 ){
	res1 = h;
	res2 = t2;
	st = h+1;
      }else{
	ed = h-1;
      }
    }
    if(!res1 && !res2) puts("NA");
    else printf("%lld %lld\n",res1,res2);
  }
}