#include <bits/stdc++.h>
using namespace std;
const long long INF = (1LL << 60) - 1;
int main() {
  long long f, T, t0;
  scanf("%lld%lld%lld", &f, &T, &t0);
  long long a[3], t[3], p[3];
  for (int i = 1; i <= 2; i++) scanf("%lld%lld%lld", &a[i], &t[i], &p[i]);
  long long res = INF;
  for (long long b1 = 0; b1 <= 10000000; b1++) {
    long long gap = (f * t0 - T) - b1 * (t0 - t[1]);
    long long b2 =
        ((t0 > t[2] && gap > 0) ? (gap + (t0 - t[2]) - 1) / (t0 - t[2]) : 0);
    if (b1 + b2 <= f && b1 * (t0 - t[1]) + b2 * (t0 - t[2]) >= f * t0 - T)
      res = min(res,
                (b1 + a[1] - 1) / a[1] * p[1] + (b2 + a[2] - 1) / a[2] * p[2]);
  }
  printf("%lld\n", (res < INF ? res : -1));
  return 0;
}
