#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
using namespace std;

signed 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;
        while(x){
            if(x + y >= q1) break;
            x--;
            b += c1;
            y = b / c2;
        }
        if(x == 0) cout << "NA" << endl;
        else cout << x << ' ' << y << endl;
    }
}