#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<double, int> a, pair<double, int> b) {
  if (a.first == b.first) return a.second < b.second;
  return a.first > b.first;
}
int main() {
  long long n, t1, t2;
  double k;
  cin >> n >> t1 >> t2 >> k;
  vector<pair<double, long long> > ns;
  for (int i = 0; i < n; ++i) {
    long long a, b;
    cin >> a >> b;
    ns.push_back({max((a * t1 * (1 - k / 100) + b * t2),
                      (b * t1 * (1 - k / 100) + a * t2)),
                  i + 1});
  }
  sort(ns.begin(), ns.end(), cmp);
  for (int j = 0; j < n; ++j) {
    cout << ns[j].second << " " << fixed << setprecision(2) << ns[j].first
         << endl;
  }
  return 0;
}
