#include <iostream>
#include <cstdio>
#include <climits>
#include <fstream>
#include <algorithm>
using namespace std;
inline int getint();
const int MAXN = 200001;
int t[2 * MAXN], n, x, y, z, a[MAXN], b[MAXN], ans = INT_MIN;
main()
{
freopen("milktemp.in", "r", stdin);
ofstream fout("milktemp.out");
n = getint();
x = getint();
y = getint();
z = getint();
for (int i = 1; i <= n; ++i){
a[i] = getint();
b[i] = getint();
t[i * 2 - 1] = a[i];
t[i * 2] = b[i];
}
sort(a + 1, a + n + 1);
sort(b + 1, b + n + 1);
sort(t + 1, t + 2 * n + 1);
int l = 0, r = 0;
for (int i = 1; i <= 2 * n; ++i){
int nans;
while(l < n && t[i] >= a[l + 1])
l ++;
while(r < n && t[i] > b[r + 1])
r ++;
nans = (n - l) * x + (l - r) * y + r * z;
ans = max(nans, ans);
}
fout << ans;
fclose(stdin);
fout.close();
// getchar(); getchar();
}
inline int getint(){
int x = 0;
char c;
while (! isdigit(c = getchar()));
while (isdigit(c)){
x = x * 10 + c - '0';
c = getchar();
}
return x;
}