#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, h, m, k;
  cin >> n >> h >> m >> k;
  int i;
  vector<pair<int, int> > a;
  int x, y;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    a.push_back({y, i});
    if (y >= (m / 2))
      a.push_back({y - (m / 2), i});
    else
      a.push_back({y + (m / 2), i});
  }
  sort(a.begin(), a.end());
  int p = 0, st = 0, ans = -1, tim;
  for (i = n; i < (2 * n); i++) {
    p = 0;
    x = a[i].first - k;
    for (; st <= i; st++) {
      if (a[st].first > x) break;
    }
    x = i - st;
    if (ans == -1) {
      ans = x;
      tim = i;
    } else {
      if (ans > x) {
        ans = x;
        tim = i;
      }
    }
  }
  cout << ans << ' ' << a[tim].first - (m / 2) << endl;
  x = a[tim].first - k;
  for (i = 0; i < (2 * n); i++) {
    if (a[i].first > x) break;
  }
  for (; i < tim; i++) {
    cout << a[i].second + 1 << ' ';
  }
}
