#include <bits/stdc++.h>
using namespace std;
struct client {
  long x, id;
  bool operator<(const client& rhs) const { return x < rhs.x; }
};
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long d;
  long n, a, b, x, y;
  cin >> n >> d >> a >> b;
  vector<client> v;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    v.push_back({x * a + y * b, i + 1});
  }
  vector<int> ans;
  sort(v.begin(), v.end());
  for (auto& x : v) {
    if (x.x <= d) {
      d -= x.x;
      ans.push_back(x.id);
    }
  }
  cout << ans.size() << '\n';
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << ' ';
  return 0;
}
