#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, P1, P2, P3, T1, T2;
  cin >> n >> P1 >> P2 >> P3 >> T1 >> T2;
  int sum = 0;
  vector<pair<int, int> > v(n);
  for (int i = 0; i < n; ++i) {
    int r, l;
    cin >> r >> l;
    int t = l - r;
    sum += t * P1;
    v[i].first = r;
    v[i].second = l;
  }
  for (int i = 0; i + 1 < n; ++i) {
    int t = v[i + 1].first - v[i].second;
    if (t < T1)
      sum += t * P1;
    else {
      sum += T1 * P1;
      t -= T1;
      if (t < T2)
        sum += t * P2;
      else {
        sum += T2 * P2;
        t -= T2;
        sum += t * P3;
      }
    }
  }
  cout << sum << endl;
}
