#include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;
const int INF = 1e9 + 7;

int q1, b, q2;
double c1, c2;

int check(int x){
  if(x < 0 || x > q2) return -1;
  double p = (x / 100) * c1;
  if(p > b) return -1;
  int y = (b - p) / c2;
  y *= 100;
  if(x + y < q1) return -1;
  return y;
}
 
int main() {
  while(cin >>q1 && q1){
    cin >>b >>c1 >>c2 >>q2;
    q1 *= 100; q2 *= 100;
    int x = -1, y = -1, tmp;
    for(int i = 10000000; i >= 100; i -= 100) if((tmp = check(i)) != -1) { x = i; y = tmp; break; }
    if(x == -1) cout <<"NA" <<endl;
    else cout <<x / 100 <<" " <<y / 100 <<endl;
  }
  return 0;
}