#include <bits/stdc++.h>
using namespace std;
template <class A, class B>
ostream& operator<<(ostream& o, const pair<A, B>& p) {
  return o << "(" << p.first << ", " << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& v) {
  o << "[";
  for (__typeof((v).end()) it = (v).begin(); it != (v).end(); ++it)
    o << *it << ", ";
  return o << "]";
}
template <class T>
ostream& operator<<(ostream& o, const set<T>& v) {
  o << "[";
  for (__typeof((v).end()) it = (v).begin(); it != (v).end(); ++it)
    o << *it << ", ";
  return o << "]";
}
template <class T>
inline void MAX(T& a, T b) {
  if (a < b) a = b;
}
template <class T>
inline void MIN(T& a, T b) {
  if (a > b) a = b;
}
template <class T>
inline bool read(T& x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
bool comp(pair<int, double> a, pair<int, double> b) {
  if (a.second > b.second) {
    return true;
  } else if (a.second == b.second) {
    if (a.first < b.first) {
      return true;
    } else {
      return false;
    }
  } else
    return false;
}
int main() {
  int n, t1, t2, k;
  cin >> n >> t1 >> t2 >> k;
  vector<pair<int, double>> v;
  for (int i = 1; i <= n; i++) {
    double a, b;
    cin >> a >> b;
    double ans1;
    double d1 = (t1 * a) * k / 100.00;
    ans1 = (t1 * a) - d1;
    ans1 += (t2 * b);
    double ans2;
    double d2 = (t1 * b) * k / 100.00;
    ans2 = (t1 * b) - d2;
    ans2 += (t2 * a);
    v.push_back({i, max(ans1, ans2)});
  }
  sort(v.begin(), v.end(), comp);
  for (int i = 0; i < (int)v.size(); i++) {
    cout << v[i].first << " " << fixed << setprecision(2) << v[i].second
         << '\n';
  }
}
