#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, num;
} s[100009];
int mark[100009];
int cmp(node a, node b) { return a.x < b.x; }
int main() {
  int n, m;
  while (scanf("%d %d", &n, &m) == 2) {
    int l, h;
    scanf("%d %d", &l, &h);
    for (int i = 0; i < n; i++) {
      int a, b;
      scanf("%d %d", &a, &b);
      s[i].x = a * l + b * h;
      s[i].num = i + 1;
    }
    sort(s, s + n, cmp);
    int ans = 0;
    int k = 0;
    for (int i = 0; i < n; i++) {
      m -= s[i].x;
      if (m < 0) break;
      ans++;
      mark[k++] = s[i].num;
    }
    printf("%d\n", ans);
    for (int i = 0; i < ans; i++) {
      if (i == 0)
        printf("%d", mark[i]);
      else
        printf(" %d", mark[i]);
    }
    printf("\n");
  }
  return 0;
}
