#include <iostream>
using namespace std;

int main() {
 double k;	
 int i,hi,lo,m,b,q1,q2,c1,c2;
 while (cin >> q1 && q1!=0) {
	 cin >> b >> c1 >> c2 >> q2;
	 hi=q2+1; lo=0; 
	 for (i=0;i<30;i++) {
		 m=(hi+lo)/2;
		 k=(double)(b-c1*m)/c2;
		 if (k>=0 && (m+k)>=q1) lo=m; else hi=m;
	 }
	 if (m==0) cout << "NA" << endl; else cout << m  << ' ' << (b-c1*m)/c2 << endl;
 }    
  return 0;
}	