#include <bits/stdc++.h>
using namespace std;
struct info {
  long long val;
  int pos;
};
bool my(info a, info b) { return a.val < b.val; }
int main() {
  long long n, d;
  cin >> n >> d;
  long long a, b;
  cin >> a >> b;
  vector<info> lis;
  for (int i = 1; i <= n; i++) {
    long long x, y;
    cin >> x >> y;
    info temp;
    temp.val = x * a + y * b;
    temp.pos = i;
    lis.push_back(temp);
  }
  sort(lis.begin(), lis.end(), my);
  long long total = 0;
  vector<int> res;
  for (int i = 0; i < lis.size(); i++) {
    info temp = lis[i];
    if (total + temp.val <= d) {
      res.push_back(temp.pos);
      total = total + temp.val;
    } else
      break;
  }
  cout << res.size() << endl;
  int len = res.size();
  for (int i = 0; i < len; i++) {
    if (i != 0) cout << " ";
    cout << res[i];
  }
}
