#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
int main(int argc, const char* argv[]) {
  int n, t1, t2, k;
  cin >> n >> t1 >> t2 >> k;
  k = 100 - k;
  for (int i = 0; i < n; ++i) {
    int a, b;
    cin >> a >> b;
    int j = max(t1 * a * k + t2 * b * 100, t1 * b * k + t2 * a * 100);
    v.push_back(pair<int, int>(j, n - i));
  }
  sort(v.begin(), v.end());
  for (int i = (int)v.size() - 1; i >= 0; --i) {
    cout << n - v[i].second + 1 << ' ';
    cout.precision(2);
    cout << fixed << v[i].first / 100.0 << '\n';
  }
  return 0;
}
