#!/usr/bin/env python3 import functools import operator def memoize(fn): table = {} def func(*args): if args not in table: table[args] = fn(*args) return table[args] return func N = int(input()) C = int(input()) V = int(input()) S = [int(s) for s in input().split()] T = [int(t) for t in input().split()] Y = [int(y) for y in input().split()] M = [int(m) for m in input().split()] PATH = list(zip(S, T)) COST = dict(zip(PATH, Y)) METER = dict(zip(PATH, M)) @memoize def path(town, yen): if town == 1: return [[1]] road = [path(s, yen - COST[s, t]) for s, t in PATH if t == town and yen >= COST[s, t]] if len(road) < 1: return [[-1]] return [p + [town] for p in functools.reduce(operator.add, road)] def cost(path): cost = 0 for i in range(1, len(path)): if path[i - 1] < 0: continue cost += COST[path[i - 1], path[i]] return cost def meter(path): meter = 0 for i in range(1, len(path)): if path[i - 1] < 0: continue meter += METER[path[i - 1], path[i]] return meter route = [meter(p) for p in path(N, C) if p[0] == 1 and cost(p) <= C] if len(route) == 0: print(-1) else: print(min(route))