#include <bits/stdc++.h>
using namespace std;
typedef struct client {
  int cost;
  int number;
} client;
bool cmp(client a, client b) { return a.cost < b.cost; }
int main() {
  int n, d, a, b, x, y;
  int i, j;
  scanf("%d%d%d%d", &n, &d, &a, &b);
  vector<client> memory(n);
  for (i = 0; i < n; i++) {
    scanf("%d%d", &x, &y);
    memory[i].cost = x * a + y * b;
    memory[i].number = i + 1;
  }
  sort(memory.begin(), memory.end(), cmp);
  for (i = 0; i < n; i++) {
    d -= memory[i].cost;
    if (d < 0) break;
  }
  i--;
  printf("%d\n", i + 1);
  for (j = 0; j < i; j++) {
    printf("%d ", memory[j].number);
  }
  if (i >= 0) printf("%d\n", memory[i].number);
  return 0;
}
