#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<numeric>
#include<complex>

#define f first
#define s second
#define mp make_pair

#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()

using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

int main(){
  int b,c1,c2,q1,q2;
  while(cin>>q1, q1){
    cin>>b>>c1>>c2>>q2;
    /*
      b = c1 * x + c2 * (q1 - x);
      b = (c1 - c2) * x + c2 * q1;
      x = (b - c2 * q1) / (c1 - c2);
    */
    int aizu;
    int norm;

    if(c1 <= c2){
      aizu = min(q2, b / c1);
    }else{
      if(b >= q1 * c1){
        aizu = min(q2, b / c1);
      }else{
        aizu = min(q2, (b - c2 * q1) / (c1 - c2));
      }
    }
    int money = b - c1 * aizu;
    if(aizu == 0) goto err;
    //printf("aizu = %d\n", aizu);
    //printf("money = %d\n",money);
    if(money < 0) goto err;
    norm = money / c2;
    if(norm + aizu < q1) goto err;
    cout << aizu << " " << norm << endl;
    continue;
  err:
    cout << "NA" << endl;
  }
  return 0;
}