#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <sstream>
#include <cassert>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;
typedef pair<int,int> PI;
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define MP make_pair
#define PB push_back

ll q1,b,c1,c2,q2;

bool can(ll ai){
  ll zan=b-ai*c1;
  ll ji=zan/c2;
  if(ai>q2 || ai<1)return false;
  if(ai+ji<q1)return false;
  if(zan<0)return false;
  return true;
}

main(){
  while(cin>>q1,q1){
    cin>>b>>c1>>c2>>q2;

    ll l=0,r=1000000;
    while(l+1<r){
      ll mid=(l+r)/2;
      //cout<<l<<" "<<mid<<" "<<r<<endl;
      if(can(mid))l=mid;
      else r=mid;
    }
    if(can(l)){
      cout<<l<<" "<<(b-l*c1)/c2<<endl;
    }else puts("NA");
  }
}