#include <bits/stdc++.h>
using namespace std;
bool fun(pair<double, long long> x, pair<double, long long> y) {
  if (x.first > y.first) {
    return true;
  } else if (x.first < y.first) {
    return false;
  } else {
    return x.second < y.second;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, t1, t2, k;
  long long a, b;
  cin >> n >> t1 >> t2 >> k;
  vector<pair<long long, long long>> z;
  k = 100 - k;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    z.push_back(make_pair(min(a, b), max(a, b)));
  }
  vector<pair<double, long long>> d;
  for (int i = 0; i < n; i++) {
    long long x = z[i].first, y = z[i].second;
    double f = (float(x) * float(t1) * (float(k) / 100)) + float(y) * float(t2);
    double s = (float(y) * float(t1) * (float(k) / 100)) + float(x) * float(t2);
    d.push_back(make_pair(max(f, s), i + 1));
  }
  sort(d.begin(), d.end(), fun);
  for (int i = 0; i < n; i++) {
    cout << fixed << setprecision(2) << d[i].second << " " << d[i].first
         << endl;
  }
  return 0;
}
