#include <bits/stdc++.h>
using namespace std;
int n, d, a, b, x, y, i, m, k;
pair<int, int> w[1000001];
int main() {
  cin >> n >> d >> a >> b;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    w[i].first = x * a + y * b;
    w[i].second = i + 1;
  }
  sort(w, w + n);
  for (i = 0; i < n; i++) {
    d = d - w[i].first;
    if (d < 0) break;
  }
  cout << i << endl;
  for (k = 0; k < i; k++) cout << w[k].second << " ";
}
