#include <bits/stdc++.h>
using namespace std;
int onlyNaturalsNumbers(int i) {
  if (i <= 0) {
    return 0;
  } else {
    return i;
  }
}
int main() {
  int numWorks;
  scanf("%d", &numWorks);
  int power1, power2, power3;
  scanf("%d%d%d", &power1, &power2, &power3);
  int time1, time2;
  scanf("%d%d", &time1, &time2);
  int totalConsumption = 0;
  pair<int, int> *intervalWorked = new pair<int, int>[numWorks];
  for (int i = 0; i < numWorks; i++) {
    int l, r;
    scanf("%d", &l);
    scanf("%d", &r);
    intervalWorked[i] = make_pair(l, r);
    totalConsumption +=
        ((intervalWorked[i].second - intervalWorked[i].first) * power1);
  }
  if (numWorks > 1) {
    int nOccity = (numWorks - 1);
    int *occity = new int[nOccity];
    for (int i = 0; i < nOccity; i++) {
      occity[i] = ((intervalWorked[i + 1].first) - (intervalWorked[i].second));
    }
    for (int i = 0; i < nOccity; i++) {
      int t1 = min(time1, occity[i]);
      occity[i] -= t1;
      int t2 = min(time2, occity[i]);
      occity[i] -= t2;
      int t3 = occity[i];
      totalConsumption += (t1 * power1) + (t2 * power2) + (t3 * power3);
    }
  }
  printf("%d", totalConsumption);
  return 0;
}
