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