#include<vector>
#include<list>
#include<algorithm>
#include<iostream>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
using namespace std;
int main(){
  int i,j;
  int a,b,c,d,e;
  for(;;){
    cin>>a;
    if(a==0)
      break;
    cin>>b>>c>>d>>e;
    if(c*e>b){
      if(b/c+(b-b/c*c)/d<a){
	i=b/c;
	j=a-i;
	while(i>0&&i*c+j*d>b){
	  i--;
	  j++;
	}
	if(i)
	  cout<<i<<" "<<j<<endl;
	else
	  cout<<"NA"<<endl;
      }else{
	if(b/c)
	  cout<<b/c<<" "<<(b-b/c*c)/d<<endl;
	else
	  cout<<"NA"<<endl;
      }
    }else{
      if(e+(b-c*e)/d<a){
	i=e;
	j=a-i;
	while(i>0&&i*c+j*d>b){
	  i--;
	  j++;
	}
	if(i)
	  cout<<i<<" "<<j<<endl;
	else
	  cout<<"NA"<<endl;
      }else{
	if(e)
	  cout<<e<<" "<<(b-c*e)/d<<endl;
	else
	  cout<<"NA"<<endl;
      }
    }
  }
  return 0;
}