#include <bits/stdc++.h>
using namespace std;
struct node {
  int index;
  int height;
  friend bool operator<(const node &a, const node &b) {
    if (a.height != b.height)
      return a.height > b.height;
    else
      return a.index < b.index;
  }
} srt[1111];
int n, t1, t2, kk;
int arr1[1111], arr2[1111];
int main() {
  scanf("%d%d%d%d", &n, &t1, &t2, &kk);
  for (int i = 1; i <= n; i++) scanf("%d%d", &arr1[i], &arr2[i]);
  for (int i = 1; i <= n; i++) {
    srt[i].index = i;
    srt[i].height = max(arr1[i] * t1 * (100 - kk) + arr2[i] * t2 * 100,
                        arr2[i] * t1 * (100 - kk) + arr1[i] * t2 * 100);
  }
  sort(srt + 1, srt + 1 + n);
  for (int i = 1; i <= n; i++) {
    printf("%d %.2f\n", srt[i].index, srt[i].height * 1.0 / 100.0);
  }
  return 0;
}
