#include<iostream>
using namespace std;
int main(){
  int a,b,c,d,e;
  while(cin >>a,a){
    cin >>b>>c>>d>>e;
    int x;
    for(int i=b/c; i>=0; i--){
      if(i == 0){cout <<"NA"<<endl;break;}
      if(e>=i){
	x = (b-i*c)/d;
	if(x+i >= a){cout <<i<<" "<<x<<endl;break;}
      }
    }
  }
  return 0;
}