#include <bits/stdc++.h>
using namespace std;
int plow, phigh;
struct node {
  int slow, shigh, snum;
};
bool cmp(node a, node b) {
  return (((a.slow * plow) + (a.shigh * phigh)) <
          ((b.slow * plow) + (b.shigh * phigh)));
}
node nodes[100003];
int selected[100003];
int main() {
  int clients, pmemory, tcount = 0;
  scanf("%d%d", &clients, &pmemory);
  scanf("%d%d", &plow, &phigh);
  for (int i = 1; i <= clients; i++) {
    scanf("%d %d", &nodes[i].slow, &nodes[i].shigh);
    nodes[i].snum = i;
  }
  sort(nodes + 1, nodes + clients + 1, cmp);
  for (int i = 1; i <= clients; i++) {
    if ((pmemory - ((nodes[i].slow * plow) + (nodes[i].shigh * phigh))) < 0)
      break;
    else {
      pmemory -= ((nodes[i].slow * plow) + (nodes[i].shigh * phigh));
      selected[tcount] = nodes[i].snum;
      tcount++;
    }
  }
  printf("%d\n", tcount);
  for (int i = 0; i < tcount; i++) printf("%d ", selected[i]);
  if (tcount > 0) printf("\n");
}
