#include <bits/stdc++.h>

using namespace std;

int main(){
    int q1, money, cost1, cost2, q2;
    while(cin >> q1, q1){
        cin >> money >> cost1 >> cost2 >> q2;
        bool is = false;
        for(int i=q2; 0 <= i; i--){
            int g1 = i;
            if(money < cost1*g1) continue;
            int g2 = (money-cost1*g1)/cost2;
            if(g2 < 0 || g1+g2 < q1 || g1 == 0) continue;
            else {
                is = true;
                cout << g1 << " " << g2 << endl;
                break;
            }
        }
        if(!is) cout << "NA" << endl;
    }
}