#include <bits/stdc++.h>
using namespace std;
int q,b,c1,c2,limit;

int check(int M){
  int B=b,cnt=M;
  B-=c1*M;
  if(B<0) return 0;
  cnt+=(B/c2);
  return (cnt>=q);
}

int main(){
  while(cin>>q,q){;
    cin>>b>>c1>>c2>>limit;

    int L=0,M,R=limit+1;
    while(L<R) {
      M=(R+L)/2;
      if(!check(M)) R=M;
      else L=M+1;
    }
    if(L==0) cout <<"NA"<<endl;
    else cout <<(L-1)<<" "<<((b-(L-1)*c1)/c2)<<endl;
    
  }
  return 0;
}