#include <iostream>
#include <algorithm>
using namespace std;
int main() {
  while(true) {
    int q1; cin >> q1;
    if(q1 == 0) break;
    int b, c1, c2, q2; cin >> b >> c1 >> c2 >> q2;
    int ansX = -1, ansY;
    for(int x = 1; x <= q2 && x*c1 <= b; ++x) {
      int y = (b - x * c1) / c2;
      if(x + y >= q1) {
        ansX = x;
        ansY = y;
      }
    }
    if(ansX == -1) cout << "NA" << endl;
    else cout << ansX << ' ' << ansY << endl;
  }
}