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