#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int n, t1, t2, k;
  cin >> n >> t1 >> t2 >> k;
  vector<int> a(n), b(n);
  vector<pair<int, int> > growth(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    int g = max(a[i] * t1 * (100 - k) + b[i] * t2 * 100,
                b[i] * t1 * (100 - k) + a[i] * t2 * 100);
    growth[i].first = -g;
    growth[i].second = i + 1;
  }
  sort(growth.begin(), growth.end(), less<pair<int, int> >());
  for (int i = 0; i < n; i++) {
    int g = -growth[i].first;
    int r = g % 100;
    printf("%d %d.%02d\n", growth[i].second, (g - r) / 100, r);
  }
  return 0;
}
