#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  cin >> n >> m;
  long long int a[n], b[m];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  for (long long int i = 1; i < n; i++) a[i] += a[i - 1];
  for (long long int i = 0; i < m; i++) cin >> b[i];
  for (long long int i = 1; i < m; i++) b[i] += b[i - 1];
  long long int c[n], d[m], tar, ans = 0;
  cin >> tar;
  for (long long int i = 0; i < n; i++) {
    c[i] = LLONG_MAX;
    for (long long int j = i; j < n; j++) {
      if (j - i == 0)
        c[i] = min(c[i], a[j]);
      else
        c[i] = min(c[i], a[j] - a[j - i - 1]);
    }
  }
  for (long long int i = 0; i < m; i++) {
    d[i] = LLONG_MAX;
    for (long long int j = i; j < m; j++) {
      if (j - i == 0)
        d[i] = min(d[i], b[j]);
      else
        d[i] = min(d[i], b[j] - b[j - i - 1]);
    }
  }
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < m; j++) {
      if (c[i] * d[j] <= tar) ans = max(ans, (i + 1) * (j + 1));
    }
  }
  cout << ans;
}
