#include <bits/stdc++.h>
using namespace std;
struct node {
  int num;
  double w;
} point[1005];
bool cmp(node a, node b) {
  if (fabs(a.w - b.w) < 0.0001) return a.num < b.num;
  return a.w > b.w;
}
int main() {
  int i, n, t1, t2, k, a, b;
  scanf("%d%d%d%d", &n, &t1, &t2, &k);
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &a, &b);
    point[i].num = i;
    point[i].w = t1 * a * (1 - k * 0.01) + t2 * b;
    if (t1 * b * (1 - k * 0.01) + t2 * a > point[i].w)
      point[i].w = t1 * b * (1 - k * 0.01) + t2 * a;
  }
  sort(point + 1, point + 1 + n, cmp);
  for (i = 1; i <= n; i++) printf("%d %.2lf\n", point[i].num, point[i].w);
  return 0;
}
