#include <bits/stdc++.h>
using namespace std;
int f[1000007];
int main() {
  int n, t1, t2, k;
  cin >> n >> t1 >> t2 >> k;
  vector<pair<long long, int>> res;
  for (auto i = (1); i <= (n); ++i) {
    long long a, b;
    cin >> a >> b;
    long long ans = a * t1 * (100 - k) + b * t2 * 100LL;
    swap(a, b);
    ans = max(ans, a * t1 * (100 - k) + b * t2 * 100LL);
    res.emplace_back(ans, -i);
  }
  sort(res.rbegin(), res.rend());
  for (auto i = (0); i <= ((int)res.size() - 1); ++i) {
    cout << -res[i].second << " ";
    printf("%.2f\n", res[i].first / 100.);
  }
  return 0;
}
