#include <iostream>
#include <cstdio>
using namespace std;
double q1,b,c1,c2,q2;

int main(){

  while(cin >> q1 , q1){
    cin >> b >> c1 >> c2 >> q2;
    int ach,bch;
    int mxa = 0,mxb = 0;
    int cost = 0;
    for( ach = 0 ; ach <= q2 ; ++ach ){
      cost = b - c1*ach;
      if(cost < 0)break;
      bch = cost/c2;
      if(mxa < ach && q1 <= ach + bch ){
	mxa = ach;
	mxb = bch;
      }
    }
    if(mxa < 1)cout << "NA" << endl;
    else cout << mxa << ' ' << mxb << endl;
  }

  return 0;
}