#include <bits/stdc++.h>
using namespace std;
pair<long, long> num[100200];
int main() {
  long long n, k, c, d, k1, k2, count = 0, sum = 0;
  cin >> n >> k >> k1 >> k2;
  for (long i = 0; i < n; i++) {
    cin >> c >> d;
    num[i].first = c * k1 + d * k2;
    num[i].second = i;
  }
  sort(num, num + n);
  for (long i = 0; i < n; i++) {
    sum += num[i].first;
    if (sum <= k) {
      count++;
    }
  }
  cout << count << endl;
  for (long i = 0; i < count; i++) {
    cout << num[i].second + 1 << " ";
  }
}
