#include <bits/stdc++.h>
using namespace std;
double max(double a, double b) {
  if (a > b) return a;
  return b;
}
struct p {
  double s;
  int id;
};
bool operator<(p a, p b) {
  if (a.s == b.s) return a.id > b.id;
  return a.s < b.s;
}
p res[1001];
int t1, t2, k, n, i;
double a, b;
int main() {
  scanf("%d %d %d %d", &n, &t1, &t2, &k);
  for (i = 1; i <= n; i++) {
    scanf("%lf %lf", &a, &b);
    res[i].id = i;
    res[i].s = max(t1 * a * (100 - k) / 100. + t2 * b,
                   t1 * b * (100 - k) / 100. + t2 * a);
  }
  sort(res + 1, res + n + 1);
  for (i = n; i >= 1; i--) printf("%d %.2lf\n", res[i].id, res[i].s + 0.0005);
  printf("\n");
  return 0;
}
