N = int(input()) C = int(input()) V = int(input()) S = list(map(int, input().split())) T = list(map(int, input().split())) Y = list(map(int, input().split())) M = list(map(int, input().split())) G = sorted([(S[i], T[i], Y[i], M[i]) for i in range(0, V)]) L = [[] for i in range(1, N + 1)] L[0].append((0, 0)) for (s, t, y, m) in G: for (y2, m2) in L[s - 1]: if y2 + y <= C : L[t - 1].append((y + y2, m + m2)) if L[N - 1] == []: print(-1) else: print(min([t for (c, t) in L[N - 1]]))