#include <bits/stdc++.h>
using namespace std;
struct node {
  long long int x;
  long long int y;
  long long int z;
} cam[100002];
bool comp(node a, node b) { return a.x + a.y < b.x + b.y; }
int main() {
  long long int a, b, c, d, e, i, j, p, q, sum = 0;
  long long int x[100002];
  cin >> a >> b;
  cin >> c >> d;
  for (i = 0; i < a; i++) {
    cin >> p >> q;
    cam[i].x = p * c;
    cam[i].y = q * d;
    cam[i].z = i + 1;
  }
  sort(cam, cam + a, comp);
  for (i = 0; i < a; i++) {
    e = cam[i].x + cam[i].y;
    if (e <= b) {
      x[sum] = cam[i].z;
      sum++;
      b = b - e;
    }
    if (b < 0) break;
  }
  cout << sum << endl;
  for (i = 0; i < sum; i++) {
    cout << x[i] << " ";
  }
  return 0;
}
