#include <vector>
#include <algorithm>
#include <functional>
#include <iostream>
#include <cmath>
#include <string>

using namespace std;

int main()
{
    int b, c1, c2, q1, q2;
    while(cin >> q1 && q1) {
        cin >> b >> c1 >> c2 >> q2;
        int a, a1, a2, d;
        a = b / c1;
        bool ok = false;
        for(int i = 0; !ok && i < a; i++) {
            a1 = a - i;
            if(a1 > q2) a1 = q2;
            a2 = (b - a1 * c1) / c2;
            if(a1 + a2 >= q1) ok = true;
        }
        
        if(ok) {
            cout << a1 << " " << a2 << endl;
        } else {
            cout << "NA" << endl;
        }
        
    }
    return 0;
}