#include <bits/stdc++.h>
using namespace std;
int n, q, a[100005], b[100005], d[100005], e[100005], qa, qb, num;
struct abc {
  int x, y;
} c[100005];
bool cmp(const abc& u, const abc& v) { return u.x < v.x; }
int main() {
  scanf("%d%d", &n, &q);
  scanf("%d%d", &qa, &qb);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i], &b[i]);
    c[i].x = a[i] * qa + b[i] * qb;
    c[i].y = i;
  }
  int z = 1;
  sort(c + 1, c + 1 + n, cmp);
  while (q - c[z].x >= 0) {
    num++;
    e[z] = c[z].y;
    q = q - c[z].x;
    z++;
    if (z > n) break;
  }
  printf("%d\n", num);
  if (num > 0) {
    for (int i = 1; i < z - 1; i++) printf("%d ", e[i]);
    printf("%d\n", e[z - 1]);
  }
  return 0;
}
