#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, d;
  cin >> n >> d;
  int a, b;
  cin >> a >> b;
  vector<pair<long long, long long>> vec;
  int x, y;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    vec.push_back({a * x + b * y, i + 1});
  }
  sort(vec.begin(), vec.end());
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    if (vec[i].first <= d) {
      ans.push_back(vec[i].second);
      d -= vec[i].first;
    } else {
      break;
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
loop:
  while (t--) {
    solve();
  }
}
