#include <bits/stdc++.h>
using namespace std;
struct client {
  int n_c;
  int track;
};
bool cmp(client x, client y) { return (x.n_c < y.n_c); }
int main() {
  long long n, d, a, b, x, y, t = 0, i = 0;
  scanf("%lld%lld%lld%lld", &n, &d, &a, &b);
  client ct[n + 2];
  for (int j = 0; j < n; j++) {
    scanf("%lld%lld", &x, &y);
    ct[j].n_c = x * a + y * b;
    ct[j].track = j + 1;
  }
  sort(ct, ct + n, cmp);
  for (i = 0; t <= d && i <= n; i++) t += ct[i].n_c;
  printf("%lli\n", --i);
  for (int j = 0; j < i; j++) printf("%d ", ct[j].track);
  return 0;
}
