#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9 + 5;
const long long LINF = (long long)1e18 + 5;
void solve() {
  int n, d;
  cin >> n >> d;
  int a, b;
  cin >> a >> b;
  multimap<int, int> clients;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    clients.emplace(x * a + y * b, i);
  }
  vector<int> to_serve;
  for (auto &&client : clients) {
    int index = client.second;
    int cost = client.first;
    if (d - cost < 0) {
      break;
    }
    d -= cost;
    to_serve.emplace_back(index);
  }
  cout << to_serve.size() << endl;
  for (auto &&item : to_serve) {
    cout << item + 1 << " ";
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
  return 0;
}
