#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t1, t2, k;
  cin >> n >> t1 >> t2 >> k;
  vector<pair<int, int> > a(n);
  for (int i = 0; i < n; i++) {
    int b, c;
    cin >> b >> c;
    a[i].first = -max(b * (100 - k) * t1 + c * t2 * 100,
                      c * (100 - k) * t1 + b * t2 * 100);
    a[i].second = i + 1;
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < n; i++)
    cout << a[i].second << " " << (-a[i].first) / 100 << '.'
         << ((-a[i].first) % 100) / 10 << ((-a[i].first) % 10) << endl;
  return 0;
}
