#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
vector<pair<double, int> > ans;
int c[1000], d[1000];
int main() {
  int n, t1, t2, k;
  cin >> n >> t1 >> t2 >> k;
  double s1 = t1 * (100.0 - k) / 100, s2 = t2;
  if (s1 > s2) swap(s1, s2);
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    if (a > b) swap(a, b);
    c[i] = a;
    d[i] = b;
  }
  for (int i = n - 1; i >= 0; i--) {
    ans.push_back(make_pair(-(c[i] * s1 + d[i] * s2), i + 1));
  }
  sort(ans.begin(), ans.end());
  for (int i = 0; i < n; i++) {
    printf("%d %0.2f\n", ans[i].second, -ans[i].first);
  }
  return 0;
}
