#include <bits/stdc++.h>
using namespace std;
struct S {
  int sum, i;
};
S s[100005];
int n, d, a, b, x, y;
int cmp(S x, S y) { return x.sum < y.sum; }
int main() {
  int i;
  scanf("%d%d%d%d", &n, &d, &a, &b);
  for (i = 0; i < n; i++) {
    scanf("%d%d", &x, &y);
    s[i].i = i + 1;
    s[i].sum = x * a + y * b;
  }
  sort(s, s + n, cmp);
  i = 0;
  int ans = 0;
  while (d - s[i].sum >= 0 && i < n) {
    d -= s[i++].sum;
    ans++;
  }
  printf("%d\n", ans);
  for (i = 0; i < ans; i++) {
    printf("%d", s[i].i);
    if (i != ans - 1) printf(" ");
  }
  printf("\n");
  return 0;
}
