#include<iostream>
#include<string>
using namespace std;

int main()
{
    int q1, b, c1, c2, q2;

    while( cin >> q1 )
    {
        if( !q1 )
            break;
        
        cin >> b >> c1 >> c2 >> q2;

        bool judge = false;
        for( int i = q2; i >= 1; i-- )
        {
            int sum = b - c1 * i;
            if( sum < 0 )
                continue;
            else if( sum / c2 + i >= q1 )
            {
                cout << i << " " << sum / c2 << endl;
                judge = true;
                break;
            }
        }

        if( !judge )
            cout << "NA" << endl;
    }

    return 0;
}
