#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long second, first;
  cin >> n >> first >> second;
  pair<long long, long long> segs[n];
  for (int i = 0; i < n; i++) {
    cin >> segs[i].first >> segs[i].second;
  }
  sort(segs, segs + n);
  priority_queue<long long, vector<long long>, greater<long long> > ok;
  multiset<long long> bad;
  long long ans = 0;
  long long mod = 1e9 + 7;
  long long aps = first / second;
  for (int i = 0; i < n; i++) {
    while (ok.size() && ok.top() < segs[i].first) {
      if (ok.top() + aps >= segs[i].first) {
        bad.insert(ok.top() + aps);
      }
      ok.pop();
    }
    while (bad.size() && *bad.begin() < segs[i].first) {
      bad.erase(bad.begin());
    }
    if (bad.size() == 0) {
      ans += first;
      ans %= mod;
      ans += ((segs[i].second - segs[i].first) * second) % mod;
      ans %= mod;
      ok.push(segs[i].second);
    } else {
      long long t = *bad.rbegin();
      ans += ((segs[i].first - (t - aps)) * second) % mod;
      ans %= mod;
      ans += ((segs[i].second - segs[i].first) * second) % mod;
      ans %= mod;
      ok.push(segs[i].second);
      bad.erase(prev(bad.end()));
    }
  }
  cout << ans << endl;
}
