#include<iostream>
using namespace std;
int main(){
  int count=0,count2=0,b,c1,d=0,i,j,q1,c2,q2,y=0;
  while(1){
    j=0;
    y=0;
    count=0;
    count2=0;
    cin >> q1;
    if(q1==0){
      break;
    }
    cin >> b >> c1 >> c2 >> q2;
    if(b<c1){
      cout << "NA" <<endl;
      continue;
    }
    while(b>c1){
      b=b-c1;
      count++;
      if(count >= q2){
	break;
      }
    }
    if(b<c2 && count<q1){
      cout << "NA" <<endl;
      continue;
    }
    if(b>=c2){
      while(b>c2){
	b=b-c2;
	count2++;
      }
    }
    if(count+count2<q1){
      while(count+count2<q1){
	d=0;
	if(count==0){
	  cout << "NA" << endl;
	  j=1;
	  break;
	}
	count--;
	b=b+c1;
	while(c1>c2*d){
	  count2++;
	  b=b-c2;
	  d++;
	  if(count+count2>=q1){
	    y=1;
	    break;
	  }
	}
	if(y==1){
	  break;
	}
      }
    }
    if(j!=1){
      cout << count << " " << count2 <<endl;
    }
  }
}