#include <bits/stdc++.h>
using namespace std;
string tostring(int x) {
  ostringstream ss;
  ss << x;
  return ss.str();
}
string tostring(double x) {
  ostringstream ss;
  ss << setprecision(12) << x;
  return ss.str();
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, d, x, y, man = 0;
  unsigned long long counter = 0;
  cin >> n >> d >> x >> y;
  vector<pair<int, int> > v;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    v.push_back({a * x + b * y, i + 1});
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++)
    if (counter + v[i].first <= d) {
      counter += v[i].first;
      man++;
    }
  cout << man << "\n";
  for (int i = 0; i < man; i++) cout << v[i].second << " ";
  return 0;
}
