#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long a, b, d;
  int n, temp, i, x, y, cnt;
  scanf("%d%d", &n, &temp);
  scanf("%d%d", &x, &y);
  a = x;
  b = y;
  d = temp;
  vector<pair<unsigned long long, int> > vals(n);
  for (i = 0; i < n; i++) {
    scanf("%d%d", &x, &y);
    temp = x * a + y * b;
    vals[i] = make_pair(temp, i + 1);
  }
  sort(vals.begin(), vals.end());
  cnt = 0;
  i = 0;
  temp = 0;
  while (i < n && temp + vals[i].first <= d) {
    temp += vals[i].first;
    i++;
  }
  cnt = i;
  printf("%d\n", cnt);
  for (i = 0; i < cnt; i++) printf("%d ", vals[i].second);
  printf("\n");
}
