#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);
        b-=c1*x;
        y=b/c2;
        if(x+y<q1||x==0)cout<<"NA"<<endl;
        else cout<<x<<" "<<y<<endl;
    }
    return 0;
}