#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:167772160000")
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long f, T, t0;
  cin >> f >> T >> t0;
  long long a1, t1, p1;
  cin >> a1 >> t1 >> p1;
  long long a2, t2, p2;
  cin >> a2 >> t2 >> p2;
  long long adv1, adv2;
  adv1 = max(0LL, t0 - t1);
  adv2 = max(0LL, t0 - t2);
  long long req = t0 * f - T;
  long long answer = 1E18;
  if (req <= 0) {
    cout << 0;
    return 0;
  }
  for (long long i = 0; i <= f; i++) {
    long long stillReq = req - adv1 * i;
    if (stillReq <= 0)
      answer = min(answer, ((i + a1 - 1) / a1) * p1);
    else if (adv2 > 0) {
      long long needed = (stillReq + adv2 - 1) / adv2;
      if (needed + i <= f) {
        long long use1 = (i + a1 - 1) / a1;
        long long use2 = (needed + a2 - 1) / a2;
        answer = min(answer, use1 * p1 + use2 * p2);
      }
    }
  }
  if (answer > 1E17) answer = -1;
  cout << answer << endl;
  return 0;
}
