#include <iostream>
#include <string>
#include <vector>
using namespace std;

int q1,b,c1,c2,q2;

int main() {
    while (cin >> q1, q1) {
        cin >> b >> c1 >> c2 >> q2;
        bool ok = false;
        int x, y;
        for (x=min(b/c1,q2); x>=1; --x) {
            y = (b - c1 * x) / c2;
            if (q1 <= x + y) {
                ok = true;
                break;
            }
        }
        if (ok) {
            cout << x << " " << y << endl;
        } else {
            cout << "NA" << endl;
        }
    }
    return 0;
}