[M, L, W, N, K] = list(map(int, input().split(' ')))
A = list(map(int, input().split(' ')))
B = list(map(int, input().split(' ')))

def spec_sum(array):
    sumi=0
    for i in range(len(array)):
        sumi += array[i]*(2*i+1)
    return sumi

def eq1(A,B):
    return L*(sum(A)-sum(B)) + W*(spec_sum(A)-spec_sum(B))

abil = True
discs = 0
delta = -1
if eq1(B,A)>=0:
    A, B = B, A
last = B
while abil:
    delta += 1
    if last==B:
        while L-eq1(A[:len(A)-1],B)>0:
            if len(A):
                A.pop()
                discs += 1
            else:
                abil = False
                break
    else:
        while L+eq1(A,B[:len(B)-1])>0:
            if len(B):
                B.pop()
                discs += 1
            else:
                abil = False
                break
    last = A
    if L-eq1(A[:len(A)-1],B)<0 and L+eq1(A,B[:len(B)-1])<0:
        abil = False

print("{0} {1}".format(discs, delta))
            
        
        
        
    

