#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
using namespace std;

int main(){
  int want, money, c1, c2, meat;
  
  while(cin >> want){
    if(want == 0) break;
    cin >> money >> c1 >> c2 >> meat;
    
    int ans1 = money / c1;
    if(ans1 > meat) ans1 = meat;
    
    int budget = ans1 * c1;
    int ans2 = 0;
    int sale = money - budget;
    int buy_normal = sale / c2;
    ans2 += buy_normal;
    sale -= buy_normal * c2;
    while(1){
      if(ans1 + ans2 >= want) break;
      if(ans1 == 0) break;
      ans1--, budget -= c1; // テ、ツクツ?」ツ?、テ・ツ」ツイテ」ツつ?
      sale += c1; // テ・ツ」ツイテ」ツ?」テ」ツ?ヲティツイツーテ」ツ?」テ」ツ?淌」ツ?甘ゥツ??
      buy_normal = sale / c2;
      ans2 += buy_normal; //テ・ツ慊ーテゥツカツ湘」ツつ津・ツ」ツイテ」ツ?」テ」ツ?ヲテ」ツ?ァテ」ツ?催」ツ?淌」ツ?甘ゥツ?妥」ツ?ァテ」ツ?ァテ」ツ?催」ツつ凝」ツ??」ツ?妥ゥツカツ湘ィツつ嘉」ツつ津ィツイツキテ」ツ??テ・ツ?凝ヲツ閉ーテッツシツ?     
      sale -= buy_normal * c2;     
      budget += ans2 * c2;
    }
    if(ans1 == 0) cout << "NA" << endl;    
    else cout << ans1 << ' ' << ans2 << endl;
  }
  return 0;
}