#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
int main() {
  int n, m;
  long long x;
  scanf("%d%d", &n, &m);
  vector<long long> a(n), b(m), pra(n, 0), prb(m, 0);
  for (int i = 0; i < n; ++i) {
    scanf("%lld", &a[i]);
    pra[i] = a[i];
    if (i > 0) {
      pra[i] += pra[i - 1];
    }
  }
  for (int i = 0; i < m; ++i) {
    scanf("%lld", &b[i]);
    prb[i] = b[i];
    if (i > 0) {
      prb[i] += prb[i - 1];
    }
  }
  scanf("%lld", &x);
  vector<long long> mina(n), minb(m);
  for (int i = 1; i <= n; ++i) {
    mina[i - 1] = INF;
    for (int j = 0; j <= n - i; ++j) {
      long long sum = pra[j + i - 1];
      if (j) {
        sum -= pra[j - 1];
      }
      mina[i - 1] = min(mina[i - 1], sum);
    }
  }
  for (int i = 1; i <= m; ++i) {
    minb[i - 1] = INF;
    for (int j = 0; j <= m - i; ++j) {
      long long sum = prb[j + i - 1];
      if (j) {
        sum -= prb[j - 1];
      }
      minb[i - 1] = min(minb[i - 1], sum);
    }
  }
  int ans = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (mina[i] * minb[j] <= x) {
        ans = max(ans, (i + 1) * (j + 1));
      }
    }
  }
  printf("%d", ans);
  return 0;
}
