#include <bits/stdc++.h>
int cmp(const void* a, const void* b) {
  if (((double*)a)[0] == ((double*)b)[0])
    return ((double*)a)[1] > ((double*)b)[1] ? 1 : -1;
  return ((double*)a)[0] > ((double*)b)[0] ? -1 : 1;
}
int main() {
  int i, n, t1, t2, tv1, tv2, k;
  double a[1000][2];
  while (scanf("%d%d%d%d", &n, &t1, &t2, &k) != EOF) {
    for (i = 0; i < n; i++) {
      scanf("%d%d", &tv1, &tv2);
      a[i][0] = tv1 * t1 * ((100 - k) / 100.0) + tv2 * t2 >
                        tv2 * t1 * ((100 - k) / 100.0) + tv1 * t2
                    ? tv1 * t1 * ((100 - k) / 100.0) + tv2 * t2
                    : tv2 * t1 * ((100 - k) / 100.0) + tv1 * t2;
      a[i][1] = i;
    }
    qsort(a, n, sizeof(a[0]), cmp);
    for (i = 0; i < n; i++) printf("%.lf %.2lf\n", a[i][1] + 1, a[i][0]);
  }
}
