#include <bits/stdc++.h>

using namespace std;

int main()
{
  int q1, b, c1, c2, q2;
  while(cin >> q1, q1){
    cin >> b >> c1 >> c2 >> q2;
    int aizu = min(q2, b/c1);
    int money = b - aizu*c1;
    int tori = max(money/c2, 0);
    money -= tori*c2;
    int up = 0;
    while(aizu > 0 && (money < 0 || aizu + tori < q1)){
      //cout << aizu << " " << tori << " " << money << endl;
      aizu--;
      money += c1;
      up = max(money/c2, 0);
      money -= up*c2;
      tori += up;
    }
    if(aizu != 0 && aizu + tori >= q1) cout << aizu << " " << tori << endl;
    else cout << "NA" << endl;
  }
  return 0;
}