#include <bits/stdc++.h>
long long int power(long long int x, long long int b) {
  long long int p = 1;
  while (b > 0) {
    if (b & 1) {
      p = p * x;
      p %= 1000000007;
    }
    b >>= 1;
    x *= x;
    x %= 1000000007;
  }
  return p % 1000000007;
}
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, d;
  cin >> n >> d;
  long long int a, b;
  cin >> a >> b;
  set<pair<long long int, long long int> > s;
  for (long long int i = 0; i < n; i++) {
    long long int x, y;
    cin >> x >> y;
    s.insert(make_pair(a * x + b * y, i + 1));
  }
  vector<long long int> ans;
  for (auto i : s) {
    if (i.first <= d) {
      d -= i.first;
      ans.push_back(i.second);
    }
    if (d <= 0) break;
  }
  cout << ans.size() << "\n";
  for (auto i : ans) {
    cout << i << " ";
  }
  return 0;
}
