#include <bits/stdc++.h>
using namespace std;
template <typename X>
inline X sqr(const X& a) {
  return a * a;
}
int nxt() {
  int x;
  cin >> x;
  return x;
}
bool comp(pair<long double, int> a, pair<long double, int> b) {
  return a.first < b.first || a.first == b.first && a.second > b.second;
}
int main() {
  int n, t1, t2, k;
  cin >> n >> t1 >> t2 >> k;
  vector<pair<long double, int>> ans;
  for (int i = 0; i < int(n); ++i) {
    int a = nxt(), b = nxt();
    long double ans1 = (a * t1 * (100 - k) / 100.0) + b * t2,
                ans2 = (b * t1 * (100 - k) / 100.0) + a * t2;
    ans.push_back({max(ans1, ans2), i + 1});
  }
  sort(ans.rbegin(), ans.rend(), comp);
  for (int i = 0; i < int(n); ++i) {
    cout << ans[i].second << ' ' << fixed << setprecision(2) << ans[i].first
         << '\n';
  }
  return 0;
}
