#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1000010;
int n, X, Y, ans;
int sta[N], top = 0;
pair<int, int> a[N];
struct P {
  int x, id, opt;
  inline bool operator<(const P &yy) const {
    return x == yy.x ? opt > yy.opt : x < yy.x;
  }
};
P p[N];
int len = 0;
template <typename T>
void gi(T &x) {
  x = 0;
  register char c = getchar(), pre = 0;
  for (; c < '0' || c > '9'; pre = c, c = getchar())
    ;
  for (; c >= '0' && c <= '9'; c = getchar()) x = x * 10ll + (c ^ 48);
  if (pre == '-') x = -x;
}
int main() {
  gi(n), gi(X), gi(Y);
  for (int i = (1); i <= (n); i++)
    gi(a[i].first), gi(a[i].second), p[++len] = (P){a[i].first, i, 1},
                                     p[++len] = (P){a[i].second, i, -1};
  sort(p + 1, p + len + 1);
  for (int i = (1); i <= (len); i++) {
    if (p[i].opt == -1)
      sta[++top] = p[i].x;
    else {
      int L = a[p[i].id].first, R = a[p[i].id].second;
      if (!top)
        ans = (ans + X + 1ll * (R - L) * Y % mod) % mod;
      else {
        int x = sta[top--];
        if (1ll * Y * (R - x) <= X + 1ll * Y * (R - L))
          ans = (ans + 1ll * (R - x) * Y % mod) % mod;
        else
          ++top, ans = (ans + X + 1ll * (R - L) * Y % mod) % mod;
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}
