#include <bits/stdc++.h>
using namespace std;
const int oo = numeric_limits<int>::max();
int main() {
  long long int N, T1, T2, K;
  cin >> N >> T1 >> T2 >> K;
  vector<pair<double, int> > vec;
  for (int i = 0; i < (int)(N); ++i) {
    long long int a, b;
    cin >> a >> b;
    long long int m = a * T1 * (100 - K) + b * T2 * 100;
    long long int n = b * T1 * (100 - K) + a * T2 * 100;
    vec.push_back(make_pair(-(double)max(m, n) / 100, i + 1));
  }
  sort(vec.begin(), vec.end());
  for (int i = 0; i < (int)(vec.size()); ++i) {
    printf("%d %.2f\n", vec[i].second, -vec[i].first);
  }
}
