#include <bits/stdc++.h>
using namespace std;
int get() {
  char c;
  while (c = getchar(), c != '-' && (c < '0' || c > '9'))
    ;
  bool flag = (c == '-');
  if (flag) c = getchar();
  int x = 0;
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return flag ? -x : x;
}
const int MAXN = 100000;
const int MAXM = 34;
long long x[MAXN];
long long dp[MAXM + 1][MAXN + 1];
bool check(int n, int m, int a, int b) {
  memset(dp, 0, sizeof(dp));
  dp[0][1] = 1;
  for (int i = 1; i <= m; i++)
    for (int j = 1; j <= a; j++) {
      long long newj = min(j * x[n - i], (long long)a);
      long long newk = min(dp[i - 1][j] * x[n - i], (long long)b);
      dp[i][newj] = max(dp[i][newj], dp[i - 1][j]);
      dp[i][j] = max(dp[i][j], newk);
    }
  return dp[m][a] == b;
}
int main() {
  int a0 = get(), b0 = get(), a1 = get(), b1 = get(), n = get();
  int x0 = (a0 - 1) / a1 + 1, y0 = (b0 - 1) / b1 + 1;
  int x1 = (a0 - 1) / b1 + 1, y1 = (b0 - 1) / a1 + 1;
  for (int i = 0; i < n; i++) x[i] = get();
  sort(x, x + n);
  int l = 0, r = min(n, 34);
  if (!check(n, r, x0, y0) && !check(n, r, x1, y1)) {
    printf("-1\n");
    return 0;
  }
  while (l < r) {
    int mid = (l + r) / 2;
    if (check(n, mid, x0, y0) || check(n, mid, x1, y1))
      r = mid;
    else
      l = mid + 1;
  }
  printf("%d\n", l);
  return 0;
}
