#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <sstream>
#include <unordered_map>
#include <vector>


#define INF 1000000002486618624LL
#define MOD 1000000007
#define ALL(x) std::begin(x), std::end(x)


int main(int argc, char** argv)
{
  std::cin.tie(0);
  std::ios_base::sync_with_stdio(0);

  std::cout << std::fixed << std::setprecision(6);

  int A, B, C, D, E, F, swp = -1, sp = -1;

  long double pp = 0.0;

  std::cin >> A >> B >> C >> D >> E >> F;

  for (int i = 0; ; i ++) {
    int w = i * A * 100;

    if (w > F)
      break;

    for (int j = 0; ; j ++) {
      w += j * B * 100;

      if (w > F)
        break;
      
      int S = w * E / 100;

      if (w > F)
        continue;

      for (int k = 0; ; k ++) {
        int s = k * C;

        if (s > S)
          break;
        
        for (int l = 0; ; l ++) {
          s += l * D;

          if (s > S)
            break;

          int sw = s + w;

          if (sw > F)
            continue;

          long double p = 1.0L * s / sw;
          
          if (p > pp) {
            pp  = p;
            swp = sw;
            sp  = s;
          }
        }
      }
    }
  }

  std::cout << swp << ' ' << sp << std::endl;

  return 0;
}
