#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y;
  int z;
  int id;
  friend bool operator<(const node &a, const node &b) { return a.z < b.z; }
} a[100000 + 10];
int n, d;
int r, b;
int main() {
  scanf("%d%d%d%d", &n, &d, &r, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].x, &a[i].y);
    a[i].z = a[i].x * r + a[i].y * b;
    a[i].id = i;
  }
  sort(a + 1, a + n + 1);
  long long sum = 0;
  int max_num = -1;
  for (int i = 1; i <= n; i++) {
    sum += (long long)a[i].z;
    if (sum < 0) sum = d + 1;
    if (sum > (long long)d) {
      max_num = i - 1;
      break;
    }
  }
  if (max_num == -1) max_num = n;
  printf("%d\n", max_num);
  if (max_num == 0) return 0;
  for (int i = 1; i <= max_num - 1; i++) {
    printf("%d ", a[i].id);
  }
  printf("%d\n", a[max_num].id);
  return 0;
}
