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