#include<cstdio>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    while(1){
        int a,b,c,d,e;
        cin>>a;
        if(a==0)break;
        cin>>b>>c>>d>>e;
        if(b<c+d*(a-1)){
            puts("NA");
            continue;
        }
        for(int i=e;1<=i;i--){
            if(a<i){
                if(c*i<=b){
                    cout<<i<<' '<<(b-c*i)/d<<endl;
                    break;
                }
            }
            else{
                if(c*i+d*(a-i)<=b){
                    cout<<i<<' '<<(b-c*i)/d<<endl;
                    break;
                }
            }
        }
    }
    return 0;
}