a,b,c,d,e,f=list(map(int,input().split()))

q=[]

for t in range(0,f+1,a*100):

  for w in range(t,f+1,b*100):

    if w>0:

      m=min(f-w,w*e//100)+1

      for u in range(0,m,c):

        for s in range(u,m,d):

          v=s+w

          q.append([s/v,v,s])

print((*max(q)[1:]))

a,b,c,d,e,f=list(map(int,input().split()))

print((*max(

  [[s/(s+w),s+w,s]

    for t in range(0,f+1,a*100)

    for w in range(t,f+1,b*100)

    if w>0

    for m in [min(f-w,w*e//100)+1]

    for u in range(0,m,c)

    for s in range(u,m,d)

  ])[1:]))
a, b, c, d, e, f = list(map(int, input().split()))
q = []
for t in range(0, f + 1, a * 100):
    for w in range(t, f + 1, b * 100):
        if w > 0:
            m = min(f - w, w * e // 100) + 1
            for u in range(0, m, c):
                for s in range(u, m, d):
                    v = s + w
                    q.append([s / v, v, s])
print((*max(q)[1:]))

a, b, c, d, e, f = list(map(int, input().split()))
print(
    (
        *max(
            [
                [s / (s + w), s + w, s]
                for t in range(0, f + 1, a * 100)
                for w in range(t, f + 1, b * 100)
                if w > 0
                for m in [min(f - w, w * e // 100) + 1]
                for u in range(0, m, c)
                for s in range(u, m, d)
            ]
        )[1:]
    )
)

-q = [] -for t in range(0, f + 1, a * 100): -    for w in range(t, f + 1, b * 100): -        if w > 0: -            m = min(f - w, w * e // 100) + 1 -            for u in range(0, m, c): -                for s in range(u, m, d): -                    v = s + w -                    q.append([s / v, v, s]) -print((*max(q)[1:])) +print( +    ( +        *max( +            [ +                [s / (s + w), s + w, s] +                for t in range(0, f + 1, a * 100) +                for w in range(t, f + 1, b * 100) +                if w > 0 +                for m in [min(f - w, w * e // 100) + 1] +                for u in range(0, m, c) +                for s in range(u, m, d) +            ] +        )[1:] +    ) +)