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

public class amusement_ak_wrong {

    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 normalizeSpeeds(double[][] speed) {
        for(double[] a : speed) {
            for (int i = 0; i < a.length - 1; i++) {
                a[i + 1] = Math.min(a[i], a[i + 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();
            }
        }

        normalizeSpeeds(speed);

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

        int[] firstOnSegment = new int[n - 1];
        int[] lastOnSegment = new int[n - 1];
        double[] position = new double[m];

        while (standing[n - 1] < m) {
            double dt = Double.POSITIVE_INFINITY;
            for (int seg = 0; seg < n - 1; seg++) {
                // empty segment
                int first = firstOnSegment[seg];
                int last = lastOnSegment[seg] - 1;
                int onSeg = last - first + 1;
                if (onSeg == 0) {
                    if (standing[seg] > 0) {
                        dt = 0;
                        break;
                    } else {
                        continue;
                    }
                }
                double realPositionOfFirst = position[first] + t * speed[seg][first];
                double realPositionOfLast = position[last] + t * speed[seg][last];
                // step from platform to next segment
                if (standing[seg] > 0 && onSeg < segmentCapacity[seg] && compare(realPositionOfLast, segmentMinDist[seg]) <= 0) {
                    double eta = (segmentMinDist[seg] - realPositionOfLast) / speed[seg][first];
                    dt = Math.min(dt, eta);
                }
                // step from segment to next platform
                if (standing[seg + 1] < platformCapacity[seg + 1]) {
                    double eta = (segmentLength[seg] - realPositionOfFirst) / speed[seg][last];
                    dt = Math.min(dt, eta);
                }
            }
            System.err.println("Simulating " + dt + " time...");
            for (int seg = n - 2; seg >= 0; seg--) {
                int first = firstOnSegment[seg];
                int last = lastOnSegment[seg] - 1;
                int onSeg = last - first + 1;
                if (onSeg == 0) {
                    if (standing[seg] > 0) {
                        standing[seg]--;
                        int id = lastOnSegment[seg];
                        lastOnSegment[seg]++;
                        position[id] = - (t + dt) * speed[seg][id];
                        System.err.println(String.format("Move %d from platform %d to empty segment at %f", id, seg, t + dt));
                    }
                    continue;
                }
                double lastPosition = position[last] + (t + dt) * speed[seg][last];
                double firstPosition = position[first] + (t + dt) * speed[seg][first];
                if (onSeg > 0 && compare(firstPosition, segmentLength[seg]) == 0) {
                    standing[seg + 1]++;
                    firstOnSegment[seg]++;
                    onSeg--;
                    System.err.println(String.format("Move %d from seg %d to next platform at %f", first, seg, t + dt));
                }
                if (compare(lastPosition, segmentMinDist[seg]) == 0 && standing[seg] > 0 && onSeg < segmentCapacity[seg]) {
                    standing[seg]--;
                    position[lastOnSegment[seg]] = -(t + dt) * speed[seg][lastOnSegment[seg]];
                    lastOnSegment[seg]++;
                    System.err.println(String.format("Move %d from platform %d to next seg as %f", last, seg, t + dt));
                }
            }
            t += dt;
        }
        PrintWriter out = new PrintWriter("amusement.out");
        System.err.println(t);
        out.println(t);
        out.close();
    }

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