#include <bits/stdc++.h>
using namespace std;
bool fun(pair<int, double> p1, pair<int, double> p2) {
  if (p1.second != p2.second) {
    return p1.second > p2.second;
  }
  return p1.first < p2.first;
}
int main() {
  int n, t1, t2, x;
  cin >> n >> t1 >> t2 >> x;
  pair<int, int>* arr = new pair<int, int>[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i].first;
    cin >> arr[i].second;
  }
  vector<pair<int, double>> vec;
  for (int i = 0; i < n; i++) {
    int a = arr[i].first;
    int b = arr[i].second;
    double ans1 = t1 * a * 1.0 - (x * t1 * a * 1.0) / 100 + t2 * 1.0 * b;
    double ans2 = t1 * b * 1.0 - (x * t1 * b * 1.0) / 100 + t2 * 1.0 * a;
    if (ans1 >= ans2) {
      pair<int, double> p = make_pair(i + 1, ans1);
      vec.push_back(p);
    } else {
      pair<int, double> p = make_pair(i + 1, ans2);
      vec.push_back(p);
    }
  }
  sort(vec.begin(), vec.end(), fun);
  for (int i = 0; i < vec.size(); i++) {
    cout << vec[i].first << " ";
    cout << fixed << setprecision(2) << vec[i].second << endl;
  }
  return 0;
}
