#include <iostream>
#include <algorithm>
using namespace std;

int main() {
  int q1,b,c1,c2,q2;
  while(cin >> q1 && q1) {
    cin >> b >> c1 >> c2 >> q2;
    int ans1, ans2;
    ans1 = ans2 = -1;
    for(int i = q2; i >= 1; --i) {
      int remain = b - c1*i;
      if(remain < 0) continue;
      int normal = remain/c2;
      if(i + normal >= q1) {
	ans1 = i;
	ans2 = normal;
	break;
      }
    }
    if(ans1 == -1) cout << "NA" << endl;
    else cout << ans1 << " " << ans2 << endl;
  }
  return 0;
}