#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>

#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(c).size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;

int main()
{
	int q1,b,c1,c2,q2;
	while(cin>>q1,q1)
	{
		cin>>b>>c1>>c2>>q2;
		for(int aizu=q2;aizu>0;aizu--)
		{
			if(double(aizu)*c1>b)continue;
			int hutuu=(b-aizu*c1)/c2;
			if(aizu+hutuu<q1)continue;
			
			cout<<aizu<<" "<<hutuu<<endl;
			goto END;
		}
		cout<<"NA"<<endl;
		
		END:;
	}
	return 0;
}