#include <bits/stdc++.h>
using namespace std;
const int N = 1000000;
int i, fn, ans;
long long n, a, b, d, x, y;
pair<long long, int> f[N];
vector<int> A;
int main() {
  scanf("%I64d%I64d", &n, &d);
  scanf("%I64d%I64d", &a, &b);
  for (i = 0; i < n; i++) {
    scanf("%I64d%I64d", &x, &y);
    f[fn++] = make_pair(x * a + y * b, i + 1);
  }
  sort(f, f + fn);
  for (i = 0; i < fn; i++) {
    if (d - f[i].first < 0) break;
    ans++;
    d -= f[i].first;
    A.push_back(f[i].second);
  }
  printf("%d\n", ans);
  if (ans) printf("%d", A[0]);
  for (i = 1; i < ans; i++) printf(" %d", A[i]);
  printf("\n");
  return 0;
}
