#!/usr/bin/python inf = float('inf') N = int(raw_input()) C = int(raw_input()) V = int(raw_input()) S = map(lambda x: int(x)-1, raw_input().split()) T = map(lambda x: int(x)-1, raw_input().split()) Y = map(int, raw_input().split()) M = map(int, raw_input().split()) route = [[] for _ in xrange(N)] for i in xrange(V): route[S[i]].append((T[i], Y[i], M[i])) dp = [[inf for _ in xrange(C+1)] for _ in xrange(N)] dp[0][0] = 0 for v in xrange(N): for c in xrange(C+1): for to, cost, time in route[v]: ncost = cost + c if ncost > C: continue dp[to][ncost] = min(dp[to][ncost], dp[v][c] + time) res = min(dp[N-1]) if res == inf: res = -1 print res