#include <bits/stdc++.h>
using namespace std;
int a[1005], b[1005];
struct People {
  int id, h;
} ppl[1000];
struct Compare {
  bool operator()(const People& a, const People& b) const {
    return a.h > b.h || a.h == b.h && a.id < b.id;
  }
} cmp;
int t1, t2, k;
inline int func(int a, int b) { return t1 * a * (100 - k) + t2 * b * 100; }
int main() {
  int n;
  scanf("%d%d%d%d", &n, &t1, &t2, &k);
  for (int i = 1; i <= n; i++) scanf("%d%d", &a[i], &b[i]);
  for (int i = 1; i <= n; i++) {
    ppl[i].id = i;
    ppl[i].h = max(func(a[i], b[i]), func(b[i], a[i]));
  }
  sort(ppl + 1, ppl + 1 + n, cmp);
  for (int i = 1; i <= n; i++)
    printf("%d %d.%02d\n", ppl[i].id, ppl[i].h / 100, ppl[i].h % 100);
  return 0;
}
