#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, d, a, b;
  cin >> n >> d >> a >> b;
  vector<pair<int, int> > v;
  for (int i = 0; i < n; i++) {
    int x, y, temp;
    cin >> x >> y;
    temp = a * x + b * y;
    v.push_back(make_pair(temp, i + 1));
  }
  sort(v.begin(), v.end());
  int cnt = 0;
  long long int sum = 0;
  vector<int> v1;
  for (int i = 0; i < n; i++) {
    sum += v[i].first;
    if (sum <= d) {
      cnt++;
      v1.push_back(v[i].second);
    }
    if (sum > d) {
      break;
    }
  }
  cout << cnt << "\n";
  if (cnt != 0) {
    for (int i = 0; i < v1.size(); i++) {
      cout << v1[i] << " ";
    }
  }
}
