#include <bits/stdc++.h>
using namespace std;
int n, t1, t2, K;
pair<int, int> ans[1000];
int main(void) {
  scanf("%d %d %d %d", &n, &t1, &t2, &K);
  K = 100 - K;
  for (int i = 0; i < n; i++) {
    int data[2];
    scanf("%d %d", data, data + 1);
    int val = data[0] * t1 * K + data[1] * t2 * 100;
    val = max(val, data[1] * t1 * K + data[0] * t2 * 100);
    ans[i].first = val, ans[i].second = -(i + 1);
  }
  sort(ans, ans + n);
  for (int i = n - 1; i >= 0; i--)
    printf("%d %d.%02d\n", -ans[i].second, ans[i].first / 100,
           ans[i].first % 100);
  return 0;
}
