#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, m, s;
  cin >> n >> m;
  m++;
  n++;
  long long int a[n], b[m];
  long long int r[m], c[n];
  b[0] = 0;
  a[0] = 0;
  for (long long int i = 1; i < n; i++) {
    cin >> a[i];
  }
  for (long long int i = 1; i < m; i++) {
    cin >> b[i];
  }
  cin >> s;
  for (long long int i = 1; i < n; i++) {
    a[i] = a[i] + a[i - 1];
    c[i] = INT_MAX;
  }
  for (long long int i = 1; i < m; i++) {
    b[i] = b[i] + b[i - 1];
    r[i] = INT_MAX;
  }
  for (long long int i = 1; i < m; i++) {
    for (int j = 0; j < i; j++) {
      r[i - j] = min(r[i - j], b[i] - b[j]);
    }
  }
  for (long long int i = 1; i < n; i++) {
    for (int j = 0; j < i; j++) {
      c[i - j] = min(c[i - j], a[i] - a[j]);
    }
  }
  long long int res = 0;
  for (long long int i = 1; i < m; i++) {
    for (long long int j = 1; j < n; j++) {
      if (r[i] * c[j] <= s) {
        res = max(res, i * j);
      }
    }
  }
  cout << res;
  return 0;
}
