#include<iostream>
using namespace std;

int main()
{
    int q1,b,c1,c2,q2,g1=0,g2=0;
    while(cin>> q1>>b>>c1>>c2>>q2)
    {
        int na = 1;
        for(g1=q2;g1> 0 ;--g1)
        {
            if( (g1+(b-g1*c1)/c2)>=q1 &&(g1*c1+g2*c2)<=b)
            {
                na=0;break;
            }
        }
        if(na){cout<<"NA"<<endl;continue;}
        cout << g1 << " "<< (b-g1*c1)/c2<<endl;
    }
    return 0;
}