#include <iostream>
#include <utility>
using namespace std;

int q1,b,c1,c2,q2;

// ????´\?¶???????????????????x??¨??????
bool C(int x){
    if(x*c1 > b || x > q2)
        return false;

    return x + (b-x*c1)/c2 >= q1;
}

int main(){
    while(1){
        cin>>q1;
        if(!q1)break;
        cin>>b>>c1>>c2>>q2;
        
        int lb = 0, ub = 1e+9;
        for(int i=0;i<100;i++){
            int mid = (lb + ub) / 2;
            if(C(mid)) lb = mid;
            else ub = mid;
        }

        if(lb == 0)
            cout<<"NA"<<endl;
        else
            cout<<lb<<" "<<(b-lb*c1)/c2<<endl;
    }
    return 0;
}