#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int n, d, a, b;
  vector<pair<int, int>> v;
  cin >> n >> d >> a >> b;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    v.push_back({a * x + b * y, i + 1});
  }
  sort(v.begin(), v.end());
  vector<int> ans;
  for (auto i : v) {
    if (i.first <= d) {
      d -= i.first;
      ans.push_back(i.second);
    } else
      break;
  }
  cout << ans.size() << '\n';
  for (auto i : ans) cout << i << " ";
}
