#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n = 0, d = 0, a = 0, b = 0, x = 0, y = 0;
  priority_queue<pair<long long, long long>, vector<pair<long long, long long>>,
                 greater<pair<long long, long long>>>
      pq;
  vector<int> v;
  cin >> n >> d;
  cin >> a >> b;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    long long val = (x * a) + (y * b);
    pq.push(make_pair(val, i));
  }
  while (pq.size()) {
    long long val = pq.top().first, indx = pq.top().second;
    pq.pop();
    if (d >= val)
      v.push_back(indx), d -= val;
    else
      break;
  }
  cout << v.size() << "\n";
  for (auto i : v) cout << i + 1 << " ";
  return 0;
}
