#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, a, b, i, j, k;
  pair<int, int> p[100001];
  while (cin >> n >> d) {
    cin >> a >> b;
    for (i = 0; i < n; i++) {
      cin >> j >> k;
      p[i].first = a * j + k * b;
      p[i].second = i + 1;
    }
    sort(p, p + n);
    for (i = 0, j = d; i < n; i++) {
      j -= p[i].first;
      if (j < 0) break;
    }
    cout << i << endl;
    for (k = 0; k < i; k++) cout << p[k].second << " ";
    cout << endl;
  }
  return 0;
}
