#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)n; ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

int main(){
  string line;
  while(getline(cin, line)){
    if(line == "0") break;
    int q1,b,c1,c2,q2;
    stringstream ss(line);
    ss>>q1>>b>>c1>>c2>>q2;
    int ans1 = 0;
    int ans2 = 0;
    for(int jidori = q2; jidori >= 0; jidori--){
      if(jidori == 0){
        cout<<"NA"<<endl;
        break;
      }
      int money = b - jidori*c1;
      if(money < 0) continue;
      int tori = money / c2;
      if(tori + jidori >= q1){
        printf("%d %d\n",jidori,tori);
        break;
      }
    }
  }

  return 0;
}