#include <bits/stdc++.h>
using namespace std;
struct Data {
  double a, b, ans;
  int idx, rank;
} data[200010];
int comp(Data a, Data b) { return a.ans > b.ans; }
double get(double speed, double t) { return speed * t; }
void Sort(Data t[], int n) {
  int i, j, k;
  for (i = n - 1; i > 0; i--) {
    for (j = 0; j < i; j++)
      if (t[j].ans < t[j + 1].ans) swap(t[j], t[j + 1]);
  }
}
int main() {
  int n, i;
  double a, b, t1, t2, k;
  while (cin >> n >> t1 >> t2 >> k) {
    k /= 100.0;
    for (i = 0; i < n; i++) {
      scanf("%lf%lf", &data[i].a, &data[i].b);
      data[i].idx = i;
      a = get(data[i].a, t1) * (1.0 - k) + get(data[i].b, t2);
      b = get(data[i].b, t1) * (1.0 - k) + get(data[i].a, t2);
      if (a > b)
        data[i].ans = a;
      else
        data[i].ans = b;
    }
    Sort(data, n);
    for (i = 0; i < n; i++) printf("%d %.2lf\n", data[i].idx + 1, data[i].ans);
  }
  return 0;
}
