#include <bits/stdc++.h>
using namespace std;
struct dwarf {
  int num;
  int high;
};
int cmp(const void *a, const void *b) {
  if (((struct dwarf *)a)->high > ((struct dwarf *)b)->high)
    return 1;
  else {
    if (((struct dwarf *)a)->high < ((struct dwarf *)b)->high)
      return -1;
    else {
      if (((struct dwarf *)a)->num < ((struct dwarf *)b)->num)
        return 1;
      else
        return -1;
    }
  }
}
int main() {
  int n, i, k;
  int t1, t2, b, c;
  struct dwarf a[1010];
  scanf("%d%d%d%d", &n, &t1, &t2, &k);
  t1 = t1 * (100 - k);
  t2 *= 100;
  if (t1 > t2) {
    b = t1;
    t1 = t2;
    t2 = b;
  }
  for (i = 1; i <= n; i++) {
    a[i].num = i;
    scanf("%d%d", &b, &c);
    if (b > c)
      a[i].high = t1 * c + t2 * b;
    else
      a[i].high = t1 * b + t2 * c;
  }
  qsort(&a[1], n, sizeof(struct dwarf), &cmp);
  for (i = n; i > 0; i--) {
    printf("%d %d.", a[i].num, a[i].high / 100);
    if (a[i].high % 100 >= 10)
      printf("%d\n", a[i].high % 100);
    else
      printf("0%d\n", a[i].high % 100);
  }
  return 0;
}
