#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
int main() {
  int n, p1, p2, p3, t1, t2;
  cin >> n;
  cin >> p1 >> p2 >> p3 >> t1 >> t2;
  vector<pair<int, int> > v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i].first >> v[i].second;
  }
  int st = v[0].first, total = 0;
  for (int i = 0; i < n; i++) {
    if (i == n - 1) {
      total += (v[i].second - st) * p1;
      break;
    }
    total += (v[i].second - st) * p1;
    st = v[i].second;
    int diff = v[i + 1].first - st;
    if (diff > t1) {
      diff -= t1;
      total += t1 * p1;
      st += t1;
      if (diff > t2) {
        diff -= t2;
        st += t2;
        total += p2 * t2;
        st += diff;
        total += diff * p3;
      } else {
        total += diff * p2;
        st += diff;
      }
    } else {
      total += diff * p1;
      st += diff;
    }
  }
  cout << total << endl;
}
