#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <list>
#include <iostream>
#include <sstream>
#include <climits>
#include <cfloat>
#include <complex>

using namespace std;

int main()
{
	int q1, b, c1, c2, q2;
	while (scanf("%d %d %d %d %d", &q1, &b, &c1, &c2, &q2), q1)
	{
		int aizu = 0, normal;
		for (int i = min(q2, b/c1); i > 0; --i)
		{
			int t = (b - i*c1) / c2;
			if (i + t >= q1)
			{
				aizu = i;
				normal = t;
				break;
			}
		}
		if (aizu)
			printf("%d %d\n", aizu, normal);
		else
			puts("NA");
	}

	return 0;
}