
#include<iostream>
using namespace std;

int main()
{
  int q1, b, c1, c2, q2;
  int aizu, normal;
  while (cin>>q1, q1) {
    cin>>b>>c1>>c2>>q2;
    aizu = normal = -1;
    for (; q2 > 0; q2--) {
      if (b >= q2*c1) {
	if ( (b-q2*c1)/c2 + q2 >= q1) {
	  aizu = q2;
	  normal = (b-q2*c1)/c2;
	  break;
	}
      }
    }
    if (aizu == -1) cout<<"NA"<<endl;
    else cout<<aizu<<" "<<normal<<endl;
  }

  return 0;
}