local mfl = math.floor
local a, b, c, d, e, f = io.read("*n", "*n", "*n", "*n", "*n", "*n")
local alim = mfl(f / (100 * a))
local ret = {0, 100 * a}
for i_a = 0, alim do
  local rem = f - i_a * 100 * a
  local blim = mfl(rem / (100 * b))
  for i_b = 0, blim do
    local rem2 = rem - i_b * 100 * b
    local clim = mfl(rem2 / c)
    for i_c = 0, clim do
      local rem3 = rem2 - i_c * c
      local dlim = mfl(rem3 / d)
      for i_d = 0, dlim do
        local t1, t2 = i_c * c + i_d * d, (i_a * a + i_b * b) * 100 + i_c * c + i_d * d
        if (100 + e) * t1 <= t2 * e then
          if ret[1] * t2 < ret[2] * t1 then
            ret[1], ret[2] = t1, t2
          end
        end
      end
    end
  end
end
print(ret[2] .. " " .. ret[1])
