#include <cstdio>
#include <algorithm>
using namespace std;

int L, B, AC, NC, U;

int main(){
    while(scanf("%d%d%d%d%d",
                &L, &B, &AC, &NC, &U) != EOF && L){
        int lb = 0, ub = U;
        while(lb <= ub){
            int m = (lb + ub) / 2;
            if(B - AC * m >= 0 && m + (B - AC * m) / NC >= L){
                lb = m+1;
            }else{
                ub = m-1;
            }
        }
        if(lb > 1){
            printf("%d %d\n", lb-1, (B - AC * lb + AC) / NC);
        }else{
            puts("NA");
        }
    }
    return 0;
}