#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
long long mod = 1000000007;
vector<long long> gr[200001];
vector<long long> grev[200001];
long long a[200005];
void solve() {
  long long n, d, a, b;
  cin >> n >> d >> a >> b;
  vector<pair<long long, long long> > ans;
  for (long long i = int(0); i < int(n); i++) {
    long long x, y;
    cin >> x >> y;
    long long val = x * a + y * b;
    ans.push_back({val, i + 1});
  }
  sort(ans.begin(), ans.end());
  long long val = 0;
  vector<long long> ind;
  long long i = 0;
  for (i = 0; i < n; i++) {
    val += ans[i].first;
    if (val <= d)
      ind.push_back(ans[i].second);
    else
      break;
  }
  cout << i << "\n";
  for (long long i = int(0); i < int(ind.size()); i++) {
    cout << ind[i] << " ";
  }
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
