#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 jibard = min( q2, b / c1);
    b -= jibard * c1;

    int nobard = b / c2;
    b -= nobard * c2;

    while( jibard && jibard + nobard < q1){
      jibard--;
      b += c1;
      int nextnb = b / c2;
      nobard += nextnb;
      b -= nextnb * c2;
    }

    if(jibard) cout << jibard << " " << nobard << endl;
    else cout << "NA" << endl;
  }
}