#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
vector<int> ans;
int main() {
  int n, tot;
  scanf("%d %d", &n, &tot);
  v.reserve(n);
  ans.reserve(n);
  int a, b;
  scanf("%d %d", &a, &b);
  for (__typeof(n) i = 0; i < n; ++i) {
    int x, y;
    scanf("%d %d", &x, &y);
    v.emplace_back(x * a + y * b, i + 1);
  }
  sort(v.begin(), v.end());
  for (__typeof(n) i = 0; i < n; ++i)
    if (v[i].first > tot)
      break;
    else
      ans.emplace_back(v[i].second), tot -= v[i].first;
  printf("%d\n", ((int)((ans).size())));
  for (const auto &a : ans) printf("%d ", a);
  return 0;
}
