#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t1, t2, a, b, k, c, d;
  pair<int, int> v[1000];
  std::cin >> n >> t1 >> t2 >> k;
  for (int i = 0; i < n; i++) {
    std::cin >> a >> b;
    c = a * t1 * (100 - k) + b * t2 * 100;
    d = b * t1 * (100 - k) + a * t2 * 100;
    if (c > d) {
      v[i] = make_pair(-c, i + 1);
    } else {
      v[i] = make_pair(-d, i + 1);
    }
  }
  sort(v, v + n);
  for (int i = 0; i < n; i++)
    printf("%d %.2lf\n", v[i].second, -0.01 * v[i].first);
  return 0;
}
