N=int(raw_input()) C=int(raw_input()) V=int(raw_input()) S=map(int,raw_input().split()) T=map(int,raw_input().split()) Y=map(int,raw_input().split()) M=map(int,raw_input().split()) yCost=[[10**5]*N for _ in xrange(N)] mCost=[[10**5]*N for _ in xrange(N)] for i in xrange(V): yCost[S[i]-1][T[i]-1] = Y[i] mCost[S[i]-1][T[i]-1] = M[i] dp=[[10**9]*(C+1) for _ in xrange(N)] dp[0][C]=0 for _ in xrange(N): for i in xrange(V): for j in xrange(C+1): if j+Y[i]>C: continue dp[T[i]-1][j] = min(dp[T[i]-1][j], dp[S[i]-1][j+Y[i]]+M[i]) ans = 10**9 for i in xrange(C+1): ans = min(ans, dp[N-1][i]) if ans==10**9: print -1 else: print ans