#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;

int main() {
    int q1, b, c1, c2, q2;
    while ( cin >> q1 && q1 ) {
        cin >> b >> c1 >> c2 >> q2;
        bool flag2 = true;
        for ( int i = q2; i >= 1; -- i ) {
            bool flag = false;
            int t = 0;
            for ( int j = 0; i * c1 + j * c2 <= b; ++ j ) {
                if ( i + j >= q1 ) {
                    t = j;
                    flag = true;
                }
            }
            if ( flag ) {
                cout << i << " " << t << endl;
                flag2 = false;
                break;
            }
        }
        if ( flag2 ) {
            cout << "NA" << endl;
        }
    }
    return 0;
}