#include <bits/stdc++.h>
using namespace std;
int t1, t2, n, k, a, b;
pair<double, int> ans[3000];
int main() {
  cin >> n >> t1 >> t2 >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> a >> b;
    double result1 = (1 - ((double)(k) / 100.0)) * (a * t1) + b * t2;
    double result2 = (1 - ((double)(k) / 100.0)) * (b * t1) + a * t2;
    ans[i] = make_pair(max(result1, result2), i);
  }
  for (int i = 1; i < n; ++i)
    for (int j = i + 1; j <= n; ++j)
      if (ans[i].first < ans[j].first)
        swap(ans[i], ans[j]);
      else if (ans[i].first == ans[j].first && ans[i].second > ans[j].second)
        swap(ans[i], ans[j]);
  for (int i = 1; i <= n; ++i) {
    cout << ans[i].second << ' ';
    printf("%.2f\n", ans[i].first);
  }
  return 0;
}
