#include <bits/stdc++.h>
using namespace std;
int TC, N, t, size;
vector<int> bitstr;
bool pairCompare(pair<int, int> firstElem, pair<int, int> secondElem) {
  return firstElem.second < secondElem.second;
}
int main() {
  int n, d, a, b;
  cin >> n >> d;
  cin >> a >> b;
  vector<pair<int, int> > size(n);
  pair<int, int> sizeArray[n];
  for (int i = 0; i < (n); i++) {
    int xi, yi;
    cin >> xi >> yi;
    size[i] = make_pair(i + 1, xi * a + yi * b);
    sizeArray[i] = make_pair(i + 1, xi * a + yi * b);
  }
  sort(size.begin(), size.end(), pairCompare);
  sort(sizeArray, sizeArray + n, pairCompare);
  long long sum = 0;
  int cur = 0;
  stringstream ss;
  ss.str("");
  while (sum + sizeArray[cur].second <= d && cur < n) {
    sum += sizeArray[cur].second;
    if (cur == 0)
      ss << sizeArray[cur].first;
    else
      ss << " " << sizeArray[cur].first;
    cur++;
  }
  cout << cur << "\n";
  cout << ss.str();
}
