// ABC074_C
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <iterator>  // std::back_inserter()
#include <tuple>  // std::tuple std::get
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>  // std::copy()
#include <functional>  // std::greater<T>()
#include <utility>  // std::swap()
#include <numeric>  // accumulate(ALL(vec), 0)  0 は初期値
#include <bitset>  // static_cast<std::bitset<8>>
#include <sstream>  // std::stringstream
#include <cmath>
#include <climits>  // INT_MIN
#include <cctype>  // std::isdigit()
#include <iomanip>  // std::setprecision()
using namespace std;

#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, n) for (ll i=0; i < n; i++)  // 0 ~ n-1
#define REPN(i, n) for (ll i=1; i <= n; i++)  // 1 ~ n
#define MIN(vec) min_element(ALL((vec)))  // イテレータのため、値を取り出すときは * を先頭につける
#define MAX(vec) max_element(ALL((vec)))
#define IDX(vec, element_iter) distance((vec).begin(), element_iter)
#define SUM(vec) accumulate(ALL((vec)), 0LL)  // 0 は初期値
#define COPY(vec1, vec2) copy(ALL(vec1), back_inserter(vec2))  // vec1をvec2にコピーする vec2は空にしておく必要あり
typedef long long ll;

const ll MOD7 = 1000000007;  // 1 000 000 007
const ll MOD9 = 1000000009;  // 1 000 000 009

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    // input
    ll water_A, water_B, sugar_C, sugar_D, yokai, max_gram;
    cin >> water_A >> water_B >> sugar_C >> sugar_D >> yokai >> max_gram;
    
    // calculation
    if (water_A*100 > max_gram) {
        // 起こりえない
    } else if (water_A * 100 == max_gram) {
        // 最低限入る水とマックスが同じ時
        // 砂糖水 = water_A*100, 砂糖の質量 = 0
        cout << water_A*100 << 0 << "\n";
        
    } else if (water_A < max_gram){
        // 水のパターン
        set<ll> waters;
        ll max_A = max_gram/(water_A*100);
        ll max_B = max_gram/(water_B*100);
        for (ll i = 0; i <= max_A; ++i) {
            for (ll j = 0; j <= max_B; ++j) {
                if (i*water_A*100 + j*water_B*100 <= max_gram) {
                    waters.insert(i*water_A*100 + j*water_B*100);
                    // cout << waters.size() << "\n";
                } else {
                    break;
                }
            }
        }
    
        // for (auto iter = waters.begin(); iter != waters.end(); ++iter) {
        //    cout << *iter << "\n";
        //}
        
        ll now_water, sugar_space, sugar_per100;
        ll now_sC, now_sD;
        set<ll> sugars;
        vector< pair<ll , ll> > vec;
        
        for (auto iter = waters.begin(); iter != waters.end(); ++iter) {
            now_water = *iter;
            if (now_water == 0) continue;
            sugar_per100 = (now_water/100) * yokai;
            // 砂糖の入る余地
            sugar_space = min(max_gram - now_water, sugar_per100);
            if (sugar_space < 0) {
                continue;
            } else if (sugar_space == 0) {
                vec.emplace_back(now_water, 0);
                continue;
            }
            
            // 入れる砂糖の量
            sugars.clear();
            ll max_C = sugar_space/sugar_C;
            ll max_D = sugar_space/sugar_D;
            for (ll i = 0; i <= max_C; ++i) {
                for (ll j = 0; j <= max_D; ++j) {
                    now_sC = sugar_C*i;
                    now_sD = sugar_D*j;
                    if (sugar_space < now_sC + now_sD) {
                        continue;
                    } else {
                        // sugar_space 未満の時
                        sugars.insert(now_sC + now_sD);
                    }
                }
            }
            
            // sugars を確認
            if (sugars.empty()) {
                continue;
            } else {
                // 水と砂糖のペアを保存
                auto max_sugar = sugars.end();
                max_sugar--;
                vec.emplace_back(make_pair(now_water, *max_sugar));
            }
        }
        
        // 濃度を調べる
        double conc = -1, now_conc;
        ll res_water, res_sugar;
        pair<ll, ll> wat_sug;
        REP(i, vec.size()) {
            wat_sug = vec[i];
            now_conc = (double)(100*wat_sug.second)/(double)(wat_sug.first + wat_sug.second);
            if (conc < now_conc) {
                conc = now_conc;
                res_water = wat_sug.first;
                res_sugar = wat_sug.second;
            }
        }
        cout << res_water + res_sugar << " " << res_sugar << "\n";
    }
    
    return 0;
}


Measured memory_bytes: 256