#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;

int a, b, c, d, e;

bool check(int m) {
  if (m * c > b) return false;
  return m + (b - m * c) / d >= a;
}

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  while (cin >> a >> b >> c >> d >> e, a) {
    int ok = 0, ng = min(e, b / c) + 1;
    while (ng - ok > 1) {
      int m = (ok + ng) / 2;
      if (check(m)) ok = m;
      else ng = m;
    }
    if (ok == 0) cout << "NA" << endl;
    else cout << ok << " " << (b - ok * c) / d << endl;
  }

  return 0;
}
