#include <iostream>
using namespace std;
typedef long long ll;
template<class _T> _T MIN(_T p1,_T p2){return (p1<p2)?p1:p2;} 
int main(){
    ll q1, b, c1, c2, q2;
    while(cin >> q1 >> b >> c1 >> c2 >> q2){
        q2 = MIN(q2, b/c1);
        while(q2 > 0 && q2+(b-q2*c1)/c2 < q1) q2--;
        if(q2 == 0){
            cout << "NA" << endl;
        } else {
            cout << q2 << " " << (b-q2*c1)/c2 << endl;
        }
    }
    return 0;
}