#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)1e6 + 7;
const int INF = (int)1e9 + 7;
const long long LINF = (long long)4e18 + 7LL;
const double eps = 1e-8;
void solve();
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  if ("" == "input") {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  } else if ("" != "") {
    freopen(
        ""
        ".in",
        "r", stdin);
    freopen(
        ""
        ".out",
        "w", stdout);
  }
  int t = 1;
  if (0) {
    cin >> t;
  }
  while (t--) solve();
  return 0;
}
using pt = tuple<int, int, int>;
int n;
long long x, y;
pair<int, int> p[MAXN];
int pr[MAXN];
vector<pt> s;
stack<long long> st;
vector<int> diff;
void solve() {
  cin >> n >> x >> y;
  for (int i = 0; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    diff.push_back(b - a);
    s.emplace_back(a, 0, i);
    s.emplace_back(b, 1, i);
  }
  long long ans = 0;
  sort(s.begin(), s.end());
  for (auto [tm, beg, ind] : s) {
    if (beg == 1) {
      st.push(tm);
      continue;
    }
    if (!st.empty() && (tm - st.top()) * y < x) {
      pr[ind] = st.top();
      st.pop();
      ans += ((tm - pr[ind]) * y) % INF;
      if (ans >= INF) ans -= INF;
    } else {
      ans += x;
      if (ans >= INF) ans -= INF;
    }
    ans += ((y * diff[ind]) % INF);
    if (ans >= INF) ans -= INF;
  }
  cout << ans;
}
