#include <iostream>

using namespace std;

int main()
{
  int q1, b, c1, c2, q2, s, t, cost;

  while(1){
    cin >> q1;
    if(q1 == 0){
      break;
    }
    cin >> b >> c1 >> c2 >> q2;

    s = b / c1;
    if(s > q2){
      s = q2;
    }
    t = q1 - s;
    if(t < 0){
      t = 0;
    }
    cost = c1*s + c2*t;
    if(cost > b){
      while(s > 0 && cost > b){
	cost -= c1;
	s--;
      }
    }
    if(s <= 0){
      cout << "NA" << endl;
      continue;
    }
    while(cost+c2 <= b){
      t++; 
      cost+=c2;
    }
    if(s+t < q1){
      while(s+t < q1){
	cost -= c1;
	s--;
	while(cost+c2 <= b){
	  cost += c2;
	  t++;
	}
      }
    }
    cout << s << " " << t << endl;
  }

  return 0;
}