#include <bits/stdc++.h>
using namespace std;
ifstream in;
ofstream out;
const long long kk = 1000;
const long long ml = kk * kk;
const long long mod = ml * kk + 7;
const long long inf = 5 * ml * ml * ml + 7;
long long n, i, j, x, y;
vector<pair<long long, long long> > m;
set<pair<long long, long long> > s;
multiset<long long> fr;
bool viv = false;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> x >> y;
  for (i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    m.push_back({a, b + 1});
  }
  sort(m.begin(), m.end());
  long long ans = 0;
  for (auto p : m) {
    long long p1 = x + (p.second - p.first - 1) * y;
    long long p2 = inf;
    auto x = fr.upper_bound(p.first);
    if (x != fr.begin()) {
      x--;
      long long last = (*x);
      fr.erase(x);
      p2 = (p.second - last) * y;
    }
    ans += (min(p2, p1) % mod);
    ans %= mod;
    fr.insert(p.second);
  }
  cout << ans;
  return 0;
}
