#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int AX = 1e5 + 666;
int n;
long long a[AX];
long long b[AX];
int mark[AX];
long long x, y;
int main() {
  scanf("%d%I64d%I64d", &n, &x, &y);
  long long res = 0LL;
  for (int i = 0; i < n; i++) {
    scanf("%I64d%I64d", &a[i], &b[i]);
    res = (res + x % MOD + 1LL * y * (b[i] - a[i])) % MOD;
  }
  memset(mark, 0, sizeof(mark));
  sort(a, a + n);
  sort(b, b + n);
  for (int i = n - 1; i >= 0; i--) {
    int pos = upper_bound(a, a + n, b[i]) - a;
    if (pos < 0 || pos >= n || (1LL * y * (a[pos] - b[i]) > x)) {
      continue;
    }
    while (pos <= n && mark[pos] && (1LL * y * (a[pos] - b[i]) < x)) pos++;
    if (pos >= n) continue;
    if (1LL * y * (a[pos] - b[i]) < x) {
      mark[pos] = 1;
      res = (res + MOD - x + 1LL * y * (a[pos] - b[i])) % MOD;
    }
  }
  printf("%I64d\n", res);
  return 0;
}
