#include <bits/stdc++.h>
using namespace std;
int dx[8] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy[8] = {1, -1, 0, -1, 1, 1, 0, -1};
int main() {
  ios::sync_with_stdio(false);
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, t1, t2, s1, s2;
  double k;
  cin >> n >> t1 >> t2 >> k;
  k = (100 - k);
  vector<pair<double, int>> v(n);
  for (int i = 0; i < n; i++) {
    cin >> s1 >> s2;
    v[i].first = max(k * s1 * t1 + s2 * t2 * 100, k * s2 * t1 + s1 * t2 * 100);
    v[i].second = i;
  }
  sort(((v).begin()), ((v).end()), [](pair<int, int> a, pair<int, int> b) {
    return (a.first > b.first || (a.first == b.first && a.second < b.second));
  });
  for (auto x : v)
    cout << x.second + 1 << " " << fixed << setprecision(2) << x.first / 100.0
         << endl;
  return 0;
}
