#include <bits/stdc++.h>
using namespace std;
struct point {
  double d;
  int n;
} a[10000];
bool same(double a, double b) { return abs(a - b) < 0.01; }
bool small(point a, point b) {
  return a.d > b.d || (same(a.d, b.d) && a.n < b.n);
}
int main() {
  int n, t1, t2, k;
  cin >> n >> t1 >> t2 >> k;
  k = 100 - k;
  double kk = k / 100.0;
  for (int i = 0; i < n; i++) {
    a[i].n = i + 1;
    int j, k;
    scanf("%d%d", &j, &k);
    a[i].d = max(j * t1 * kk + k * t2, k * t1 * kk + j * t2);
  }
  sort(a, a + n, small);
  for (int i = 0; i < n; i++) {
    printf("%d %.2f\n", a[i].n, a[i].d);
  }
  n++;
}
