#include<cstdio>
#include<algorithm>
#include<vector>
#include<iostream>
#include<string>
#include<cstring>
#include<sstream>
#include<queue>
using namespace std;
int main(){
    int q1,b,c1,c2,q2;
    while(cin>>q1,q1){
        cin>>b>>c1>>c2>>q2;
        int x,y;
        x=min(b/c1,q2);

        for(int i=x;i>=0;i--){
            if(i==0)cout<<"NA"<<endl;
            else if(i+(b-i*c1)/c2>=q1){
                cout<<i<<" "<<(b-i*c1)/c2<<endl;
                break;
            }
        }
    }
    return 0;
}