#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 3;
const int M = 1e8;
long long int powM(long long int b, int p) {
  long long int r = 1;
  for (; p; b = b * b % M, p /= 2)
    if (p & 1) r = r * b % M;
  return r;
}
vector<int> fact(int n) {
  vector<int> v;
  for (int i = 1; i <= sqrt(n); ++i) {
    if (n % i == 0) {
      v.push_back(i);
      if (i * i != n) v.push_back(n / i);
    }
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  return v;
}
long long int div(long long int n) {
  int d[1000001] = {0};
  for (int i = 1; i <= 1000000; i++)
    for (int j = i; j <= 1000000; j += i) d[j]++;
  return d[n];
}
long long int dist(pair<long long int, long long int> a,
                   pair<long long int, long long int> b) {
  return (a.first - b.first) * (a.first - b.first) +
         (a.second - b.second) * (a.second - b.second);
}
void solve() {
  long long int n, d;
  cin >> n >> d;
  long long int a, b, x, y;
  cin >> a >> b;
  std::vector<long long int> ans;
  std::vector<pair<long long int, long long int>> v(n);
  for (int i = 0; i < n; ++i) {
    cin >> x >> y;
    v[i] = {x * a + y * b, i + 1};
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < n; ++i) {
    if (d >= v[i].first) d -= v[i].first, ans.push_back(v[i].second);
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  solve();
  cout << "\n";
  return 0;
}
