#include <bits/stdc++.h>
using namespace std;
pair<int, int> arr[100010];
int main() {
  int n, d, a, b;
  cin >> n >> d >> a >> b;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    x *= a;
    y *= b;
    arr[i].first = x + y;
    arr[i].second = i + 1;
  }
  sort(arr, arr + n);
  vector<int> anw;
  for (int i = 0; i < n; i++) {
    d -= arr[i].first;
    if (d < 0) break;
    anw.push_back(arr[i].second);
  }
  cout << anw.size() << endl;
  for (int i = 0; i < anw.size(); i++) {
    if (i != 0) cout << " ";
    cout << anw[i];
  }
  cout << endl;
}
