#include <bits/stdc++.h>
using namespace std;
int an[1];
int bn[100050];
class rp {
 public:
  int k;
  int x;
  int y;
  int t;
};
bool cmp(rp a, rp b) { return a.t < b.t; }
int main() {
  int n;
  long d;
  while (cin >> n >> d) {
    rp r[100050];
    memset(an, 0, sizeof(an));
    memset(bn, 0, sizeof(bn));
    int a, b;
    cin >> a >> b;
    for (int i = 0; i != n; i++) {
      r[i].k = i;
      cin >> r[i].x >> r[i].y;
      r[i].t = r[i].x * a + r[i].y * b;
    }
    sort(r, r + n, cmp);
    long long sum = 0;
    for (int i = 0; i != n; i++) {
      if (r[0].t <= d) {
        if ((sum + r[i].t) <= d) {
          sum += r[i].t;
          ++an[0];
          ++bn[i];
        } else
          break;
      } else
        break;
    }
    cout << an[0] << endl;
    if (an[0]) {
      int i;
      for (i = 0; i != n - 1; i++) {
        if (bn[i]) cout << r[i].k + 1 << " ";
      }
      if (i == n - 1 && bn[n - 1]) cout << r[n - 1].k + 1;
    }
    cout << endl;
  }
  return 0;
}
