#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
int in() {
  int a;
  scanf("%d", &a);
  return a;
}
double din() {
  double a;
  scanf("%lf", &a);
  return a;
}
long long gcd(long long a, long long b) {
  if (!b)
    return a;
  else
    return gcd(b, a % b);
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int main() {
  int n = in(), d = in(), a = in(), b = in(), res = 0;
  pair<int, int> c[100005];
  int ans[100005];
  for (int i = 0; i < n; ++i) {
    int x = in(), y = in();
    c[i].first = x * a + y * b;
    c[i].second = i + 1;
  }
  sort(c, c + n);
  for (int i = 0; i < n; ++i) {
    d -= c[i].first;
    if (d < 0) {
      break;
    }
    ans[i] = c[i].second;
    ++res;
  }
  printf("%d\n", res);
  for (int i = 0; i < res; ++i) {
    printf("%d ", ans[i]);
  }
  printf("\n");
  return 0;
}
