#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10, INFTY = 1e10;
int N, D;
vector<pair<long long, int> > v;
vector<int> res;
int main() {
  long long A, B;
  cin >> N >> D;
  cin >> A >> B;
  int x, y;
  for (int i = 0; i < N; i++) {
    scanf("%d %d", &x, &y);
    v.push_back(make_pair(A * x + B * y, i + 1));
  }
  sort(v.begin(), v.end());
  int idx = 0;
  while (idx < N && D >= v[idx].first) {
    res.push_back(v[idx].second);
    D -= v[idx].first;
    idx++;
  }
  cout << (int((res).size())) << "\n";
  for (int i = 0; i < (int((res).size())); i++) printf("%d ", res[i]);
  cout << "\n";
  return 0;
}
