#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, x, y;
  cin >> n >> x >> y;
  int buffer = x / y;
  vector<pair<long long int, long long int> > shows;
  for (int i = 0; i < n; i++) {
    long long int a, b;
    cin >> a >> b;
    shows.push_back(make_pair(a, b));
  }
  sort(shows.begin(), shows.end());
  multimap<int, int> curtvs;
  for (auto it = shows.begin(); it != shows.end(); it++) {
    if (curtvs.empty()) {
      curtvs.insert(make_pair(it->second, it->first));
      continue;
    }
    auto elem = curtvs.lower_bound(it->first);
    if (elem == curtvs.begin()) {
      curtvs.insert(make_pair(it->second, it->first));
      continue;
    }
    elem--;
    if (it->first - elem->first > buffer) {
      curtvs.insert(make_pair(it->second, it->first));
      continue;
    }
    long long int start = elem->second;
    curtvs.erase(elem);
    curtvs.insert(make_pair(it->second, start));
  }
  long long int cost = 0;
  for (auto it : curtvs) {
    cost = (cost + x + ((long long int)y * (it.first - it.second)) % mod) % mod;
  }
  cout << cost << endl;
  return 0;
}
