#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
struct Client {
  int x, y, v, ind;
} c[100111];
bool operator<(const Client &a, const Client &b) { return a.v < b.v; }
int d, a, b, n;
int main() {
  scanf("%d%d", &n, &d);
  scanf("%d%d", &a, &b);
  for (int i = (1), _b = (n); i <= _b; i++) {
    scanf("%d%d", &c[i].x, &c[i].y);
    c[i].v = c[i].x * a + c[i].y * b;
    c[i].ind = i;
  }
  sort(c + 1, c + n + 1);
  int res = 0, now = 0;
  for (int i = (1), _b = (n); i <= _b; i++) {
    if (c[i].v <= d && now + c[i].v <= d) {
      ++res;
      now += c[i].v;
    } else
      break;
  }
  printf("%d\n", res);
  for (int i = (1), _b = (res); i <= _b; i++) printf("%d ", c[i].ind);
  puts("");
  return 0;
}
