#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const int N = 1e5 + 5;
long long v[N], n;
long long a, b, h, w;
bool go(int tam) {
  long long acc = 1;
  for (int i = 0; i < tam; i++) acc *= v[i];
  int n = tam / 2;
  int m = (1 << n);
  set<long long> s;
  for (int i = 0; i < m; i++) {
    long long val = 1;
    for (int j = 0; j < n; j++)
      if ((1 << j) & i) val *= v[j];
    s.insert(val);
  }
  m = (1 << (tam - n));
  set<long long>::iterator it;
  for (int i = 0; i < m; i++) {
    long long val = 1LL;
    for (int j = n; j < tam; j++) {
      if ((1 << (j - n)) & i) val *= v[j];
    }
    long long at = (a + h * val - 1) / (h * val);
    it = s.lower_bound(at);
    if (it != s.end()) {
      at = *it;
      long long H = at * val * h;
      long long W = acc / (at * val);
      W *= w;
      if (H >= a and W >= b) return 1;
    }
    at = (a + w * val - 1) / (w * val);
    it = s.lower_bound(at);
    if (it != s.end()) {
      at = *it;
      long long W = at * val * w;
      long long H = acc / (at * val);
      H *= h;
      if (W >= a and H >= b) return 1;
    }
    swap(a, b);
    at = (a + h * val - 1) / (h * val);
    if (it != s.end()) {
      at = *it;
      long long H = at * val * h;
      long long W = acc / (at * val);
      W *= w;
      if (H >= a and W >= b) return 1;
    }
    at = (a + w * val - 1) / (w * val);
    if (it != s.end()) {
      at = *it;
      long long W = at * val * w;
      long long H = acc / (at * val);
      H *= h;
      if (W >= a and H >= b) return 1;
    }
    swap(a, b);
  }
  return false;
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin >> a >> b >> h >> w >> n;
  for (int i = 0; i < n; i++) cin >> v[i];
  sort(v, v + n);
  reverse(v, v + n);
  int mx = min(34LL, n);
  for (int i = 0; i <= mx; i++) {
    if (go(i)) {
      cout << i << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
