#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, d;
  cin >> n >> d;
  long long a, b;
  cin >> a >> b;
  vector<pair<long long, int>> v;
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    v.push_back({x * a + y * b, i});
  }
  sort(v.begin(), v.end());
  long long sum = 0;
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    sum += v[i].first;
    if (sum > d) break;
    ans.push_back(v[i].second);
  }
  cout << ans.size() << endl;
  for (auto x : ans) cout << x + 1 << " ";
}
