#include <bits/stdc++.h>
using namespace std;
int dp[4010][4010];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int A, B, C, D, E, F;
  cin >> A >> B >> C >> D >> E >> F;
  dp[0][0] = 1;
  for (int i = 0; i <= F; i++) {
    for (int j = 0; j <= F; j++) {
      if (!dp[i][j]) continue;
      dp[i + 100 * A][j] = 1;
      dp[i + 100 * B][j] = 1;
      dp[i + C][j + C] = 1;
      dp[i + D][j + D] = 1;
    }
  }
  double maxD = 0;
  int mi = 0, mj = 0;
  for (int i = 1; i <= F; i++) {
    for (int j = 1; j <= F; j++) {
      if (!dp[i][j]) continue;
      if (E * (i - j) / 100 < j) continue;
      double d = (double)j / i;
      if (maxD < d) {
        maxD = d;
        mi = i;
        mj = j;
      }
    }
  }
  cout << mi << " " << mj << endl;
}
