n, m = list(map(int, input().split())) node = [[] for _ in range(n)] for _ in range(m): u, v, w = list(map(lambda x: int(x)-1, input().split())) node[u].append((v, w+1)) node[v].append((u, w+1)) A = list(map(int, input().split())) B = list(map(int, input().split())) C = list(map(int, input().split())) inf = 1<<60 D = [inf] * n D[0] = 1 from heapq import heappush, heappop hq = [] heappush(hq, (1, 0)) while hq: c, u = heappop(hq) if D[u] < c: continue for v, w in node[u]: k = (c+A[u]-1)//A[u] if k % B[u] == 0: nc = min(k*A[u]+w+C[u], k*A[u]+w+A[u]) else: nc = k*A[u]+w if D[v] > nc: D[v] = nc heappush(hq, (nc, v)) print(D[-1])