#include <bits/stdc++.h>
using namespace std;
int n;
float k;
vector<pair<double, int> > grower;
int main() {
  ios::sync_with_stdio(0);
  cin.tie();
  double t1, t2;
  cin >> n >> t1 >> t2 >> k;
  k /= 100;
  k = 1 - k;
  t1 *= k;
  if (t1 > t2) swap(t1, t2);
  for (int i = 0; i < n; i++) {
    double num1, num2;
    cin >> num1 >> num2;
    if (num1 > num2) swap(num1, num2);
    double r1 = (t1 * num1) + (t2 * (num2));
    grower.push_back(make_pair(-1 * r1, (i + 1)));
  }
  sort(grower.begin(), grower.end());
  vector<pair<double, int> >::iterator itr = grower.begin();
  for (; itr != grower.end(); itr++) {
    cout << fixed << setprecision(2) << itr->second << ' ' << -1 * itr->first
         << endl;
  }
  return 0;
}
