#include<iostream>

using namespace std;

typedef pair<int,int> P;
int mon,c1,c2,q1,q2;
P ans;

void solve(){
  
  ans.first = min(mon/c1,q2);
  mon -= ans.first*c1;
  ans.second = mon/c2;

  if(ans.first == 0){
    cout << "NA" << endl;
    return;
  }
  while(ans.first+ans.second < q1){
    ans.first--;
    if(ans.first <= 0){
      cout << "NA" << endl;
      return;
    }
    mon += c1;
    ans.second = mon/c2;
  }

  cout << ans.first << " " << ans.second << endl;
}

int main(){
  while(cin >> q1 && q1){
    cin >> mon >> c1 >> c2 >> q2;
    ans = P(0,0);
    solve();
  }

  return 0;
}