#include <bits/stdc++.h>
using namespace std;
long long n, m, x, y, z, w, ans, t;
pair<long long, long long> p[300100];
int main() {
  cin >> n >> m;
  cin >> x >> y;
  for (int i = 0; i < n; i++) {
    cin >> z >> w;
    p[i].first = z * x + w * y;
    p[i].second = i + 1;
  }
  sort(p, p + n);
  x = n;
  for (int i = 0; i < n; i++) {
    m -= p[i].first;
    if (m < 0) {
      x = i;
      break;
    }
  }
  cout << x << endl;
  for (int i = 0; i < x; i++) cout << p[i].second << ' ';
  return 0;
}
