#include <bits/stdc++.h>
using namespace std;
bool comp(pair<float, int> a, pair<float, int> b) {
  if (a.first > b.first)
    return true;
  else if (a.first == b.first)
    return a.second < b.second;
  else
    return false;
}
inline istream& skip_endl(istream& is) {
  return is.ignore(numeric_limits<streamsize>::max(), '\n');
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  long double t1, t2, k, a, b, h1, h2;
  cin >> n >> t1 >> t2 >> k;
  vector<pair<long double, int>> heights;
  for (int i = 1; i <= n; i++) {
    cin >> a >> b;
    h1 = (a * t1) - (a * t1 * (k / 100.0)) + (b * t2);
    h2 = (b * t1) - (b * t1 * (k / 100.0)) + (a * t2);
    heights.push_back(make_pair(max(h1, h2), i));
  }
  sort(heights.begin(), heights.end(), comp);
  for (auto h : heights) {
    cout << fixed << setprecision(2) << h.second;
    cout << " " << h.first << "\n";
  }
  return 0;
}
