#include <iostream>
#include <algorithm>
using namespace std;

int main(void){
  while(true){
    int q1, b, c1, c2, q2, aChicken, oChicken;
    cin >> q1 >> b >> c1 >> c2 >> q2;
    if(q1 == 0) break;
    aChicken = min(q2, b / c1);
    b = b - aChicken * c1;
    oChicken = max(0, b / c2);
    b = b - oChicken * c2;

    while(aChicken + oChicken < q1 && aChicken != 0){
    b += c1;
    b += oChicken * c2;
    oChicken = b / c2;
    b = b - oChicken * c2;
    aChicken--;
    }

    if(aChicken == 0){
      cout << "NA" << endl;
    }else{
      cout << aChicken << " " << oChicken << endl;
    }
  }

  return 0;
}