#include <bits/stdc++.h>
using namespace std;
const int MAXN = 4e5 + 10;
const int INF = 1e9 + 100;
const long long MOD = 1e9 + 7;
enum { OPEN, CLOSE };
long long add(long long a, long long b) {
  return a + b < MOD ? a + b : a + b - MOD;
}
long long mul(long long a, long long b) { return a * b % MOD; }
struct event {
  int type;
  long long t, e;
  bool operator<(const event &o) const {
    if (t != o.t) return t < o.t;
    return type < o.type;
  }
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  long long x, y;
  while (cin >> n >> x >> y) {
    vector<event> events;
    for (int i = 0; i < n; i++) {
      long long l, r;
      cin >> l >> r;
      events.push_back({OPEN, l, r});
      events.push_back({CLOSE, r, l});
    }
    sort(events.begin(), events.end());
    vector<long long> availables;
    long long ans = 0;
    for (auto &e : events) {
      if (e.type == OPEN) {
        if (availables.size()) {
          long long lt = availables.back();
          if (y * (e.t - lt) < x) {
            availables.pop_back();
            ans = add(ans, mul(y, (e.t - lt)));
            ans = add(ans, mul(y, (e.e - e.t)));
          } else {
            ans = add(ans, add(x, mul(y, e.e - e.t)));
          }
        } else {
          ans = add(ans, add(x, mul(y, e.e - e.t)));
        }
      } else {
        availables.push_back(e.t);
      }
    }
    cout << ans << '\n';
  }
  return 0;
}
