#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  long long int d, a, b, x, y;
  vector<pair<long long int, int> > clients;
  cin >> n >> d;
  cin >> a >> b;
  for (int i = 1; i <= n; i++) {
    cin >> x >> y;
    clients.push_back(make_pair(a * x + b * y, i));
  }
  long long int sum = 0;
  int i = 0;
  sort(clients.begin(), clients.end());
  while (i < n) {
    sum += clients[i].first;
    if (sum > d) break;
    i++;
  }
  cout << i << endl;
  for (int k = 0; k < i; k++) {
    cout << clients[k].second << " ";
  }
  cout << endl;
  return 0;
}
