#include <bits/stdc++.h>
using namespace std;
int n, x, y;
pair<int, int> a[100005];
multiset<int> s;
int rez;
inline void add(int &a, int b) {
  a += b;
  if (a >= 1000000007) a -= 1000000007;
}
int main() {
  scanf("%d%d%d", &n, &x, &y);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].first, &a[i].second);
    s.insert(a[i].second);
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    long long aux = 1LL * x + 1LL * y * (1LL * a[i].second - a[i].first);
    if (s.empty() || (*s.begin()) >= a[i].first) {
      add(rez, aux % 1000000007);
      continue;
    }
    multiset<int>::iterator it = s.lower_bound(a[i].first);
    it--;
    long long aux1 = 1LL * y * (1LL * a[i].second - (*it));
    if (aux1 < aux) {
      add(rez, aux1 % 1000000007);
      s.erase(it);
    } else
      add(rez, aux % 1000000007);
  }
  printf("%d", rez);
  return 0;
}
