import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

public class amusement_ak {

    static final double EPS = 1e-9;

    static int compare(double x, double y) {
        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;
        standing[0]--;

        double[] effectiveSpeed = new double[m];
        effectiveSpeed[0] = speed[0][0];
        hanging[0] = 1;

        while (standing[n - 1] < m) {
            double dt = Double.POSITIVE_INFINITY;
            for (int i = 0; i < m; i++) {
                if (onSegment[i]) {
                    boolean isFirst = i == 0 || !onSegment[i - 1] || segment[i - 1] != segment[i];
                    boolean isLast = i == m - 1 || !onSegment[i + 1] || segment[i + 1] != segment[i];
                    int seg = segment[i];
                    boolean freePlatform = standing[seg + 1] < platformCapacity[seg + 1];
                    if (isFirst) {
                        double eta = (segmentLength[seg] - position[i]) / speed[seg][i];
                        if (compare(eta, 0) != 0 || freePlatform)
                            dt = Math.min(dt, eta);
                    }
                    boolean anyoneOnPreviousPlatform = standing[seg] > 0;
                    boolean haveFreeSpaceHere = hanging[seg] < segmentCapacity[seg];
                    if (isLast && anyoneOnPreviousPlatform && haveFreeSpaceHere && compare(position[i], segmentMinDist[seg]) <= 0) {
                        double eta = (segmentMinDist[seg] - position[i]) / effectiveSpeed[i];
                        dt = Math.min(dt, eta);
                    }
                    if (!isFirst && compare(effectiveSpeed[i], effectiveSpeed[i - 1]) > 0) {
                        double eta = (position[i - 1] - position[i] - segmentMinDist[seg]) / (effectiveSpeed[i] - effectiveSpeed[i - 1]);
                        dt = Math.min(dt, eta);
                    }
                } else {
                    int p = platform[i];
                    boolean canStepNowIfNoObstacle = p != n - 1 && hanging[p] < segmentCapacity[p];
                    boolean obstacle = i != 0 && segment[i - 1] == p && onSegment[i - 1] && compare(position[i - 1], segmentMinDist[p]) < 0;
                    boolean prevIsWaitingToo = i != 0 && !onSegment[i - 1] && platform[i - 1] == p;
                    if (canStepNowIfNoObstacle && !obstacle && !prevIsWaitingToo) {
                        dt = 0;
                        break;
                    }
                }
            }
            //System.err.println("Simulating " + dt + " time...");
            if (compare(dt, 0) == 0) {
                for (int i = 0; i < m; i++) {
                    if (onSegment[i]) {
                        int seg = segment[i];
                        boolean isFirst = i == 0 || !onSegment[i - 1] || segment[i - 1] != segment[i];
                        if (isFirst) {
                            effectiveSpeed[i] = speed[seg][i];
                        } else {
                            if (compare(position[i - 1] - position[i], segmentMinDist[seg]) == 0) {
                                effectiveSpeed[i] = Math.min(effectiveSpeed[i - 1], speed[seg][i]);
                            } else {
                                effectiveSpeed[i] = speed[seg][i];
                            }
                        }
                        if (isFirst) {
                            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 {
                        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;
                            effectiveSpeed[i] = speed[p][i];
                        }
                    }
                }
            } else {
                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(position[i], segmentLength[seg]);
                        } else {
                            position[i] = Math.min(position[i] + dt * speed[seg][i], position[i - 1] - segmentMinDist[seg]);
                        }
                    }
                }
            }
            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();
    }
}
