#include <bits/stdc++.h>
using namespace std;
int n, t1, t2, k;
pair<int, int> res[100001];
bool cmp(pair<int, int> a, pair<int, int> b) {
  if (a.second == b.second) {
    return a.first < b.first;
  }
  return a.second > b.second;
}
int cal(int a, int b) { return a * t1 * (100 - k) + b * t2 * 100; }
int main() {
  ios_base ::sync_with_stdio(false);
  int i;
  cin >> n >> t1 >> t2 >> k;
  for (i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    res[i].first = i + 1;
    res[i].second = max(cal(a, b), cal(b, a));
  }
  sort(res, res + n, cmp);
  for (i = 0; i < n; i++) {
    printf("%d %.2f\n", res[i].first, (double)res[i].second / 100.0);
  }
  return 0;
}
