#include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define ALL(a) (a).begin(),(a).end()
#define INF 1000000001
#define MOD 10000
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
const ull B=100000007;
int main(){
      int a,b,c,d,e;
      while(cin>>a&&a){
            cin>>b>>c>>d>>e;
            int cnt1=min(e,b/c);
            int sum=b-cnt1*c;
            int cnt2=sum/d;
            sum-=cnt2*d;
            if(cnt1==0){
                  cout<<"NA"<<endl;
            }else if(cnt1+cnt2>=a){
                  cout<<cnt1<<" "<<cnt2<<endl;
            }else{
                  if(d>=c)cout<<"NA"<<endl;
                  else{
                        while(cnt2+cnt1<a&&cnt1>1){
                              sum+=c;cnt1--;
                              while(sum>=d){
                                    sum-=d;
                                    cnt2++;
                              }
                        }
                        if(cnt2+cnt1>=a&&cnt1>0)cout<<cnt1<<" "<<cnt2<<endl;
                        else cout<<"NA"<<endl;
                  }
            }
      }
}