#include <bits/stdc++.h>
using namespace std;
struct info {
  int val;
  int ind;
};
void out(int x) {
  cout << x / 100 << '.';
  if (x % 100 < 10) cout << '0';
  cout << x % 100;
}
bool cmp(const info &A, const info &B) {
  if (A.val < B.val)
    return true;
  else if (A.val > B.val)
    return false;
  else
    return A.ind > B.ind;
}
int main() {
  int n, t1, t2, k;
  cin >> n >> t1 >> t2 >> k;
  info *T = new info[n];
  int a, b;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    T[i].ind = i;
    T[i].val = max((100 * t2 * a) + ((100 - k) * t1 * b),
                   (100 * t2 * b) + ((100 - k) * t1 * a));
  }
  sort(T, T + n, cmp);
  for (int i = n - 1; i >= 0; i--) {
    cout << T[i].ind + 1 << ' ';
    out(T[i].val);
    cout << '\n';
  }
  delete[] T;
  return 0;
}
