s,t,n,m,r=map(int,input().split())
A=[int(t) for t in input().split()]
B=[int(t) for t in input().split()]
ans=0;tmp=[];r=1;ans2=10*len(A)
for i in range(0,len(B)-2,1):
for u in range(len(A)):
tmp.append(B[i+u])
count=0;diff=0
#print(tmp,A)
for a in range(len(A)):
if tmp[a]!=A[a]:count+=1
if count<=r:ans+=1
if count<=r:
ans2=min(ans2,abs(sum(tmp)-sum(A)))
tmp=[]
print(ans)
print(ans2)