#include<iostream>
using namespace std;
main(){
  int max,min,mid;
  int q1,q2,b,c1,c2;
  int aizumoney,sosomoney,sosonum;
  while(1){
    cin>>q1;
    if(q1==0)break;
    cin>>b>>c1>>c2>>q2;
    //会津地鶏二分探索
    min=0;
    max=q2;
    while(min<=max){
      mid=(max+min)/2;
      aizumoney=mid*c1;
      sosomoney=b-aizumoney;
      sosonum=sosomoney/c2;
      // cout<<min<<" "<<max<<" "<<mid<<" "<<aizumoney<<" "<<sosomoney<<" "<<sosonum<<endl;
      if(mid+sosonum>=q1&&mid>0&&sosonum>=0&&sosomoney>=0){
	//cout<<"OK"<<endl;
	min=mid+1;
      }
      else{
	//cout<<"NG"<<endl;
	max=mid-1;
      }
    }
    mid=(max+min)/2;
    aizumoney=mid*c1;
    sosomoney=b-aizumoney;
    sosonum=sosomoney/c2; 
    // cout<<min<<" "<<max<<" "<<mid<<" "<<aizumoney<<" "<<sosomoney<<" "<<sosonum<<endl;
    if(mid+sosonum>=q1&&mid>0&&sosonum>=0&&sosomoney>=0){
      cout<<mid<<" "<<sosonum<<endl;
    }
    else{
      cout<<"NA"<<endl;
    }
  }
}