#include <bits/stdc++.h>
using namespace std;
int n, d, a, b, x, y, ans = 0;
pair<int, int> m[111111];
long long sum = 0;
int main() {
  scanf("%d%d%d%d", &n, &d, &a, &b);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &x, &y);
    m[i].first = a * x + b * y;
    m[i].second = i + 1;
  }
  sort(m, m + n);
  for (int i = 0; i < n; i++) {
    sum += m[i].first;
    if (sum > d) break;
    ans++;
  }
  printf("%d\n", ans);
  for (int i = 0; i < ans; i++) printf("%d ", m[i].second);
  return 0;
}
