#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d;
  int a, b;
  int x, y;
  int ans = 0;
  multimap<int, int> mm;
  cin >> n >> d;
  cin >> a >> b;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    mm.insert(pair<int, int>(x * a + y * b, i + 1));
  }
  vector<int> vals;
  multimap<int, int>::iterator it;
  for (it = mm.begin(); it != mm.end() && d - it->first >= 0; it++, ans++) {
    d -= it->first;
    vals.push_back(it->second);
  }
  cout << ans << "\n";
  for (int i = 0; i < vals.size(); i++) cout << vals[i] << " ";
  cout << "\n";
  return 0;
}
