#include <iostream>
using namespace std;

main() {
  while(1) {
    int q1, b, c1, c2, q2;
    cin >> q1;
    if(q1 == 0) break;
    cin >> b >> c1 >> c2 >> q2;
    int aizu;
    int normal;

    aizu = b / c1;
    if(aizu > q2) aizu = q2;
    bool flag = false;
    while(aizu >= 1) {
      normal = (b - aizu * c1) / c2;
      if(aizu + normal >= q1) {
        flag = true;
        break;
      }
      aizu--;
    }

    if(!flag) cout << "NA" << endl;
    else      cout << aizu << ' ' << normal << endl;
  }
}