#include <bits/stdc++.h>
int mod = 1000000007;
const double pi = 3.141592653689793238460;
const int inf = 0x3f3f3f3f;
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool isd(double x) {
  string s = to_string(x);
  int n = s.length();
  bool ok = false;
  for (int i = n - 1; i >= n - 6; i--) {
    if (s[i] != '0') {
      ok = true;
      break;
    }
  }
  return ok;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, d;
  cin >> n >> d;
  int a, b;
  cin >> a >> b;
  int x[100005];
  int y[100005];
  for (int i = 0; i < n; i++) cin >> x[i], cin >> y[i];
  vector<pair<int, int>> v;
  for (int i = 0; i < n; i++) {
    int c = (x[i] * a + y[i] * b);
    v.push_back(make_pair(c, i + 1));
  }
  sort((v).begin(), (v).end());
  int cnt = 0;
  vector<int> ans;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    sum += (long long)v[i].first;
    if (sum > d) {
      break;
    }
    cnt++;
    ans.push_back(v[i].second);
  }
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) {
    cout << ans[i] << " ";
  }
}
