#include <bits/stdc++.h>
using namespace std;
struct zakaz {
  long long low;
  long long high;
  long long mem;
  int num;
};
inline bool comp(zakaz a, zakaz b) {
  if (a.mem < b.mem)
    return true;
  else
    return false;
}
int main() {
  int n;
  long long a, b, d;
  cin >> n >> d;
  cin >> a >> b;
  zakaz z[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> z[i].low >> z[i].high;
    z[i].mem = z[i].low * a + z[i].high * b;
    z[i].num = i;
  }
  sort(z + 1, z + n + 1, comp);
  int j = 0;
  while (d > 0) {
    d -= z[j + 1].mem;
    if (d >= 0) j++;
  }
  cout << j << endl;
  for (int i = 1; i <= j; i++) cout << z[i].num << " ";
  return 0;
}
