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