#include <bits/stdc++.h>
using namespace std;
int n, d, a, b;
struct person {
  int x, y, index;
  bool operator<(const person &t) const {
    return x * a + y * b < t.x * a + t.y * b;
  }
};
vector<int> ans;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> d >> a >> b;
  vector<person> arr(n);
  for (int i = 0; i < n; ++i) {
    cin >> arr[i].x >> arr[i].y;
    arr[i].index = i + 1;
  }
  sort(arr.begin(), arr.end());
  for (int i = 0; i < n; ++i) {
    d -= arr[i].x * a + arr[i].y * b;
    if (d >= 0)
      ans.push_back(arr[i].index);
    else
      break;
  }
  cout << ans.size() << '\n';
  for (int i = 0; i < ans.size(); ++i)
    cout << ans[i] << " \n"[i == ans.size() - 1];
}
