#include <bits/stdc++.h>
using namespace std;
const int maxi = 1e6 + 10;
const long long mo = 1e9 + 7;
const long long inf = 1e18 + 10;
int n;
long long x, y;
long long p[maxi], h[maxi], lst[maxi];
pair<int, int> a[maxi];
int main() {
  cin >> n >> x >> y;
  for (int i = 1; i <= n; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    a[i] = {l, 1};
    a[i + n] = {r + 1, -1};
  }
  sort(a + 1, a + 2 * n + 1);
  int cur = 0;
  for (int i = 1; i <= 2 * n; i++) {
    cur += a[i].second;
    h[i] = cur;
  }
  for (int i = 1; i <= n + 1; i++) lst[i] = inf;
  for (int i = 2 * n; i > 0; i--) {
    p[i] = lst[h[i] + 1];
    lst[h[i]] = a[i].first;
  }
  long long tot = 0;
  long long ans = 0;
  for (int i = 1; i <= 2 * n; i++) {
    if (h[i] - h[i - 1] == 1) {
      ans += tot * y % mo * (a[i].first - a[i - 1].first);
      if (tot < h[i]) {
        tot++;
        ans += x;
      }
      ans %= mo;
    } else {
      ans += tot * y % mo * (a[i].first - a[i - 1].first);
      if ((p[i] - a[i].first + 1) > 1.00 * x / y) {
        tot--;
        ans -= y;
        ans += mo;
      }
      ans %= mo;
    }
  }
  cout << ans << endl;
  return 0;
}
