import std.functional,
       std.algorithm,
       std.container,
       std.typetuple,
       std.typecons,
       std.bigint,
       std.string,
       std.traits,
       std.array,
       std.range,
       std.stdio,
       std.conv;

bool chmax(t)(ref t a, t b) {
  if (a < b) {
    a = b;
    return true;
  } else {
    return false;
  }
}

double con(double w, double s) {
  return 100 * s / (w + s);
}

void main() {
  double[] ABCDEF = readln.chomp.split.to!(double[]);
  double A = ABCDEF[0],
         B = ABCDEF[1],
         C = ABCDEF[2],
         D = ABCDEF[3],
         E = ABCDEF[4],
         F = ABCDEF[5];

  bool ok(double w, double s) {
    double base = E / 100;
    double p = s / w;

    return base >= p;
  }

  double[] W, S;

  double max = 0;
  int ans1, ans2;

  for (int i; i <= F / 100*A; i++) {
    for (int j; j <= F / 100*B; j++) {
      double w1 = 100 * A * i,
             w2 = 100 * B * j;
      if (w1 + w2 <= F) {
        W ~= w1 + w2;
      }
    }
  }

  for (int i; i <= F / C; i++) {
    for (int j; j <= F / D; j++) {
      double s1 = C * i,
             s2 = D * j;
      if (s1 + s2 <= F) {
        S ~= s1 + s2;
      }
    }
  }

  foreach (w, s; cartesianProduct(W, S)) {
    if (ok(w, s) && w > 0 && w + s <= F) {
      if(chmax(max, con(w, s))) {
        ans1 = (w + s).to!int;
        ans2 = s.to!int;
      }
    }
  }

  writefln("%d %d", ans1, ans2);
}
