#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#define REP(i, m, n) for(int i=int(m);i<int(n);i++)
#define EACH(i, c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s, e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

//#define LOCAL 1
#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR
#endif


//改造
typedef long long int ll;
using namespace std;


//ここから編集する
int A, B, C, D, E, F;

int main() {
    cin >> A >> B >> C >> D >> E >> F;

    vector<int> water(31);
    vector<int> sugar(3001);

    water[0] = 1;
    sugar[0] = 1;
    REP(i, 0, 31) {
        if (water[i] == 0) continue;
        if (i + A <= 30) water[i + A] = 1;
        if (i + B <= 30) water[i + B] = 1;
    }
    REP(i, 0, 3001) {
        if (sugar[i] == 0) continue;
        if (i + C <= 3000) sugar[i + C] = 1;
        if (i + D <= 3000) sugar[i + D] = 1;
    }
//    for (int i = 0; 100 * A * i <= 3000; i++) {
//        for (int j = 0; 100 * (A * i + B * j) <= 3000; j++) {
//            water.push_back(100 * A * i + 100 * B * j);
//        }
//    }
//
//    for (int i = 0; C * i <= 1500; i++) {
//        for (int j = 0; D * j + C * i <= 1500; j++) {
//            sugar.push_back(D * j + C * i);
//        }
//    }

    double max_rate = 0;
    int max_water = A * 100;
    int max_sugar = 0;
//    REP(i, 0, water.size()) {
//        REP(j, 0, sugar.size()) {
//            if (sugar[j] * 100 > E * water[i] || water[i] + sugar[j] > F) continue;
//            if (water[i] == 0 && sugar[j] == 0) continue;
//            if (max_rate < (double) sugar[j] / (double) (water[i] + sugar[j])) {
//                max_rate = (double) sugar[j] / (double) (water[i] + sugar[j]);
//                max_water = water[i];
//                max_sugar = sugar[j];
//            }
//        }
//    }
    REP(i, 0, 31) {
        REP(j, 0, 3001) {
            if (!(water[i] == 1 && sugar[j] == 1)) continue;
            if (j > i * E || i * 100 + j > F) continue;
            if (i == 0 && j == 0) continue;
//            if (max_rate < (double) j / (double) (i * 100 + j)) {
//                max_rate = (double) j / (double) (i * 100 + j);
//                max_water = i * 100;
//                max_sugar = j;
//            }
            if (j * (max_sugar + max_water) > max_sugar * (i * 100 + j)){
                max_water = i * 100;
                max_sugar = j;
            }
        }
    }

    cout << max_water + max_sugar << " " << max_sugar << endl;


    return 0;
}


Measured memory_bytes: 256