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())) dic = {} def sum_time(t, y): if (t, y) in dic: return dic[(t, y)] if y < 0: dic[(t, y)] = float("inf") return dic[(t, y)] if t == 1: dic[(t, y)] = 0 return dic[(t, y)] minm = float("inf") for i in range(V): if t == T[i]: minm = min(sum_time(S[i], y-Y[i]) + M[i], minm) dic[(t, y)] = minm return dic[(t, y)] M = sum_time(N, C) if float("inf") > M >= 0: print(M) else: print(-1)