#include<bits/stdc++.h>
using namespace std;
int main()
{
    int line;
    while(cin>>line,line){
        int have,aiz_m,usu_m,aiz_max;
        cin>>have>>aiz_m>>usu_m>>aiz_max;
        bool kawa=0;
        for(int i=min(aiz_max,have/aiz_m);i>0&&!kawa;i--){
            for(int now=have-i*aiz_m,j=now/usu_m;j>-1&&!kawa;j--){
                if(have-j*usu_m>=0&&i+j>=line){
                    cout<<i<<" "<<j<<endl;
                    kawa=1;
                }
            }
        }
        if(!kawa)cout<<"NA\n";
    }
}