#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, x, y;
  cin >> n >> x >> y;
  pair<unsigned long long, long long> p[2 * n];
  long long slp[2 * n];
  long long mod = 1000000007;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first >> p[i + n].first;
    p[i].second = -1;
    p[i + n].second = 1;
  }
  sort(p, p + 2 * n);
  long long o[2 * n];
  o[0] = 1;
  for (int i = 1; i < 2 * n; i++) {
    o[i] = o[i - 1] - p[i].second;
  }
  long long tmpnz[2 * n];
  for (int i = 0; i < n; i++) {
    tmpnz[i] = ULONG_MAX;
  }
  for (int i = 2 * n - 1; i >= 0; i--) {
    slp[i] = tmpnz[o[i] + 1];
    if (p[i].second == -1) {
      tmpnz[o[i]] = p[i].first;
    }
  }
  unsigned long long k = 0, rez = 0;
  for (int i = 0; i < 2 * n; i++) {
    if (i > 0)
      rez += (((y * (p[i].first - p[i - 1].first)) % mod) * k % mod) % mod;
    rez %= mod;
    if (p[i].second == -1) {
      if (k < o[i]) {
        k++;
        rez += x;
        rez %= mod;
      }
    } else {
      if (y * (slp[i] - p[i].first) > x) {
        k--;
      }
    }
  }
  cout << rez;
}
