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())) bef = [[] for _ in range(n)] for s, t, y, m in zip(S, T, Y, M): s -= 1 t -= 1 bef[t].append((s, y, m)) inf = 1 << 30 dp = [[inf] * (c + 1) for _ in range(n)] dp[0][0] = 0 for t in range(1, n): for s, y, m in bef[t]: for i in range(y, c + 1): dp[t][i] = min(dp[t][i], dp[s][i - y] + m) ans = min(dp[-1]) if ans == inf: print(-1) else: print(ans)