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