import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

immutable long MOD = 10^^9 + 7;

void main() {
    auto t = readln.split.map!(to!int);
    auto H = t[0];
    auto W = t[1];
    auto A = readln.split.map!(to!long).array;
    auto B = readln.split.map!(to!long).array;
    auto X = readln.chomp.to!long;

    auto minA = new long[](H+1);
    auto minB = new long[](W+1);

    foreach (len; 1..H+1) {
        long s = 0;
        foreach (i; 0..len) s += A[i];
        minA[len] = s;
        foreach (i; len..H) {
            s = s - A[i-len] + A[i];
            minA[len] = min(minA[len], s);
        }
    }

    foreach (len; 1..W+1) {
        long s = 0;
        foreach (i; 0..len) s += B[i];
        minB[len] = s;
        foreach (i; len..W) {
            s = s - B[i-len] + B[i];
            minB[len] = min(minB[len], s);
        }
    }

    long ans = 0;
    foreach (i; 0..H+1) foreach (j; 0..W+1) if (minA[i] * minB[j] <= X) ans = max(ans, i * j);

    ans.writeln;
}
