#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
pair<int, int> p[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, d, a, b;
  cin >> n >> d >> a >> b;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    p[i].first = x * a + y * b;
    p[i].second = i;
  }
  sort(p, p + n);
  vector<int> ans;
  for (int i = 0; i < n; i++)
    if (d >= p[i].first) d -= p[i].first, ans.push_back(p[i].second);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] + 1 << " ";
  cout << endl;
  return 0;
}
