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

using namespace std;

int b, c1, c2, q1, q2;

int c(int x)
{
    int y = (b - c1 * x) / c2;
	if(b-c1*x<0) return -1; 
	if(q1>(x+y)) return -1;
	if(q2<x) return -1;
	if(y<0) return -1;
	return y;
}

int main()
{
    while(cin >> q1 && q1) {
        cin >> b >> c1 >> c2 >> q2;
        int y;
        bool flag = false;
        for(int x = q2; !flag && x > 0; x--) {
            if((y = c(x)) != -1) {
                cout << x << " " << y << endl;
                flag = true;
            }
        }
        if(!flag) cout << "NA" << endl;
        
    }
    return 0;
}