#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
struct seg {
  long long st;
  long long ed;
  bool operator<(const seg b) const {
    if (ed == b.ed) return st > b.st;
    return ed > b.ed;
  }
};
seg a[100005];
bool cmp(seg a, seg b) {
  if (a.st < b.st)
    return true;
  else if (a.st == b.ed && a.ed < b.ed)
    return true;
  else
    return false;
}
int main() {
  ios::sync_with_stdio(false);
  long long n, m, t;
  while (cin >> n >> m >> t) {
    vector<long long> v;
    priority_queue<seg> q;
    for (int i = 0; i < n; i++) {
      cin >> a[i].st >> a[i].ed;
    }
    sort(a, a + n, cmp);
    long long ans = 0;
    for (int i = 0; i < n; i++) {
      while (!q.empty()) {
        seg now = q.top();
        if (a[i].st >= now.ed) {
          q.pop();
          v.push_back(now.ed);
        } else
          break;
      }
      q.push(a[i]);
      long long det = m;
      if (v.size() != 0) {
        vector<long long>::iterator k =
            lower_bound(v.begin(), v.end(), a[i].st);
        if (k != v.begin()) {
          k--;
          long long x = *k;
          long long tmp = (a[i].st - x) * t;
          if (tmp < det) {
            det = tmp;
            v.erase(k);
          }
        }
      }
      ans += det % mod + (a[i].ed - a[i].st) % mod * t % mod;
      ans %= mod;
    }
    cout << ans << endl;
  }
}
