#include <bits/stdc++.h>
using namespace std;
int n, d, s, b;
vector<pair<int, int> > vc;
int main() {
  scanf("%d %d %d %d", &n, &d, &s, &b);
  for (int i = 1; i <= n; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    vc.push_back({x, y});
  }
  vector<pair<long long, int> > c;
  for (int i = 0; i < vc.size(); i++)
    c.push_back({vc[i].first * s + vc[i].second * b, i + 1});
  sort(c.begin(), c.end());
  vector<int> res;
  for (int i = 0; i < c.size(); i++) {
    if (d - c[i].first >= 0)
      res.push_back(c[i].second), d -= c[i].first;
    else
      break;
  }
  cout << res.size() << endl;
  for (auto &j : res) cout << j << " ";
  cout << endl;
  return 0;
}
