#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p1, p2, p3, t1, t2, temp1, temp2;
  cin >> n >> p1 >> p2 >> p3 >> t1 >> t2;
  int cur = 0;
  int ans = 0;
  while (n--) {
    cin >> temp1 >> temp2;
    if (cur == 0) cur = temp1;
    int sub = temp1 - cur;
    if (sub >= 0 && sub <= t1) {
      ans += p1 * (temp2 - cur);
    } else if (sub > t1 && sub <= t1 + t2) {
      ans += p1 * (temp2 - temp1 + t1) + p2 * (sub - t1);
    } else {
      ans += p1 * (temp2 - temp1 + t1) + p2 * t2 + p3 * (sub - t1 - t2);
    }
    cur = temp2;
  }
  cout << ans;
}
