#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, p1, p2, p3, t1, t2, i = 0, amount = 0, cnt = 0;
  ;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  long long int left[n], right[n];
  for (i = 0; i < n; i++) {
    int l, r;
    cin >> l >> r;
    left[i] = l;
    right[i] = r;
    cnt = cnt + (r - l) * p1;
  }
  for (i = 1; i < n; i++) {
    int t = left[i] - right[i - 1];
    if (t > t1) {
      cnt = cnt + (t1 * p1);
      t = t - t1;
      if (t > t2) {
        cnt = cnt + (t2 * p2);
        t = t - t2;
      } else {
        cnt = cnt + (t * p2);
        t = 0;
      }
      if (t > 0) {
        cnt = cnt + (t * p3);
      }
    } else {
      cnt = cnt + (t * p1);
    }
  }
  cout << cnt;
}
