#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <queue>
using namespace std;

#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()
const int INF = 1<<30;

int main() {
  int q1,b,c1,c2,q2;
  while(cin >> q1, q1) {
    cin >> b >> c1 >> c2 >> q2;
    int a1 = min(q2,b/c1);
    int a2 = (b-a1*c1) / c2;
    
//    printf("[%d,%d]\n",a1,a2);
    while(a1 + a2 < q1) {
      a1--;
      if (a1 == 0) {
        break;
      }
      while(a1 * c1 + a2 * c2 <= b)
        a2++;
      a2--;
    }
    if (a1 == 0)
      cout << "NA";
    else
      cout << a1 << " " << a2;
    cout << endl;
    
  }
}