#include <bits/stdc++.h>
int const MAX = 1010;
struct Node {
  int num;
  double h;
} s[MAX];
int N, T1, T2, K;
int comp(void const *p, void const *q) {
  if ((*(Node *)p).h != (*(Node *)q).h)
    return (*(Node *)p).h < (*(Node *)q).h ? 1 : -1;
  else
    return (*(Node *)p).num > (*(Node *)q).num ? 1 : -1;
}
int main() {
  int a, b, i;
  double per, r;
  while (scanf("%d%d%d%d", &N, &T1, &T2, &K) != EOF) {
    per = K / 100.0;
    for (i = 0; i < N; i++) {
      scanf("%d%d", &a, &b);
      r = a * T1 - a * T1 * per + b * T2;
      if (r < b * T1 - b * T1 * per + a * T2)
        r = b * T1 - b * T1 * per + a * T2;
      s[i].num = i + 1;
      s[i].h = r;
    }
    qsort(s, N, sizeof s[0], comp);
    for (i = 0; i < N; i++) printf("%d %0.2f\n", s[i].num, s[i].h);
  }
  return 0;
}
