#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
void debugarr(int* a, int n) {
  printf("[ ");
  for (int i = 0; i < n; i++) printf("%d ", a[i]);
  printf("]\n");
}
int n, p1, p2, p3, t1, t2;
int l[105], r[105];
int main() {
  int ret = 0, ct;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  for (int i = 0; i < n; ++i) {
    cin >> l[i] >> r[i];
    ret += (p1 * (r[i] - l[i]));
  }
  for (int i = 1; i < n; ++i) {
    ct = r[i - 1];
    ret += (p1 * min(t1, l[i] - ct));
    if (l[i] - ct >= t1) {
      ct += t1;
      ret += (p2 * min(t2, l[i] - ct));
      if (l[i] - ct >= t2) {
        ct += t2;
        ret += (p3 * max(0, l[i] - ct));
      }
    }
  }
  cout << ret << endl;
  return 0;
}
