#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
template <class _T>
inline string tostr(const _T& a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-9;
int n, p1, p2, p3, t1, t2, a[2000], x, y;
int main() {
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  memset(a, 0, sizeof(a));
  int lft = 2000000000, rgh = -2000000000;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (x < lft) lft = x;
    if (y > rgh) rgh = y;
    for (int j = x; j < y; j++) {
      a[j] = 4;
    }
    for (int j = y; j < y + t1; j++) {
      a[j] = 3;
    }
    for (int j = y + t1; j < y + t1 + t2; j++) {
      a[j] = 2;
    }
  }
  long long ans = 0;
  for (int i = lft; i < rgh; i++) {
    if (a[i] == 4) ans += p1;
    if (a[i] == 3) ans += p1;
    if (a[i] == 2) ans += p2;
    if (a[i] == 0) ans += p3;
  }
  cout << ans;
  return 0;
}
