import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.concurrent.atomic.AtomicInteger;

public class amusement_ak_simulate_time {

    static final double EPS = 1e-9;
    static final double DT = 0.000001;

    static int compare(double x, double y) {
        AtomicInteger i;
        if (Math.abs(x - y) < EPS) {
            return 0;
        } else {
            return x < y ? -1 : 1;
        }
    }

    static void solve() throws FileNotFoundException {
        Scanner in = new Scanner(new File("amusement.in"));
        int n = in.nextInt();
        int m = in.nextInt();
        int[] platformCapacity = new int[n];
        platformCapacity[0] = platformCapacity[n - 1] = m;
        for (int i = 1; i < n - 1; i++) {
            platformCapacity[i] = in.nextInt();
        }
        int[] segmentCapacity = new int[n - 1];
        for (int i = 0; i < n - 1; i++) {
            segmentCapacity[i] = in.nextInt();
        }
        double[] segmentLength = new double[n - 1];
        for (int i = 0; i < n - 1; i++) {
            segmentLength[i] = in.nextInt();
        }
        double[] segmentMinDist = new double[n - 1];
        for (int i = 0; i < n - 1; i++) {
            segmentMinDist[i] = in.nextInt();
        }
        double[][] speed = new double[n - 1][m];
        for (int i = 0; i < n - 1; i++) {
            for (int j = 0; j < m; j++) {
                speed[i][j] = in.nextInt();
            }
        }

        int[] standing = new int[n];
        standing[0] = m;
        int[] hanging = new int[n - 1];
        double t = 0;

        double[] position = new double[m];
        int[] segment = new int[m];
        int[] platform = new int[m];
        boolean[] onSegment = new boolean[m];

        onSegment[0] = true;
        hanging[0] = 1;


        while (standing[n - 1] < m) {
            for (int i = 0; i < m; i++) {
                if (onSegment[i]) {
                    int seg = segment[i];
                    boolean weAreLast = i == 0 || !onSegment[i - 1] || segment[i - 1] != segment[i];
                    if (weAreLast) {
                        position[i] += DT * speed[seg][i];
                        position[i] = Math.min(segmentLength[seg], position[i]);
                        if (compare(position[i], segmentLength[seg]) >= 0 && standing[seg + 1] < platformCapacity[seg + 1]) {
                            System.err.println(String.format("%d steps to platform %d at %f", i, seg + 1, t + DT));
                            onSegment[i] = false;
                            standing[seg + 1]++;
                            hanging[seg]--;
                            platform[i] = seg + 1;
                        }
                    } else {
                        position[i] = Math.min(position[i] + DT * speed[seg][i], position[i - 1] - segmentMinDist[seg]);
                    }
                } else {
                    int p = platform[i];
                    boolean canHang = i == 0
                            || (!onSegment[i - 1] && platform[i - 1] != p)
                            || (onSegment[i - 1] && (segment[i - 1] != p || compare(position[i - 1], segmentMinDist[p]) >= 0));
                    if (p != n - 1 && hanging[p] < segmentCapacity[p] && canHang) {
                        System.err.println(String.format("%d steps from platform %d at %f", i, p, t + DT));
                        onSegment[i] = true;
                        standing[p]--;
                        hanging[p]++;
                        segment[i] = p;
                        position[i] = 0;
                    }
                }
            }
            t += DT;
        }

        PrintWriter out = new PrintWriter("amusement.out");
        out.println(t);
        System.err.println(t);
        out.close();
    }

    public static void main(String[] args) throws FileNotFoundException {
        solve();
    }
}
