#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <math.h>
#include <conio.h>
#include <utility>
#include <set>
#include <time.h>
#include <list>
#include <typeinfo>
#include <cstdio>
#include <numeric>
#include <limits>
#include <functional>
using namespace std;
#define X first
#define Y second
#define PI 3.1415926535897932384626433832795
#define PI2 PI * 2
#define sqr(x) ((x)*(x))
#define all(n) (n).begin(), (n).end()
typedef long long LL;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef pair<double, double> pdd;
typedef vector<pdd> vpdd;
typedef pair<float, float> pff;
const int MOD = (int)1e9 + 7;
typedef double real;

void load(int k = 1) {
	if (k == 1)	{
#ifndef ONLINE_JUDGE
		freopen("in", "r", stdin);
		freopen("out", "w", stdout);
#endif
	} else {
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	}
}

const int N = (int)1e5 + 10;
const int M = 100;

void solve() {
	int n, t1, t2, k, a, b;
	scanf("%d %d %d %d", &n, &t1, &t2, &k);
	k = 100 - k;
	vector<pair<int, int>> r;
	for (int i = 0; i < n; ++i) {
		scanf("%d %d", &a, &b);
		int res = max(a * t1 * k + b * t2 * 100,
					  b * t1 * k + a * t2 * 100);
		r.push_back(make_pair(-res, i + 1));
	}
	sort(all(r));
	for (int i = 0; i < (int)r.size(); ++i) {
		int s = -r[i].X;
		printf("%d %d.%02d\n", r[i].Y, s / 100, s % 100);
	}
}

void solve2() {

}

#define TIME_CHECK

int main() {
#ifndef ONLINE_JUDGE
#ifdef TIME_CHECK
	double c1 = clock();
#endif
#endif

	load();
	solve();

#ifndef ONLINE_JUDGE
#ifdef TIME_CHECK
	double c2 = clock();
	cout << endl << "time: " << (c2 - c1) / (CLOCKS_PER_SEC / 1000);
#endif
#endif
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <math.h>
#include <conio.h>
#include <utility>
#include <set>
#include <time.h>
#include <list>
#include <typeinfo>
#include <cstdio>
#include <numeric>
#include <limits>
#include <functional>
using namespace std;
#define X first
#define Y second
#define PI 3.1415926535897932384626433832795
#define PI2 PI * 2
#define sqr(x) ((x)*(x))
#define all(n) (n).begin(), (n).end()
typedef long long LL;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef pair<double, double> pdd;
typedef vector<pdd> vpdd;
typedef pair<float, float> pff;
const int MOD = (int)1e9 + 7;
typedef double real;

void load(int k = 1) {
	if (k == 1)	{
#ifndef ONLINE_JUDGE
		freopen("in", "r", stdin);
		freopen("out", "w", stdout);
#endif
	} else {
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	}
}

const int N = (int)1e5 + 10;
const int M = 100;
int A[M][M];

typedef pair<int, float> pp;

bool MyFunc(pp p1, pp p2) {
	if (p1.second == p2.second) {
		return p1.first > p2.first;
	} else {
		return p1.second > p2.second;
	}
}

void solve() {
	int n;
	float t1, t2, k1;
	cin >> n >> t1 >> t2 >> k1;
	k1 = 100 - k1;
	float k = k1 / 100.0f;
	vector<pp> r;
	for (int i = 0; i < n; ++i) {
		float a, b;
		cin >> a >> b;
		float res = -1;
		float sum1 = a * t1 * k + b * t2;
		float sum2 = b * t1 * k + a * t2;
		res = max(sum1, sum2);
		r.push_back(make_pair(i + 1, res));
	}
	sort(all(r), MyFunc);
	cout.precision(2);
	cout.setf(ios::fixed);
	for (int i = 0; i < r.size(); ++i) {
		cout << r[i].X << " " << r[i].Y << endl;
	}
}

void solve2() {

}

#define TIME_CHECK

int main() {
#ifndef ONLINE_JUDGE
#ifdef TIME_CHECK
	double c1 = clock();
#endif
#endif

	load();
	solve();

#ifndef ONLINE_JUDGE
#ifdef TIME_CHECK
	double c2 = clock();
	cout << endl << "time: " << (c2 - c1) / (CLOCKS_PER_SEC / 1000);
#endif
#endif
	return 0;
}


#include <iostream>
#include <vector>
#include <iomanip>
#include <algorithm>
using namespace std;
int main() {
    int n;
    cin >> n;
    double t1, t2, k;
    cin >> t1 >> t2 >> k;
    vector<pair<double, int> > A(n);
    for (int i = 0; i < n; i++) {
        double a, b;
        cin >> a >> b;
        A[i] = make_pair(-max(a * t1 * (100 - k) / 100 + b * t2, b * t1 * (100 - k) / 100 + a * t2), i + 1);
    }
    sort(A.begin(), A.end());
    for (int i = 0; i < n; i++) {
        cout << A[i].second << ' ' << fixed << setprecision(2) << -A[i].first << endl;
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <iomanip>
#include <algorithm>
using namespace std;
int main() {
    int n;
    cin >> n;
    double t1, t2, k;
    cin >> t1 >> t2 >> k;
    vector<pair<double, int> > A(n);
    for (int i = 0; i < n; i++) {
        double a, b;
        cin >> a >> b;
        A[i] = make_pair(-max(a * t1 * (100 - k) / 100 + b * t2, b * t1 * (100 - k) / 100 + a * t2), i + 1);
    }
    sort(A.begin(), A.end());
    for (int i = 0; i < n; i++) {
        cout << A[i].second << ' ' << -A[i].first << endl;
    }
    return 0;
}


#include <stdio.h>
#include <set>
#include <vector>
#include <string>
#include <iostream>

using namespace std;

int const MAX_N=1001;
int a[MAX_N];
int b[MAX_N];
double r[MAX_N];
int o[MAX_N];

int main(){

	int n,t1,t2,k;
	cin>>n>>t1>>t2>>k;

	for(int i=0;i<n;i++){
		cin>>a[i]>>b[i];
		r[i]=max((t2*b[i]+(((100.0-k)*(t1*a[i]))/(100.0))), (t2*a[i]+(((100.0-k)*(t1*b[i]))/(100.0))));
		o[i]=i;
	}

	double max=r[0];
	for(int i=0;i<n;i++){
		for(int j=i+1;j<n;j++){
			if(r[i]<r[j]){
				swap(r[i], r[j]);
				swap(o[i], o[j]);
			}
		}
	}

	for(int i=0;i<n;i++){
		for(int j=i+1;j<n;j++){
			if(r[i]==r[j]){
				if(o[i]>o[j]){
					swap(r[i], r[j]);
					swap(o[i], o[j]);
				}
			}
		}
	}

	for(int i=0;i<n;i++){
		cout<<o[i]+1<<" ";
		printf("%.2f\n", r[i]);
	}

	return 0;
}


#include <stdio.h>
#include <set>
#include <vector>
#include <string>
#include <iostream>

using namespace std;

int const MAX_N=1001;
int a[MAX_N];
int b[MAX_N];
double r[MAX_N];
int o[MAX_N];

int main(){

	int n,t1,t2,k;
	cin>>n>>t1>>t2>>k;

	for(int i=0;i<n;i++){
		cin>>a[i]>>b[i];
		r[i]=max((t2*b[i]+(((100.0-k)*(t1*a[i]))/(100.0))), (t2*a[i]+(((100.0-k)*(t2*b[i]))/(100.0))));
		o[i]=i;
	}

	double max=r[0];
	for(int i=0;i<n;i++){
		for(int j=i+1;j<n;j++){
			if(r[i]<r[j]){
				swap(r[i], r[j]);
				swap(o[i], o[j]);
			}
		}
	}

	for(int i=0;i<n;i++){
		for(int j=i+1;j<n;j++){
			if(r[i]==r[j]){
				if(o[i]>o[j]){
					swap(r[i], r[j]);
					swap(o[i], o[j]);
				}
			}
		}
	}

	for(int i=0;i<n;i++){
		cout<<o[i]+1<<" ";
		printf("%.2f\n", r[i]);
	}

	return 0;
}


#include <stdio.h>
#include <set>
#include <vector>
#include <string>
#include <iostream>

using namespace std;

int const MAX_N=1001;
int a[MAX_N];
int b[MAX_N];
double r[MAX_N];
int o[MAX_N];

int main(){

	int n,t1,t2,k;
	cin>>n>>t1>>t2>>k;

	for(int i=0;i<n;i++){
		cin>>a[i]>>b[i];
		r[i]=max((t2*b[i]+(((100.0-k)*(t1*a[i]))/(100.0))), (t2*a[i]+(((100.0-k)*(t2*b[i]))/(100.0))));
		o[i]=i;
	}

	double max=r[0];
	for(int i=0;i<n;i++){
		for(int j=i+1;j<n;j++){
			if(r[i]<=r[j]){
				if(r[i]<r[j]) {
					swap(r[i], r[j]);
					swap(o[i], o[j]);
				}else{
					if(o[i]>o[j]){
						swap(r[i], r[j]);
						swap(o[i], o[j]);
					}
				}
			}
		}
	}

	for(int i=0;i<n;i++){
		cout<<o[i]+1<<" ";
		printf("%.2f\n", r[i]);
	}

	return 0;
}


#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;

int main()
{
    int n, t1, t2, k;
    cin >> n >> t1 >> t2 >> k;
    int v1,v2;
    vector<double> rez;
    vector<int> pos;
    for (int i = 0; i < n; i++)
    {
        cin >> v1 >> v2;
        rez.push_back(min(v1,v2)*t1*0.01*(100-k)+max(v1,v2)*t2);
        pos.push_back(i+1);
    }
    int sc = 0;
    while( (n - sc) > 0)
    {
    for (int i = 1; i < n-sc; i++)
        if( rez[i] > rez[i-1])
        {
            double zu = rez[i];
            rez[i] = rez[i-1];
            rez[i-1] = zu;

            int zuu = pos[i];
            pos[i] = pos[i-1];
            pos[i-1] = zuu;
        }

    sc = sc + 1;
    }

    for (int i = 0; i < n; i++)
    {
        cout << pos[i] << ' ';
        printf("%.2f\n",rez[i]);
    }
}


#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;

int main()
{
    int n, t1, t2, k;
    cin >> n >> t1 >> t2 >> k;
    int v1,v2;
    vector<double> rez;
    vector<int> pos;
    for (int i = 0; i < n; i++)
    {
        cin >> v1 >> v2;
        rez.push_back(max(min(v1,v2)*t1*0.01*(100-k)+max(v1,v2)*t2,max(v1,v2)*t1*0.01*(100-k)+min(v1,v2)*t2));
        pos.push_back(i+1);
    }
    bool f = true;
    while(f)
    {
        f = false;
    for (int i = 0; i < n-1; i++)
        if( rez[i+1] > rez[i])
        {
            f = true;
            double zu = rez[i];
            rez[i] = rez[i+1];
            rez[i+1] = zu;

            int zuu = pos[i];
            pos[i] = pos[i+1];
            pos[i+1] = zuu;
        }

    }

    for (int i = 0; i < n; i++)
    {
        cout << pos[i] << ' ';
        printf("%.2f\n",rez[i]);
    }
}


#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <iostream>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
#define oo 0x7f7f7f7f
#define fi "186B.inp"
#define fo "186B.out"
#define NMAX 1010
#define sqr(n) (n)*(n)
#define EPS 1e-7
#define sz(a) int(a.size())
#define CLR(a,i) memset(a,i,sizeof(a))
#define FOR(i,a,b) for(int i=a;i<b;++i)
#define For(i,a,b) for(int i=a;i<=b;++i)
#define Ford(i,a,b) for(int i=a;i>=b;--i)
#define REP(i,n) for(int i=0;i<n;++i)
#define rep(i,n) for(int i=1;i<=n;++i)
#define REPD(i,n) for(int i=n-1;i>=0;--i)
typedef long long ll;

struct dl { int id; double comp; } a[NMAX];
int N,t1,t2,K;
//
bool operator <(dl x, dl y) {
  if (x.comp > y.comp + EPS) return true;
  if (fabs(x.comp-y.comp)<=EPS && x.id<y.id) return true;
  return false;
}
//
int main()
{
  #ifndef ONLINE_JUDGE
  freopen(fi,"r",stdin);
  //freopen(fo,"w",stdout);
  #endif

    scanf("%d %d %d %d",&N,&t1,&t2,&K);
    rep(i,N) {
        int u,v;
        scanf("%d %d",&u,&v);
        a[i].comp=max(u*t1-double(u*t1*K)/100+v*t2,v*t1-double(v*t1*K)/100+u*t2);
        a[i].id=i;
    }

    sort(a+1,a+N+1);
    rep(i,N) printf("%d %.2lf\n",a[i].id,a[i].comp);
  return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <iostream>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
#define oo 0x7f7f7f7f
#define fi "186B.inp"
#define fo "186B.out"
#define NMAX 1010
#define sqr(n) (n)*(n)
#define EPS 1e-7
#define sz(a) int(a.size())
#define CLR(a,i) memset(a,i,sizeof(a))
#define FOR(i,a,b) for(int i=a;i<b;++i)
#define For(i,a,b) for(int i=a;i<=b;++i)
#define Ford(i,a,b) for(int i=a;i>=b;--i)
#define REP(i,n) for(int i=0;i<n;++i)
#define rep(i,n) for(int i=1;i<=n;++i)
#define REPD(i,n) for(int i=n-1;i>=0;--i)
typedef long long ll;

struct dl { int id; double comp; } a[NMAX];
int N,t1,t2,K;
//
bool operator <(dl x, dl y) { return x.comp + EPS > y.comp; }
//
int main()
{
  #ifndef ONLINE_JUDGE
  freopen(fi,"r",stdin);
  freopen(fo,"w",stdout);
  #endif

    scanf("%d %d %d %d",&N,&t1,&t2,&K);
    rep(i,N) {
        int u,v;
        scanf("%d %d",&u,&v);
        a[i].comp=max(u*t1-double(u*t1*K)/100+v*t2,v*t1-double(v*t1*K)/100+u*t2);
        a[i].id=i;
    }

    sort(a+1,a+N+1);
    rep(i,N) printf("%d %.2lf\n",a[i].id,a[i].comp);
  return 0;
}


#include<iostream>
#include<algorithm>
#include<iomanip>
using namespace std;
const int MAX = 1001;
struct person
{
    int index;
    double score;
}p[MAX];
bool cmp(person a, person b)
{
    return a.score > b.score;
}
int main()
{
    int n, t1, t2, k, a,b,i;
    cin >> n >> t1 >> t2 >> k;
    for (i = 0; i < n; i++)
    {
        cin >> a >> b;
        p[i].index = i + 1;
        p[i].score = max(a*t1*(1 - k*0.01) + b*t2, b*t1*(1 - k*0.01) + a*t2);
    }
    sort(p, p + n, cmp);
    for (i = 0; i < n; i++)
        cout << p[i].index << " " << fixed<<setprecision(2)<<p[i].score << endl;
    return 0;
}


#include<iostream>
#include<algorithm>
#include<iomanip>
using namespace std;
const int MAX = 1001;
struct person
{
	int index;
	double score;
}p[MAX];
bool cmp(person a, person b)
{
	return a.score-b.score>1e-6;
}
int main()
{
	int n, t1, t2, k, a,b,i;
	cin >> n >> t1 >> t2 >> k;
	for (i = 0; i < n; i++)
	{
		cin >> a >> b;
		p[i].index = i + 1;
		p[i].score = max(a*t1*(1 - k*0.01) + b*t2, b*t1*(1 - k*0.01) + a*t2);
	}
	sort(p, p + n, cmp);
	for (i = 0; i < n; i++)
		cout << p[i].index << " " << fixed<<setprecision(2)<<p[i].score << endl;
	return 0;
}


#include<iostream>
#include<algorithm>
#include<iomanip>
using namespace std;
const int MAX = 1001;
struct person
{
    int index;
    double score;
}p[MAX];
bool cmp(person a, person b)
{
    return (a.score > b.score) || (a.score == b.score&&a.index < b.index);
}
int main()
{
    int n, t1, t2, k, a,b,i;
    cin >> n >> t1 >> t2 >> k;
    for (i = 0; i < n; i++)
    {
        cin >> a >> b;
        p[i].index = i + 1;
        p[i].score = max(a*t1*(1 - k*0.01) + b*t2, b*t1*(1 - k*0.01) + a*t2);
    }
    sort(p, p + n, cmp);
    for (i = 0; i < n; i++)
        cout << p[i].index << " " << fixed<<setprecision(2)<<p[i].score << endl;
    return 0;
}


#include<iostream>
#include<conio.h>
#include<cmath>
#include<math.h>
#include<iostream>
#include <vector>
#include<stdio.h>
#include<string>
#include<algorithm>
#include<iomanip>
#include<map>
using namespace std;
using namespace std::rel_ops;
int main()
{  int n,t1,t2,k,a,b,q=0;
double c[1001]={0},m[1001]={0},o=0;
	cin>>n>>t1>>t2>>k;
   o=1-(double)k/100;
	for(int i=0;i<n;++i)
	{   double l=0,u=0;
		cin>>a;cin>>b;
	   l=min(t1,t2)*min(a,b);
	   l*=o;
	   u=max(t1,t2)*max(a,b);
       c[q]=u+l;m[q]=q+1;
	   ++q;
    }
	for(int i=0;i<n;++i)
   for(int j=i+1;j<n;++j)
   {if(c[i]<c[j])
   { swap(c[i],c[j]);
     swap(m[i],m[j]);
	}
   }
   for(int i=0;i<n;++i)
   for(int j=i+1;j<n;++j)
   {if(c[i]==c[j]&&m[i]>m[j])
   {
     swap(m[i],m[j]);
	}
   }

   for(int i=0;i<n;++i){cout<<(int)m[i]<<" ";cout<<setprecision(2)<<fixed<<c[i]<<"\n";}

}


#include<iostream>
#include<conio.h>
#include<cmath>
#include<math.h>
#include<iostream>
#include <vector>
#include<stdio.h>
#include<string>
#include<algorithm>
#include<iomanip>
#include<map>
using namespace std;
using namespace std::rel_ops;
int main()
{  int n,t1,t2,k,a,b,q=0;
   double c[1001],m[1001];
	cin>>n>>t1>>t2>>k;

	for(int i=0;i<n;++i)
	{   double l=0,u=0;
		cin>>a;cin>>b;
	   l=min(t1,t2)*min(a,b);
	   l=l-l*((double)k/100);
	   u=max(t1,t2)*max(a,b);
       c[q]=u+l;m[q]=q+1;
	   ++q;
    }
	for(int i=0;i<n;++i)
   for(int j=i+1;j<n;++j)
   {if(c[i]<c[j])
   { swap(c[i],c[j]);
     swap(m[i],m[j]);
	}
   }
   for(int i=0;i<n;++i)cout<<m[i]<<" "<<c[i]<<"\n";

}


#include<iostream>
#include<conio.h>
#include<cmath>
#include<math.h>
#include<iostream>
#include <vector>
#include<stdio.h>
#include<string>
#include<algorithm>
#include<iomanip>
#include<map>
using namespace std;
using namespace std::rel_ops;
int main()
{  int n,t1,t2,k,a,b,q=0;
   double c[1001],m[1001];
	cin>>n>>t1>>t2>>k;

	for(int i=0;i<n;++i)
	{   double l=0,u=0;
		cin>>a;cin>>b;
	   l=min(t1,t2)*min(a,b);
	   l=l-l*((double)k/100);
	   u=max(t1,t2)*max(a,b);
       c[q]=u+l;m[q]=q+1;
	   ++q;
    }
	for(int i=0;i<n;++i)
   for(int j=i+1;j<n;++j)
   {if(c[i]<c[j])
   { swap(c[i],c[j]);
     swap(m[i],m[j]);
	}
   }

   for(int i=0;i<n;++i){cout<<(int)m[i]<<" ";cout<<setprecision(2)<<fixed<<c[i]<<"\n";}

}


#include<iostream>
#include<conio.h>
#include<cmath>
#include<math.h>
#include<iostream>
#include <vector>
#include<stdio.h>
#include<string>
#include<algorithm>
#include<iomanip>
#include<map>
using namespace std;
using namespace std::rel_ops;
int main()
{  int n,k,a,b,q=0;
double c[1001]={0},m[1001]={0},o=0,t1,t2;
	cin>>n>>t1>>t2>>k;
   o=1-(double)k/100;t1*=o;
	for(int i=0;i<n;++i)
	{   double l=0,u=0;
		cin>>a;cin>>b;
	   l=min(t1,t2)*min(a,b);
	   u=max(t1,t2)*max(a,b);
       c[q]=u+l;m[q]=q+1;
	   ++q;
    }
	for(int i=0;i<n;++i)
   for(int j=i+1;j<n;++j)
   {if(c[i]<c[j])
   { swap(c[i],c[j]);
     swap(m[i],m[j]);
	}
   }
   for(int i=0;i<n;++i)
   for(int j=i+1;j<n;++j)
   {if(c[i]==c[j]&&m[i]>m[j])
   {
     swap(m[i],m[j]);
	}
   }

   for(int i=0;i<n;++i){cout<<(int)m[i]<<" ";cout<<setprecision(2)<<fixed<<c[i]<<"\n";}

}


#include<iostream>
#include<conio.h>
#include<cmath>
#include<math.h>
#include<iostream>
#include <vector>
#include<stdio.h>
#include<string>
#include<algorithm>
#include<iomanip>
#include<map>
using namespace std;
using namespace std::rel_ops;
int main()
{  int n,t1,t2,k,a,b,q=0;
   double c[1001],m[1001];
	cin>>n>>t1>>t2>>k;

	for(int i=0;i<n;++i)
	{   double l=0,u=0;
		cin>>a;cin>>b;
	   l=min(t1,t2)*min(a,b);
	   l=l-l*((double)k/100);
	   u=max(t1,t2)*max(a,b);
       c[q]=u+l;m[q]=q+1;
	   ++q;
    }
	for(int i=0;i<n;++i)
   for(int j=i+1;j<n;++j)
   {if(c[i]<c[j])
   { swap(c[i],c[j]);
     swap(m[i],m[j]);
	}
   }
   for(int i=0;i<n;++i)
   for(int j=i+1;j<n;++j)
   {if(c[i]==c[j]&&m[i]>m[j])
   {
     swap(m[i],m[j]);
	}
   }

   for(int i=0;i<n;++i){cout<<(int)m[i]<<" ";cout<<setprecision(2)<<fixed<<c[i]<<"\n";}

}


#include <stdio.h>
#include <algorithm>
using namespace std;

struct p
{
	int n;
	double h;
} a[1005];

bool cmp(p x, p y)
{
	if(x.h == y.h)
		return x.n < y.n;
	return x.h > y.h;
}

int n, t1, t2, v, u, i;
double k;

int main()
{
	scanf("%d %d %d %lf", &n, &t1, &t2, &k);
	k = k / 100.0;
	for(i = 0; i < n; i++)
	{
		scanf("%d %d", &v, &u);
		a[i].n = i + 1;
		a[i].h = max(t1 * v * (1 - k) + t2 * u, t1 * u * (1 - k) + t2 * v);
	}
	sort(a, a + n, cmp);
	for(i = 0; i < n; i++)
		printf("%d %.2lf\n", a[i].n, a[i].h);
	return 0;
}


#pragma comment(linker, "/STACK:100000000")
#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <string.h>
#include <vector>
#include <queue>
using namespace std;

#define eps 1e-8
#define pi 3.1415926535897932384626433832795
#define ll long long

struct p
{
	int n;
	double h;
} res[1005];

bool cmp(p x, p y)
{
	if(x.h == y.h)
		return x.n < y.n;
	return x.h > y.h;
}

int a[1005], b[1005], n, t1, t2, i;
double k;

int main()
{
	scanf("%d %d %d %lf", &n, &t1, &t2, &k);
	k = k /(double) 100.0;
	for(i = 0; i < n; i++)
		scanf("%d %d", &a[i], &b[i]);
	for(i = 0; i < n; i++)
	{
		res[i].n = i + 1;
		res[i].h = max(t1 * a[i] - t1 * a[i] * k + t2 * b[i], t1 * b[i] - t1 * b[i] * k + t2 * a[i]);
	}
	sort(res, res + n, cmp);
	for(i = 0; i < n; i++)
		printf("%d %.2lf\n", res[i].n, res[i].h);
	return 0;
}


#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_DEPRECATE

#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#pragma comment(linker, "/STACK:64000000")

template<class T> inline T sqr (T x) {return x * x;}

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<int, int> pii;
typedef pair<int, pii> pip;
typedef pair<pii, int> ppi;
typedef pair<int64, int> pii64;
typedef pair<double, double> pdd;
typedef pair<double, int> pdi;
typedef pair<string, int> psi;
typedef pair<int, string> pis;
#define FAIL ++*(int*)0
#define eps  1e-9
#define inf  1000000000
#define MP make_pair
#define sz(C) (int)((C).size())
#define all(C) (C).begin(), (C).end()
#define TASK "codeforces"
#define RR 300000001

int n;
pii a[1 << 10];

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    int t1, t2, k;
    scanf("%d%d%d%d", &n, &t1, &t2, &k);
    for (int i = 0; i < n; ++i) {
        int x, y;
        scanf("%d%d", &x, &y);
        int h1 = x * t1 * (100 - k) + y * 100 * t2;
        int h2 = y * t1 * (100 - k) + x * 100 * t2;
        a[i] = MP(- max(h1, h2), i);
    }
    sort(a, a + n);
    for (int i = 0; i < n; ++i) {
        a[i].first *= -1;
        printf("%d %d.%02d\n", a[i].second + 1, a[i].first / 100, a[i].first % 100);
    }

    return 0;
}


#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_DEPRECATE

#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#pragma comment(linker, "/STACK:64000000")

template<class T> inline T sqr (T x) {return x * x;}

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<int, int> pii;
typedef pair<int, pii> pip;
typedef pair<pii, int> ppi;
typedef pair<int64, int> pii64;
typedef pair<double, double> pdd;
typedef pair<double, int> pdi;
typedef pair<string, int> psi;
typedef pair<int, string> pis;
#define FAIL ++*(int*)0
#define eps  1e-9
#define inf  1000000000
#define MP make_pair
#define sz(C) (int)((C).size())
#define all(C) (C).begin(), (C).end()
#define TASK "codeforces"
#define RR 300000001

int n;
pii a[1 << 10];

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    int t1, t2, k;
    scanf("%d%d%d%d", &n, &t1, &t2, &k);
    for (int i = 0; i < n; ++i) {
        int x, y;
        scanf("%d%d", &x, &y);
        int h1 = x * t1 * 100 + (y * 100 - x * k) * t2;
        int h2 = y * t1 * 100 + (x * 100 - y * k) * t2;
        a[i] = MP(- max(h1, h2), i);
    }
    sort(a, a + n);
    for (int i = 0; i < n; ++i) {
        a[i].first *= -1;
        printf("%d %d.%02d\n", a[i].second + 1, a[i].first / 100, a[i].first % 100);
    }

    return 0;
}


#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_DEPRECATE

#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#pragma comment(linker, "/STACK:64000000")

template<class T> inline T sqr (T x) {return x * x;}

typedef long long int64;
typedef unsigned long long uint64;
typedef pair<int, int> pii;
typedef pair<int, pii> pip;
typedef pair<pii, int> ppi;
typedef pair<int64, int> pii64;
typedef pair<double, double> pdd;
typedef pair<double, int> pdi;
typedef pair<string, int> psi;
typedef pair<int, string> pis;
#define FAIL ++*(int*)0
#define eps  1e-9
#define inf  1000000000
#define MP make_pair
#define sz(C) (int)((C).size())
#define all(C) (C).begin(), (C).end()
#define TASK "codeforces"
#define RR 300000001

int n;
pii a[1 << 10];

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

    int t1, t2, k;
    scanf("%d%d%d%d", &n, &t1, &t2, &k);
    for (int i = 0; i < n; ++i) {
        int x, y;
        scanf("%d%d", &x, &y);
        int h1 = x * t1 * 100 + (y * 100 - y * k) * t2;
        int h2 = y * t1 * 100 + (x * 100 - x * k) * t2;
        a[i] = MP(- max(h1, h2), i);
    }
    sort(a, a + n);
    for (int i = 0; i < n; ++i) {
        a[i].first *= -1;
        printf("%d %d.%02d\n", a[i].second + 1, a[i].first / 100, a[i].first % 100);
    }

    return 0;
}


//#define MY_DEBUG

#include <map>
#include <vector>
#include <cmath>
#include <string>
#include <cstdio>
#include <stack>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>

using namespace std;

#pragma comment(linker, "/STACK:256000000")

#ifdef MY_DEBUG
#include <fstream>
ifstream cin("input.txt");
//ofstream cout("output.txt");
#else
#include <iostream>
#endif

double ab(double a)
{
	if (a<0) return -a;
	else return a;
}

struct cmp
{
	bool operator ()(pair <double,int>a,pair<double,int>b)
	{
		if (ab(a.first-b.first)>0.005)
		return (a.first<b.first);
		else return (a.second>b.second);
	}
};

int main()
{
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	int n;
	double t1,t2,k,p,x,h;
	cin>>n>>t1>>t2>>k;
	pair <double, int> a[1100];
	for (int i=1;i<=n;++i)
	{
		cin>>p>>x;
		h=max(p*t1*(1.0-k/100.0)+t2*x,x*t1*(1.0-k/100.0)+t2*p);
		a[i]=make_pair(h,i);
	}
	sort(a+1,a+n+1,cmp());
	for (int i=n;i>=1;--i)
		printf("%ld %.2lf\n",a[i].second,a[i].first);
}


//#define MY_DEBUG

#include <map>
#include <vector>
#include <cmath>
#include <string>
#include <cstdio>
#include <stack>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>

using namespace std;

#pragma comment(linker, "/STACK:256000000")

#ifdef MY_DEBUG
#include <fstream>
ifstream cin("input.txt");
//ofstream cout("output.txt");
#else
#include <iostream>
#endif

int main()
{
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	int n;
	double t1,t2,k,p,x,h;
	cin>>n>>t1>>t2>>k;
	pair <double, int> a[1100];
	for (int i=1;i<=n;++i)
	{
		cin>>p>>x;
		h=max(p*t1*(1.0-k/100.0)+t2*x,x*t1*(1.0-k/100.0)+t2*p);
		a[i]=make_pair(h,i);
	}
	sort(a+1,a+n+1);
	for (int i=n;i>=1;--i)
		printf("%ld %.2lf\n",a[i].second,a[i].first);
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define MAX(a,b) ((a)>(b)?(a):(b))
#define maxn 1001
struct node
{
    int grade;
    int index;
    bool operator <(const node &b)const
    {
        if(grade!=b.grade) return grade>b.grade;
        else return index<b.index;
    }
}a[maxn];
int main()
{
    int n,t1,t2,k;
    while(cin>>n>>t1>>t2>>k)
    {
        k=100-k;
        int v1,v2;
        for(int i=0;i<n;i++)
        {
            scanf("%d%d",&v1,&v2);
            a[i].index=i;
            a[i].grade=MAX(t1*v1*k+t2*v2*100,t1*v2*k+t2*v1*100);
        }
        sort(a,a+n);
        for(i=0;i<n;i++)
            printf("%d %.2f\n",a[i].index+1,a[i].grade*1.0/100);
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define MAX(a,b) ((a)>(b)?(a):(b))
#define maxn 1001
struct node
{
    int grade;
    int index;
    bool operator <(const node &b)const
    {
        if(grade!=b.grade) return grade>b.grade;
        else return index<b.index;
    }
}a[maxn];
int main()
{
    int n,t1,t2,k;
    while(cin>>n>>t1>>t2>>k)
    {
        int i;
        k=100-k;
        int v1,v2;
        for(i=0;i<n;i++)
        {
            scanf("%d%d",&v1,&v2);
            a[i].index=i;
            a[i].grade=MAX(t1*v1*k+t2*v2*100,t1*v2*k+t2*v1*100);
        }
        sort(a,a+n);
        for(i=0;i<n;i++)
            printf("%d %.2f\n",a[i].index+1,a[i].grade*1.0/100);
    }
    return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;

#include <vector>

#define forn(i,n) for(int i = 0; i < (n); ++i)
#define forr(i,n) for(int i = n-1; i >= 0; --i)
#define pb push_back
typedef long long int64;

const int MAXN = 100007;
const int del = 1000000007;

struct res{
    int num;
    long double sp;
    bool operator <(const res & a)
    {
        if(sp != a.sp)
        return sp < a.sp;
        else return num > a.num;
    }
};

void round(long double & res)
{
    int64 temp = res * 1000;

    //корректировка округления
    if(temp % 10 >= 5)
    {
        temp/=10;
        ++temp;
    }
    else
        temp/=10;
    res = temp / 100.0;
    cout << res;
    if(temp % 100 == 0)
        cout << ".00";
    else if(temp % 10 == 0)
        cout << "0";
}

int main()
{
    //freopen("B.txt","r",stdin);
    int n, t1, t2,k;
    cin >> n >> t1 >> t2 >> k;

    int * a = new int[n];

    int * b = new int[n];
    res * h = new res[n];

    forn(i,n)
    {
        cin >> a[i];
        cin >> b[i];
        h[i].num = i;
    }

    forn(i,n)
    {
        long double temp1 = a[i]*t1*(1-(long double)0.01*k) + b[i]*t2;
        long double temp2 = b[i]*t1*(1-(long double)0.01*k) + a[i]*t2;
        h[i].sp = max(temp1,temp2);
    }
    sort(h, h + n);
    forr(i,n){
        long double res = h[i].sp;
        cout << h[i].num + 1 << " ";
        round(res);
        cout << endl;
    }

    return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;

#include <vector>

#define forn(i,n) for(int i = 0; i < (n); ++i)
#define forr(i,n) for(int i = n-1; i >= 0; --i)
#define pb push_back
typedef long long int64;

const int MAXN = 100007;
const int del = 1000000007;

/*
int mod2(int64 n)
{
    int 64 temp = n;
    int res = temp % 30 ;
    while (temp/=30)
    {
        res *=
    }
    for (int64 i = 0; i < n/;)

}
*/

struct res{
    int num;
    double sp;
    bool operator <(const res & a)
    {
        if(sp != a.sp)
        return sp < a.sp;
        else return num > a.num;
    }
};

void round(double & res)
{
    int temp = res * 1000;

    //корректировка округления
    if(temp % 10 >= 5)
    {
        temp/=10;
        ++temp;
    }
    else
        temp/=10;
    res = temp / 100.0;
    cout << res;
    if(temp % 100 == 0)
        cout << ".00";
    else if(temp % 10 == 0)
        cout << "0";
}

int main()
{
    //freopen("B.txt","r",stdin);
    int n, t1, t2,k;
    cin >> n >> t1 >> t2 >> k;

    int * a = new int[n];

    int * b = new int[n];
    res * h = new res[n];

    forn(i,n)
    {
        cin >> a[i];
        cin >> b[i];
        h[i].num = i;
    }

    forn(i,n)
    {
        double temp1 = a[i]*t1*(1-0.01*k) + b[i]*t2;
        double temp2 = b[i]*t1*(1-0.01*k) + a[i]*t2;
        h[i].sp = max(temp1,temp2);
    }
    sort(h, h + n);
    forr(i,n){
        double res = h[i].sp;
        cout << h[i].num + 1 << " ";
        round(res);
        cout << endl;
    }

    return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;

#include <vector>

#define forn(i,n) for(int i = 0; i < (n); ++i)
#define forr(i,n) for(int i = n-1; i >= 0; --i)
#define pb push_back
typedef long long int64;

const int MAXN = 100007;
const int del = 1000000007;

struct res{
    int num;
    long double sp;
    bool operator <(const res & a)
    {
        if(sp != a.sp)
        return sp < a.sp;
        else return num > a.num;
    }
};

void round(long double & res)
{
    int64 temp = res * 1000;

    //корректировка округления
    if(temp % 10 >= 5)
    {
        temp/=10;
        ++temp;
    }
    else
        temp/=10;
    res = temp / 100.0;
    cout << res;
    if(temp % 100 == 0)
        cout << ".00";
    else if(temp % 10 == 0)
        cout << "0";
}

int main()
{
    //freopen("B.txt","r",stdin);
    int n, t1, t2,k;
    cin >> n >> t1 >> t2 >> k;

    int * a = new int[n];

    int * b = new int[n];
    res * h = new res[n];

    forn(i,n)
    {
        cin >> a[i];
        cin >> b[i];
        h[i].num = i;
    }

    forn(i,n)
    {
        long double temp1 = a[i]*t1*(1-0.01*k) + b[i]*t2;
        long double temp2 = b[i]*t1*(1-0.01*k) + a[i]*t2;
        h[i].sp = max(temp1,temp2);
    }
    sort(h, h + n);
    forr(i,n){
        long double res = h[i].sp;
        cout << h[i].num + 1 << " ";
        round(res);
        cout << endl;
    }

    return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;

#include <vector>

#define forn(i,n) for(int i = 0; i < (n); ++i)
#define forr(i,n) for(int i = n-1; i >= 0; --i)
#define pb push_back
typedef long long int64;

const int MAXN = 100007;
const int del = 1000000007;

struct res{
    int num;
    long double sp;
    bool operator <(const res & a)
    {
        if(sp != a.sp)
        return sp < a.sp;
        else return num > a.num;
    }
};

void round(long double & res)
{
    int64 temp = res * 1000;

    //корректировка округления
    if(temp % 10 >= 5)
    {
        temp/=10;
        ++temp;
    }
    else
        temp/=10;
    res = temp / 100.0;
    cout << res;
    if(temp % 100 == 0)
        cout << ".00";
    else if(temp % 10 == 0)
        cout << "0";
}

int main()
{
    //freopen("B.txt","r",stdin);
    int n, t1, t2,k;
    cin >> n >> t1 >> t2 >> k;

    int * a = new int[n];

    int * b = new int[n];
    res * h = new res[n];

    forn(i,n)
    {
        cin >> a[i];
        cin >> b[i];
        h[i].num = i;
    }

    forn(i,n)
    {
        long double temp1 = a[i]*t1*(1-(long double)0.01*k) + b[i]*t2;
        long double temp2 = b[i]*t1*(1-(long double)0.01*k) + a[i]*t2;
        h[i].sp = max(temp1,temp2);
    }
    sort(h, h + n);

    cout.precision(15);

    forr(i,n){
        long double res = h[i].sp;
        cout << h[i].num + 1 << " ";
        round(res);
        cout << endl;
    }

    return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;

#include <vector>

#define forn(i,n) for(int i = 0; i < (n); ++i)
#define forr(i,n) for(int i = n-1; i >= 0; --i)
#define pb push_back
typedef long long int64;

const int MAXN = 100007;
const int del = 1000000007;

/*
int mod2(int64 n)
{
    int 64 temp = n;
    int res = temp % 30 ;
    while (temp/=30)
    {
        res *=
    }
    for (int64 i = 0; i < n/;)

}
*/

struct res{
    int num;
    double sp;
    bool operator <(const res & a)
    {
        return sp < a.sp;
    }
};

void round(double & res)
{
    int temp = res * 1000;

    //корректировка округления
    if(temp % 10 >= 5)
    {
        temp/=10;
        ++temp;
    }
    else
        temp/=10;
    res = temp / 100.0;
    cout << res;
    if(temp % 100 == 0)
        cout << ".00";
    else if(temp % 10 == 0)
        cout << "0";
}

int main()
{
    //freopen("B.txt","r",stdin);
    int n, t1, t2,k;
    cin >> n >> t1 >> t2 >> k;

    int * a = new int[n];

    int * b = new int[n];
    res * h = new res[n];

    forn(i,n)
    {
        cin >> a[i];
        cin >> b[i];
        h[i].num = i;
    }

    forn(i,n)
    {
        double temp1 = a[i]*t1*(1-0.01*k) + b[i]*t2;
        double temp2 = b[i]*t1*(1-0.01*k) + a[i]*t2;
        h[i].sp = max(temp1,temp2);
    }
    sort(h, h + n);
    forr(i,n){
        double res = h[i].sp;
        cout << h[i].num + 1 << " ";
        round(res);
        cout << endl;
    }

    return 0;
}


#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;

#include <vector>

#define forn(i,n) for(int i = 0; i < (n); ++i)
#define forr(i,n) for(int i = n-1; i >= 0; --i)
#define pb push_back
typedef long long int64;

const int MAXN = 100007;
const int del = 1000000007;

struct res{
    int num;
    double sp;
    bool operator <(const res & a)
    {
        if(sp != a.sp)
        return sp < a.sp;
        else return num > a.num;
    }
};

void round(double & res)
{
    int64 temp = res * 1000;

    //корректировка округления
    if(temp % 10 >= 5)
    {
        temp/=10;
        ++temp;
    }
    else
        temp/=10;
    res = temp / 100.0;
    cout << res;
    if(temp % 100 == 0)
        cout << ".00";
    else if(temp % 10 == 0)
        cout << "0";
}

int main()
{
    //freopen("B.txt","r",stdin);
    int n, t1, t2,k;
    cin >> n >> t1 >> t2 >> k;

    int * a = new int[n];

    int * b = new int[n];
    res * h = new res[n];

    forn(i,n)
    {
        cin >> a[i];
        cin >> b[i];
        h[i].num = i;
    }

    forn(i,n)
    {
        double temp1 = a[i]*t1*(1-0.01*k) + b[i]*t2;
        double temp2 = b[i]*t1*(1-0.01*k) + a[i]*t2;
        h[i].sp = max(temp1,temp2);
    }
    sort(h, h + n);
    forr(i,n){
        double res = h[i].sp;
        cout << h[i].num + 1 << " ";
        round(res);
        cout << endl;
    }

    return 0;
}


#include <iostream>
#include<ctime>
#include <cstdlib>
#include <windows.h>
#include <process.h>
#include <conio.h>
#include <vector>
#include<cmath>
#include<algorithm>
#include<string>
#include<iomanip>
using namespace std;
struct farmer{
    double c,num;
};
bool cmp(farmer A , farmer B )
{
    return A.c>B.c;
}
int main()
{
//    farmer f[1050];
//    double n,t1,t2,k;
//    cin>>n>>t1>>t2>>k;
//    for(int i = 0 ; i < n ; i++)
//    {
//        double x , y , c1 ,c2;
//        f[i].num = i+1;
//        cin>>x>>y;
//        if(y>x)
//            swap(y,x);
//        c1=(x*t1)-(double(x*t1*k)/100)+(y*t2);
//        c2=(y*t1)-(double(y*t1*k)/100)+(x*t2);
//        f[i].c = max(c1,c2);
//    }
//    int n2 = (int)n;
//    sort(&f[0],&f[n2],cmp);
//    for(int i = 0 ; i<n;i++)
//        cout<<fixed<<setprecision(0)<<f[i].num<<" "<<fixed<<setprecision(2)<<f[i].c<<endl;
    int n,t1,t2,k,a,b;
    double c1,c2;
    vector<pair<double,int> >v;
    cin>>n>>t1>>t2>>k;
    for(int i=1;i<=n;i++)
    {
        cin>>a>>b;
        c1=(a*t1)-(double(a*t1*k)/100.0)+(b*t2);
        c2=(b*t1)-(double(b*t1*k)/100.0)+(a*t2);
        v.push_back(make_pair(-1*max(c1,c2),i));
    }
    sort(v.begin(),v.end());
    for(int i=0;i<n;i++)
        cout<<v[i].second<<" "<<fixed<<setprecision(2)<<-1*v[i].first<<endl;
    return 0;
}


#include <iostream>
#include<ctime>
#include <cstdlib>
#include <windows.h>
#include <process.h>
#include <conio.h>
#include <vector>
#include<cmath>
#include<algorithm>
#include<string>
#include<iomanip>
using namespace std;
struct farmer{
    double c,num;
};
bool cmp(farmer A , farmer B )
{
    return A.c>B.c;
}
int main()
{
    farmer f[1050];
    double n,t1,t2,k;
    cin>>n>>t1>>t2>>k;
    for(int i = 0 ; i < n ; i++)
    {
        double x , y , c1 ,c2;
        f[i].num = i+1;
        cin>>x>>y;
        if(y>x)
            swap(y,x);
        c1=(x*t1)-(double(x*t1*k)/100)+(y*t2);
        c2=(y*t1)-(double(y*t1*k)/100)+(x*t2);
        f[i].c = max(c1,c2);
    }
    int n2 = (int)n;
    sort(&f[0],&f[n2],cmp);
    for(int i = 0 ; i<n;i++)
        cout<<fixed<<setprecision(0)<<f[i].num<<" "<<fixed<<setprecision(2)<<f[i].c<<endl;
	return 0;
}


#include <iostream>
#include<ctime>
#include <cstdlib>
#include <windows.h>
#include <process.h>
#include <conio.h>
#include <vector>
#include<cmath>
#include<algorithm>
#include<string>
#include<iomanip>
using namespace std;
struct farmer{
    double c,num;
};
bool cmp(farmer A , farmer B )
{
    return A.c>B.c;
}
int main()
{
    farmer f[1003];
    double n,t1,t2,k;
    cin>>n>>t1>>t2>>k;
    for(int i = 0 ; i < n ; i++)
    {
        double x , y;
        f[i].num = i+1;
        cin>>x>>y;
        if(y>x)
            swap(y,x);
        if(t1>t2)
        {
           f[i].c = (y*t2)-(y*t2/100.0*k);
           f[i].c += x*t1;
        }
        else
        {
            f[i].c = (y*t1)-(y*t1/100.0*k);
            f[i].c += x*t2;
        }
    }
    int n2 = (int)n;
    sort(&f[0],&f[n2],cmp);
    for(int i = 0 ; i<n;i++)
        cout<<fixed<<setprecision(0)<<f[i].num<<" "<<fixed<<setprecision(2)<<f[i].c<<endl;
	return 0;
}


#include <iostream>
#include<ctime>
#include <cstdlib>
#include <windows.h>
#include <process.h>
#include <conio.h>
#include <vector>
#include<cmath>
#include<algorithm>
#include<string>
#include<iomanip>
using namespace std;
struct farmer{
    double c,num;
};
bool cmp(farmer A , farmer B )
{
    return A.c>B.c;
}
int main()
{
    farmer f[1003];
    double n,t1,t2,k;
    cin>>n>>t1>>t2>>k;
    for(int i = 0 ; i < n ; i++)
    {
        double x , y , c1 ,c2;
        f[i].num = i+1;
        cin>>x>>y;
        if(y>x)
            swap(y,x);
        c1= (y*t1)-(((y*t1)/100.0)*k);
        c1+= x*t2;
        c2 = (x*t1)-(((x*t1)/100.0)*k);
        c2+=y*t2;
        f[i].c = max(c1,c2);
    }
    int n2 = (int)n;
    sort(&f[0],&f[n2],cmp);
    for(int i = 0 ; i<n;i++)
        cout<<fixed<<setprecision(0)<<f[i].num<<" "<<fixed<<setprecision(2)<<f[i].c<<endl;
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
struct Node
{
    double tot;
    int num;
}ans[1005];
inline bool cmp(Node a,Node b)
{
    if(a.tot<b.tot)
        return true;
    else return false;
}
int main()
{
    int n,t1,t2,k,a,b;
    cin>>n>>t1>>t2>>k;
    for(int i=0;i<n;i++)
    {
        cin>>a>>b;
        ans[i].tot=max((double)a*t1*1.0+b*t2*(100-k)/100.0,(double)b*t1*1.0+a*t2*(100-k)/100.0);
        ans[i].num=i+1;
    }
    for(int i=0;i<n-1;i++)
        for(int j=0;j<n-i-1;j++)
        {
            if(cmp(ans[j],ans[j+1]))
                swap(ans[j],ans[j+1]);
        }
    //sort(ans,ans+n,cmp);
    //qsort(ans,sizeof(Node)*n,sizeof(Node),cmp);
    cout.setf(ios_base::fixed);
    cout.setf(ios_base::showpoint);
    cout.precision(2);
    for(int i=0;i<n;i++)
    {
        //cout<<ans[i].num<<" "<<ans[i].tot<<endl;
        printf("%d %.2lf\n",ans[i].num,ans[i].tot);
    }
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
struct Node
{
    double tot;
    int num;
}ans[1005];
bool cmp(Node a,Node b)
{
    if(a.tot<b.tot)
        return true;
    else return false;
}
int main()
{
    int n,t1,t2,k,a,b;
    cin>>n>>t1>>t2>>k;
    for(int i=0;i<n;i++)
    {
        cin>>a>>b;
        ans[i].tot=max((double)b*t2*(1-(double)k/100)+a*t1,(double)a*t2*(1-(double)k/100)+b*t1);
        ans[i].num=i+1;
    }
    for(int i=0;i<n-1;i++)
        for(int j=0;j<n-i-1;j++)
        {
            if(cmp(ans[j],ans[j+1]))
                swap(ans[j],ans[j+1]);
        }
    //sort(ans,ans+n,cmp);
    //qsort(ans,sizeof(Node)*n,sizeof(Node),cmp);
    cout.setf(ios_base::fixed);
    cout.setf(ios_base::showpoint);
    cout.precision(2);
    for(int i=0;i<n;i++)
    {
        //cout<<ans[i].num<<" "<<ans[i].tot<<endl;
        printf("%d %.2lf\n",ans[i].num,ans[i].tot);
    }
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
struct Node
{
    double tot;
    int num;
}ans[1005];
inline bool cmp(Node a,Node b)
{
    if(a.tot<b.tot)
        return true;
    else return false;
}
int main()
{
    int n,t1,t2,k,a,b;
    cin>>n>>t1>>t2>>k;
    for(int i=0;i<n;i++)
    {
        cin>>a>>b;
        ans[i].tot=max((double)a*t1+b*t2*(1-(double)k/100),(double)b*t1+a*t2*(1-(double)k/100));
        ans[i].num=i+1;
    }
    for(int i=0;i<n-1;i++)
        for(int j=0;j<n-i-1;j++)
        {
            if(cmp(ans[j],ans[j+1]))
                swap(ans[j],ans[j+1]);
        }
    //sort(ans,ans+n,cmp);
    //qsort(ans,sizeof(Node)*n,sizeof(Node),cmp);
    cout.setf(ios_base::fixed);
    cout.setf(ios_base::showpoint);
    cout.precision(2);
    for(int i=0;i<n;i++)
    {
        //cout<<ans[i].num<<" "<<ans[i].tot<<endl;
        printf("%d %.2lf\n",ans[i].num,ans[i].tot);
    }
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
struct Node
{
    double tot;
    int num;
}ans[1005];
bool cmp(Node a,Node b)
{
    if(a.tot==b.tot)
        return a.num<b.num;
    return a.tot>b.tot;
}

int main()
{
    int n,t1,t2,k,a,b;
    cin>>n>>t1>>t2>>k;
    for(int i=0;i<n;i++)
    {
        cin>>a>>b;
        ans[i].tot=max(a*t1*1.0+b*t2*(100-k)/100.0,b*t1*1.0+a*t2*(100-k)/100.0);
        ans[i].num=i+1;
    }
    /*for(int i=0;i<n-1;i++)
        for(int j=0;j<n-i-1;j++)
        {
            if(cmp(ans[j],ans[j+1]))
                swap(ans[j],ans[j+1]);
        }*/
    sort(ans,ans+n,cmp);
    //qsort(ans,sizeof(Node)*n,sizeof(Node),cmp);
    cout.setf(ios_base::fixed);
    cout.setf(ios_base::showpoint);
    cout.precision(2);
    for(int i=0;i<n;i++)
    {
        //cout<<ans[i].num<<" "<<ans[i].tot<<endl;
        printf("%d %.2lf\n",ans[i].num,ans[i].tot);
    }
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
struct Node
{
    double tot;
    int num;
}ans[1005];
bool cmp(Node a,Node b)
{
    if(a.tot==b.tot)
        return a.num<b.num;
    return a.tot>b.tot;
}

int main()
{
    int n,t1,t2,k,a,b;
    cin>>n>>t1>>t2>>k;
    for(int i=0;i<n;i++)
    {
        cin>>a>>b;
        ans[i].tot=max(a*t1*(100-k)/100.0+b*t2*1.0,b*t1*(100-k)/100.0+a*t2*1.0);
        //max(a*t1*1.0+b*t2*(100-k)/100.0,b*t1*1.0+a*t2*(100-k)/100.0);
        ans[i].num=i+1;
    }
    /*for(int i=0;i<n-1;i++)
        for(int j=0;j<n-i-1;j++)
        {
            if(cmp(ans[j],ans[j+1]))
                swap(ans[j],ans[j+1]);
        }*/
    sort(ans,ans+n,cmp);
    //qsort(ans,sizeof(Node)*n,sizeof(Node),cmp);
    cout.setf(ios_base::fixed);
    cout.setf(ios_base::showpoint);
    cout.precision(2);
    for(int i=0;i<n;i++)
    {
        //cout<<ans[i].num<<" "<<ans[i].tot<<endl;
        printf("%d %.2lf\n",ans[i].num,ans[i].tot);
    }
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
struct Node
{
    double tot;
    int num;
}ans[1005];
bool cmp(Node a,Node b)
{
    if(a.tot==b.tot)
        return a.num<b.num;
    return a.tot>b.tot;
}

int main()
{
    int n,t1,t2,k,a,b;
    cin>>n>>t1>>t2>>k;
    for(int i=0;i<n;i++)
    {
        cin>>a>>b;
        ans[i].tot=max((double)a*t1*1.0+b*t2*(100-k)/100.0,(double)b*t1*1.0+a*t2*(100-k)/100.0);
        ans[i].num=i+1;
    }
    /*for(int i=0;i<n-1;i++)
        for(int j=0;j<n-i-1;j++)
        {
            if(cmp(ans[j],ans[j+1]))
                swap(ans[j],ans[j+1]);
        }*/
    sort(ans,ans+n,cmp);
    //qsort(ans,sizeof(Node)*n,sizeof(Node),cmp);
    cout.setf(ios_base::fixed);
    cout.setf(ios_base::showpoint);
    cout.precision(2);
    for(int i=0;i<n;i++)
    {
        //cout<<ans[i].num<<" "<<ans[i].tot<<endl;
        printf("%d %.2lf\n",ans[i].num,ans[i].tot);
    }
}


#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
struct Node
{
    double tot;
    int num;
}ans[1005];
bool cmp(Node a,Node b)
{
    if(a.tot<b.tot)
        return true;
    else return false;
}
int main()
{
    int n,t1,t2,k,a,b;
    cin>>n>>t1>>t2>>k;
    for(int i=0;i<n;i++)
    {
        cin>>a>>b;
        ans[i].tot=max((double)b*t2*(1-(double)k/100)+a*t1,(double)a*t2*(1-(double)k/100)+b*t1);
        ans[i].num=i+1;
    }
    for(int i=0;i<n-1;i++)
        for(int j=0;j<n-i-1;j++)
        {
            if(cmp(ans[j],ans[j+1]))
                swap(ans[j],ans[j+1]);
        }
    //sort(ans,ans+n,cmp);
    //qsort(ans,sizeof(Node)*n,sizeof(Node),cmp);
    cout.setf(ios_base::fixed);
    cout.setf(ios_base::showpoint);
    cout.precision(2);
    for(int i=0;i<n;i++)
    {
        cout<<ans[i].num<<" "<<ans[i].tot<<endl;
    }
}


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <queue>
#include <string>
#include <vector>
#include <stack>
#include <algorithm>
using namespace std;
#define inf 0.000001
const int maxn = 1005;

int n,t1,t2,k;
struct Node{
	int sign;
	int v1,v2;
	double height;
};
Node mat[maxn];
bool comp(const Node & t1,const Node & t2)
{

	if(fabs(t1.height-t2.height) >= inf)
		return t1.height > t2.height;
	return t1.sign < t2.sign;
}

int main()
{
	int i,j,k;
	scanf("%d%d%d%d",&n,&t1,&t2,&k);
	for(i = 0;i < n;i ++)
	{
		mat[i].sign = i + 1;
		scanf("%d%d",&mat[i].v1,&mat[i].v2);
		if(mat[i].v1 > mat[i].v2)
			swap(mat[i].v1,mat[i].v2);
		mat[i].height = mat[i].v1*t1*(100.0-k)*1.0/100.0 + mat[i].v2*t2;
	}
	sort(mat,mat+n,comp);
	for(i = 0;i < n;i ++)
	{
		printf("%d %.2f\n",mat[i].sign,mat[i].height);
	}
	return 0;
}


#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <queue>
#include <string>
#include <vector>
#include <stack>
#include <algorithm>
using namespace std;
#define inf 0.000001
const int maxn = 1005;

int n,t1,t2,k;
struct Node{
	int sign;
	int v1,v2;
	double height;
};
Node mat[maxn];
bool comp(const Node & t1,const Node & t2)
{

	if(fabs(t1.height-t2.height) >= inf)
		return t1.height > t2.height;
	return t1.sign < t2.sign;
}

int main()
{
	double tp1,tp2;
	int i,j,k;
	scanf("%d%d%d%d",&n,&t1,&t2,&k);
	for(i = 0;i < n;i ++)
	{
		mat[i].sign = i + 1;
		scanf("%d%d",&mat[i].v1,&mat[i].v2);
		tp1 = mat[i].v1*t1*(100.0-k)*1.0/100.0 + mat[i].v2*t2;
		swap(mat[i].v1,mat[i].v2);
		tp2 = mat[i].v1*t1*(100.0-k)*1.0/100.0 + mat[i].v2*t2;
		mat[i].height = max(tp2,tp1);
	}
	sort(mat,mat+n,comp);
	for(i = 0;i < n;i ++)
	{
		printf("%d %.2f\n",mat[i].sign,mat[i].height);
	}
	return 0;
}


#pragma comment(linker, "/STACK:500000000")
#include <iostream>
#include <math.h>
#include <string>
#include <conio.h>
#include <stdio.h>
using namespace std;
struct st
{
	int Number;
	double Length;
};
int compare (const void * a, const void * b)
{
	st *aa = (st*)a;
	st *bb = (st*)b;
	if ((int)aa->Length*100 == (int)bb->Length*100 )
		return (aa->Number-bb->Number);
	else
		return ( bb->Length - aa->Length );
}

int main()
{
	int n;
	double k,t1,t2;
	cin >> n >> t1 >> t2 >> k ;
	st *ms = new st[10000];
	for (int i = 0 ; i < n ; i ++ )
	{
		double a,b;
		cin >> a >> b ;
		ms[i].Number = i+1;
		ms[i].Length = max(a*t1-a*t1*(k/100.f) + b*t2, b*t1-b*t1*(k/100.f)+a*t2);
	}
	qsort(ms,n,sizeof(st),compare);
	for (int i = 0 ; i < n ; i ++ )
	{
		cout << ms[i].Number <<" ";

		cout.setf(ios::fixed);
		cout.precision(2);
		cout<< ms[i].Length<<endl;
	}
	return 0;
}


#pragma comment(linker, "/STACK:500000000")
#include <iostream>
#include <math.h>
#include <string>
#include <conio.h>
#include <stdio.h>
using namespace std;
struct st
{
	int Number;
	double Length;
};
int compare (const void * a, const void * b)
{
	st *aa = (st*)a;
	st *bb = (st*)b;
	if ((int)aa->Length*100 == (int)bb->Length*100 )
		return (aa->Number-bb->Number);
	else
		return ( (int)bb->Length*100 - (int)aa->Length*100 );
}

int main()
{
	int n;
	double k,t1,t2;
	cin >> n >> t1 >> t2 >> k ;
	st *ms = new st[10000];
	for (int i = 0 ; i < n ; i ++ )
	{
		double a,b;
		cin >> a >> b ;
		ms[i].Number = i+1;
		ms[i].Length = max(a*t1-a*t1*(k/100.f) + b*t2, b*t1-b*t1*(k/100.f)+a*t2);
	}
	qsort(ms,n,sizeof(st),compare);
	for (int i = 0 ; i < n ; i ++ )
	{
		cout << ms[i].Number <<" ";

		cout.setf(ios::fixed);
		cout.precision(2);
		cout<< ms[i].Length<<endl;
	}
	return 0;
}


#pragma comment(linker, "/STACK:500000000")
#include <iostream>
#include <math.h>
#include <string>
#include <conio.h>
#include <stdio.h>
using namespace std;
struct st
{
	int Number;
	double Length;
};
int compare (const void * a, const void * b)
{
	st *aa = (st*)a;
	st *bb = (st*)b;
	if (aa->Length == bb->Length )
		return (aa->Number-bb->Number);
	else
		return ( bb->Length - aa->Length );
}

int main()
{
	int n;
	double k,t1,t2;
	cin >> n >> t1 >> t2 >> k ;
	st *ms = new st[n];
	for (int i = 0 ; i < n ; i ++ )
	{
		double a,b;
		cin >> a >> b ;
		ms[i].Number = i+1;
		ms[i].Length = max(a*t1-a*t1*(k/100.f) + b*t2, b*t1-b*t1*(k/100.f)+a*t2);
	}
	qsort(ms,n,sizeof(st),compare);
	for (int i = 0 ; i < n ; i ++ )
	{
		cout << ms[i].Number <<" ";

		cout.setf(ios::fixed);
		cout.precision(2);
		cout<< ms[i].Length<<endl;
	}
	return 0;
}


#pragma comment(linker, "/STACK:500000000")
#include <iostream>
#include <math.h>
#include <string>
#include <conio.h>
#include <stdio.h>
using namespace std;
struct st
{
	int Number;
	double Length;
};
int compare (const void * a, const void * b)
{
	st *aa = (st*)a;
	st *bb = (st*)b;
	if (aa->Length == bb->Length )
		return (aa->Number-bb->Number);
	else
		return ( bb->Length - aa->Length );
}

int main()
{
	int n;
	double k,t1,t2;
	cin >> n >> t1 >> t2 >> k ;
	st *ms = new st[10000];
	for (int i = 0 ; i < n ; i ++ )
	{
		double a,b;
		cin >> a >> b ;
		ms[i].Number = i+1;
		ms[i].Length = max(a*t1-a*t1*(k/100.f) + b*t2, b*t1-b*t1*(k/100.f)+a*t2);
	}
	qsort(ms,n,sizeof(st),compare);
	for (int i = 0 ; i < n ; i ++ )
	{
		cout << ms[i].Number <<" ";

		cout.setf(ios::fixed);
		cout.precision(2);
		cout<< ms[i].Length<<endl;
	}
	return 0;
}


#pragma comment(linker, "/STACK:500000000")
#include <iostream>
#include <math.h>
#include <string>
#include <conio.h>
#include <stdio.h>
using namespace std;
struct st
{
	int Number;
	double Length;
};
int compare (const void * a, const void * b)
{
	st *aa = (st*)a;
	st *bb = (st*)b;
	if ((int)(aa->Length*100+0.5) == (int)(bb->Length*100+0.5) )
		return (aa->Number-bb->Number);
	else
		return ( (int)(bb->Length*100+0.5) - (int)(aa->Length*100+0.5) );
}

int main()
{
	int n;
	double k,t1,t2;
	cin >> n >> t1 >> t2 >> k ;
	st *ms = new st[10000];
	for (int i = 0 ; i < n ; i ++ )
	{
		double a,b;
		cin >> a >> b ;
		ms[i].Number = i+1;
		ms[i].Length = max(a*t1-a*t1*(k/100.f) + b*t2, b*t1-b*t1*(k/100.f)+a*t2);
	}
	qsort(ms,n,sizeof(st),compare);
	for (int i = 0 ; i < n ; i ++ )
	{
		cout << ms[i].Number <<" ";

		cout.setf(ios::fixed);
		cout.precision(2);
		cout<< ms[i].Length<<endl;
	}
	return 0;
}


#pragma comment(linker, "/STACK:500000000")
#include <iostream>
#include <math.h>
#include <string>
#include <conio.h>
#include <stdio.h>
using namespace std;
struct st
{
	int Number;
	double Length;
};
int compare (const void * a, const void * b)
{
	st *aa = (st*)a;
	st *bb = (st*)b;
	if ((int)aa->Length*100 == (int)bb->Length*100 )
		return (aa->Number-bb->Number);
	else
		return ( (int)(bb->Length*100+0.5) - (int)(aa->Length*100+0.5) );
}

int main()
{
	int n;
	double k,t1,t2;
	cin >> n >> t1 >> t2 >> k ;
	st *ms = new st[10000];
	for (int i = 0 ; i < n ; i ++ )
	{
		double a,b;
		cin >> a >> b ;
		ms[i].Number = i+1;
		ms[i].Length = max(a*t1-a*t1*(k/100.f) + b*t2, b*t1-b*t1*(k/100.f)+a*t2);
	}
	qsort(ms,n,sizeof(st),compare);
	for (int i = 0 ; i < n ; i ++ )
	{
		cout << ms[i].Number <<" ";

		cout.setf(ios::fixed);
		cout.precision(2);
		cout<< ms[i].Length<<endl;
	}
	return 0;
}


#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory>
#include <queue>
#include <list>
#include <numeric>

using namespace std;

#define MAX 1000000000
#define MIN INT_MIN
#define FOR(i,a,n) for(int i = a; i < n; ++i)
#define ll long long
#define sqr ((x) * (x))

bool comp(pair<ll,ll> l,pair<ll,ll> r)
{
	if(l.first > r.first) return true;
	if(l.first == r.first && l.second < r.second) return true;
	return false;
}

int main()
{
	ll n,t1,t2,k;
	cin>>n>>t1>>t2>>k;
	vector< pair<ll,ll> > v(n);
	FOR(i,0,n)
	{
		ll a,b;
		cin>>a>>b;
		v[i] = make_pair(max(100 * a * t1 + b * t2 * (100 - k),100 * b * t1 + a * t2 * (100 - k)),i);
	}

	sort(v.begin(),v.end(),comp);
	FOR(i,0,n){
		cout<<v[i].second + 1<<' '<<v[i].first/100<<'.';
		printf("%02d\n",v[i].first % 100);
	}
	return 0;
}


#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory>
#include <queue>
#include <list>
#include <numeric>

using namespace std;

#define MAX 1000000000
#define MIN INT_MIN
#define FOR(i,a,n) for(int i = a; i < n; ++i)
#define ll long long
#define sqr ((x) * (x))

bool comp(pair<int,int> l,pair<int,int> r)
{
	if(l.first > r.first) return true;
	if(l.first == r.first && l.second < r.second) return true;
	return false;
}

int main()
{
	int n,t1,t2,k;
	cin>>n>>t1>>t2>>k;
	vector< pair<int,int> > v(n);
	FOR(i,0,n)
	{
		int a,b;
		cin>>a>>b;
		v[i] = make_pair(max(100 * a * t1 + b * t2 * (100 - k),100 * b * t1 + a * t2 * (100 - k)),i);
	}

	sort(v.begin(),v.end(),comp);
	FOR(i,0,n){
		cout<<v[i].second + 1<<' '<<v[i].first/100<<'.';
		printf("%02d\n",v[i].first % 100);
	}
	return 0;
}


#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory>
#include <queue>
#include <list>
#include <numeric>

using namespace std;

#define MAX 1000000000
#define MIN INT_MIN
#define FOR(i,a,n) for(int i = a; i < n; ++i)
#define ll long long
#define sqr ((x) * (x))

bool comp(pair<ll,ll> l,pair<ll,ll> r)
{
	if(l.first > r.first) return true;
	if(l.first == r.first && l.second < r.second) return true;
	return false;
}

int main()
{
	ll n,t1,t2,k;
	cin>>n>>t1>>t2>>k;
	vector< pair<ll,ll> > v(n);
	FOR(i,0,n)
	{
		ll a,b;
		cin>>a>>b;
		v[i] = make_pair(max(a * t1 * (100 - k) + b * t2 * 100ll,b * t1 * (100 - k) + a * t2 * 100ll),i);
	}

	sort(v.begin(),v.end(),comp);
	FOR(i,0,n){
		cout<<v[i].second + 1<<' '<<v[i].first/100<<'.';
		printf("%02d\n",v[i].first % 100);
	}
	return 0;
}


n, t1, t2, k = map(int, input().split())

board = []
for i in range(1,n+1):
	a, b = map(int, input().split())

	c1 = a*t1 + (b*(1-k/100))*t2
	c2 = b*t1 + (a*(1-k/100))*t2

	c = c1 if c1>c2 else c2
	board.append((i,c))

board = sorted(board, key = lambda x: x[1], reverse = True)

for p in board:
	print("%d %.2f" % (p[0],p[1]))


n, t1, t2, k = map(int, input().split())

board = []
for i in range(1,n+1):
	a, b = map(int, input().split())

	c1 = a*t1 + (b*(1-k/100))*t2
	c2 = b*t1 + (a*(1-k/100))*t2

	c = c1 if c1>c2 else c2
	board.append((i,c))

board = sorted(board, key = lambda x: x[1])
board.reverse()

for p in board:
	print("%d %.2f" % (p[0],p[1]))


n, t1, t2, k = map(int, input().split())

board = []
for i in range(1,n+1):
	a, b = map(int, input().split())

	c1 = a*t2 + (1-k/100)*t1*b
	c2 = b*t2 + (1-k/100)*t1*a

	c = c1 if c1>c2 else c2
	board.append((i,c))

board = sorted(board, key = lambda x: x[1], reverse = True)

for p in board:
	print("%d %.2f" % (p[0],p[1]))


n, t1, t2, k = map(int, input().split())

board = []
for i in range(1,n+1):
	a, b = map(int, input().split())

	c1 = a*t2 + (1-k/100)*t1*b
	c2 = b*t2 + (1-k/100)*t1*a

	c = c1 if c1<c2 else c2
	board.append((i,c))

board = sorted(board, key = lambda x: x[1], reverse = True)

for p in board:
	print("%d %.2f" % (p[0],p[1]))


def getkey  (item):
    return item[1]

n, t1, t2, k = map(int, input().split())

board = []

for i in range(n):
    v, u = map(int, input().split())
    mx = max( (v*t1 * (100-k)/100) + (u*t2), (u*t1 * (100-k)/100) + (v*t2) )

    board.append([i+1, mx])
board = sorted(board, key= getkey, reverse= True)

for i in board:
    print(i[0], "{:.2f}".format(i[1]) )


n, t1, t2, k = map(int, input().split())

ds = []
for i in range(n):
    v, u = map(int, input().split())
    ds.append([i+1, max(t1*v*(1-k/100)+t2*u, t1*u*(1-k/100)+t2*v)])

ds = sorted(ds, key=lambda x: (-x[1], x[0]))
for d in ds:
    print(str(d[0]) + ' ' + f'{d[1]:.2f}')


n, t1, t2, k = map(int, input().split())
contestants = []
for i in range(n):
	a, b = map(int, input().split())
	x = (100-k)/100*a*t1 + b*t2
	y = (100-k)/100*b*t1 + a*t2
	contestants.append((-max(x, y), i+1))
contestants.sort()
for value, pos in contestants:
	print('%d %.2f' % (pos, -value))


n,t1,t2,k = map(int , input().split())
a,b = [],[]
for _ in range(n):
	t11,t21  = map(int, input().split())
	a.append(t11)
	b.append(t21)
res = [0]*n
for i in range(n):
	res[i] = (max(t1*a[i]*0.01*(100-k)+t2*b[i], t1*b[i]*0.01*(100-k)+t2*a[i]), i+1)
res.sort(key=lambda k: (k[0], -k[1]), reverse=True)
for i in res:
	print (i[1], "%.2f" %i[0])


n,t1,t2,k = map(int , input().split())
a,b = [],[]
for _ in range(n):
	t11,t21  = map(int, input().split())
	a.append(t11)
	b.append(t21)
res = [0]*n
for i in range(n):
	res[i] = (max(t1*a[i]*0.01*(100-k)+t2*b[i], t1*b[i]*0.01*(100-k)+t2*a[i]), i+1)
res.sort(reverse=True)
for i in res:
	print (i[1], "%.2f" %i[0])


def read():
    return map(int, input().split())

def main():
    n, t1, t2, k = read()

    ans = []
    for i in range(n):
        a, b = read()
        growth_a = a * t1 * (1 - k / 100) + b * t2
        growth_b = b * t1 * (1 - k / 100) + a * t2
        growth = max(growth_a, growth_b)
        ans.append((-growth, i+1))

    ans.sort()
    for growth, idx in ans:
        print('%d %.2f' % (idx, -growth))

if __name__ == "__main__":
    main()


n, t1, t2, k = map(int, input().split())
l = list(list(map(int, input().split())) for i in range(n))
s = {}
if t1 * (100-k)/100 >= t2:
    for i in range(n):
        s[i + 1] = max(l[i]) * t1 * (100-k)/100 + min(l[i]) * t2
else:
    for i in range(n):
        s[i + 1] = min(l[i]) * t1 * (100-k)/100 + max(l[i]) * t2
s = {k: v for k, v in sorted(s.items(), key=lambda item: item[1], reverse=True)}
for i, j in s.items():
    print(i, '{:.2f}'.format(j), sep=' ')


import sys
import math

n, t1, t2, k = [int(x) for x in (sys.stdin.readline()).split()]

res = []
for i in range(n):
    a, b = [int(x) for x in (sys.stdin.readline()).split()]
    v1 = t1 * a
    v1 -= (v1 * k / 100)
    v2 = t2 * b
    v1_2 = t1 * b
    v1_2 -= (v1_2 * k / 100)
    v2_2 = t2 * a
    res.append((i + 1, max(v1 + v2, v1_2 + v2_2)))

res = sorted(res, key = lambda x: (x[1], -x[0]), reverse = True)

for i in res:
    print(i[0], "%.2f" % i[1])


import sys
import math

n, t1, t2, k = [int(x) for x in (sys.stdin.readline()).split()]

res = []
for i in range(n):
    a, b = [int(x) for x in (sys.stdin.readline()).split()]
    v1 = min(t1 * a, t1 * b)
    v1 -= (v1 * k / 100)
    v2 = max(t2 * a, t2 * b)
    res.append((i + 1, v1 + v2))

res = sorted(res, key = lambda x: (x[1], -x[0]), reverse = True)

for i in res:
    print(i[0], "%.2f" % i[1])


import sys
import math

n, t1, t2, k = [int(x) for x in (sys.stdin.readline()).split()]

res = []
for i in range(n):
    a, b = [int(x) for x in (sys.stdin.readline()).split()]
    v1 = min(t1 * a, t1 * b)
    v1 -= (v1 * k / 100)
    v2 = max(t2 * a, t2 * b)
    res.append((i + 1, v1 + v2))

res = sorted(res, key = lambda x: (x[1], -x[0]), reverse = True)

for i in res:
    print(i[0], "%2f" % i[1])


n,t1,t2,k = map(int,input().split())
matrix = []
for i in range(n):
    a ,b = map(int,input().split())
    if(a*t1 <= b*t2):
        first = a*t1 - a*t1*(k/100)
        second = b*t2
    elif(b*t1 <= a*t2):
        first = b*t1 - b*t1*(k/100)
        second = a*t2
    a  = [i+1 , first+second]
    matrix.append(a)
matrix.sort(key=lambda x:x[1],reverse=True)
for i in matrix:
    print("{} {:.2f}".format(i[0],i[1]))


n,t1,t2,k = map(int,input().split())
matrix = []
for i in range(n):
    a ,b = map(int,input().split())
    choice1 = ((a*t1)-a*t1*(k/100)) + (b*t2)
    choice2 = ((b*t1)-b*t1*(k/100))+ (a*t2)
    a  = [i+1 , max(choice1,choice2)]
    matrix.append(a)
matrix.sort(key=lambda x:x[1],reverse=True)
for i in matrix:
    print("{} {:.2f}".format(i[0],i[1]))


"""
Problem link:
Solution By Keshav Mishra
"""
from sys import stdin,stdout
from collections import Counter , deque
from queue import PriorityQueue
import math

helperConstants = True
helperUtilityFunctions = True

def input(): return stdin.readline().strip()
# def print(s): stdout.write(str(s)+'\n')
if helperConstants:
    YES = 'YES'
    NO = 'NO'
    yes = 'yes'
    no = 'no'
    true = 'true'
    false = 'false'
    FALSE = 'FALSE'
    TRUE = 'TRUE'
    IMPOSSIBLE = 'IMPOSSIBLE'
    POSSIBLE = 'POSSIBLE'
    INF = float('inf')

if helperUtilityFunctions:
    # Input utility functions
    def getInputArray():
        return list(map(int, input().split()))
    def getIntegerInputs():
        return map(int, input().split())
    def getInputIntegerMatrix(n):
        matrix = []
        for i in range(n):
            matrix.append(list(map(int,input().split())))
        return matrix
    def getInputStringMatrix(n):
        matrix = []
        for i in range(n):
            matrix.append(input())
        return matrix

    # Output Utility functions
    def outputIntegerMatrix(matrix):
        for i in range(len(matrix)):
            print(*matrix[i])
    def outputStringMatrix(matrix):
        for i in range(len(matrix)):
            print(matrix[i])
    def kickstartoutput(testcase,*outputs):
        print('Case #%d:'%(testcase), *outputs)

def solve():
    n, t1, t2, k = getIntegerInputs()
    participants = []
    k = 1 - k*0.01
    for i in range(n):
        a, b = getIntegerInputs()
        ans1 = 0
        ans2 = 0
        ans1 += a*t1
        ans1 = ans1*k
        ans1 += b*t2
        ans2 += b*t1
        ans2 = ans2*k
        ans2 += a*t2
        ans = max(ans1,ans2)
        participants.append({'index':i + 1, 'value':ans})
    participants.sort(reverse = True, key = lambda x : x['value'])
    for participant in participants:
        print('%d %.2f'%(participant['index'], participant['value']))

if __name__ == '__main__':
    solve()


# Author: SaykaT
# Problem: 186B.py
# Time Created: September 13(Sunday) 2020 || 10:27:28

#>-------------------------<#

#>-------------------------<#

# Helper Functions. -> Don't cluster your code.
def calc(u, v, t1, t2, k):
    length_1 = (u*t1) - (u*t1*(k/100)) + (v*t2)
    length_2 = (v*t1) - (v*t1*(k/100)) + (u*t2)

    return round(max(length_1, length_2), 2)

# Main functions. -> Write the main solution here
def solve():
    n, t1, t2, k = map(int, input().split())
    farmers = []
    for i in range(n):
        u, v = map(int, input().split())
        length = calc(u, v, t1, t2, k)
        farmers.append([i+1, length])

    farmers.sort(reverse=True, key=lambda x: x[1])
    for i in farmers:
        print(i)

# Single test cases
solve()


# Author: SaykaT
# Problem: 186B.py
# Time Created: September 13(Sunday) 2020 || 10:27:28

#>-------------------------<#

#>-------------------------<#

# Helper Functions. -> Don't cluster your code.
def calc(u, v, t1, t2, k):
    length_1 = (u*t1) - (u*t1*(k/100)) + (v*t2)
    length_2 = (v*t1) - (v*t1*(k/100)) + (u*t2)

    return round(max(length_1, length_2), 2)

# Main functions. -> Write the main solution here
def solve():
    n, t1, t2, k = map(int, input().split())
    farmers = []
    for i in range(n):
        u, v = map(int, input().split())
        length = calc(u, v, t1, t2, k)
        farmers.append([i+1, length])

    farmers.sort(reverse=True, key=lambda x: x[1])
    for i in farmers:
        print(*i)

# Single test cases
solve()


# Author: SaykaT
# Problem: 186B.py
# Time Created: September 13(Sunday) 2020 || 10:27:28

#>-------------------------<#

#>-------------------------<#

# Helper Functions. -> Don't cluster your code.
def calc(u, v, t1, t2, k):
    length_1 = (u*t1) - (u*t1*(k/100)) + (v*t2)
    length_2 = (v*t1) - (v*t1*(k/100)) + (u*t2)

    return (round(max(length_1, length_2), 2))

# Main functions. -> Write the main solution here
def solve():
    n, t1, t2, k = map(int, input().split())
    farmers = []
    for i in range(n):
        u, v = map(int, input().split())
        length = calc(u, v, t1, t2, k)
        farmers.append([i+1, length])

    farmers.sort(reverse=True, key=lambda x: x[1])
    for i in farmers:
        print(i[0], format(i[1], ".2f"))

# Single test cases
solve()


#!/usr/bin/python3
"B. Students and Shoelaces"
"Codeforces Beta Round #94 (Div. 2 Only)"
# n,m=map(int,input().split())
# d={}
# for i in range(m):
#     z,x=map(int,input().split())
#     d.setdefault(z,[])
#     d.setdefault(x,[])
#     d[z].append(x)
#     d[x].append(z)

# k=0
# while True:
#     f=0
#     t=[False]*(n+1)
#     # print(d)
#     for i in range(1,n+1):
#         if d.get(i) and len(d[i])==1 and t[i]==False:
#             # print(i,d[i])
#             asdf=d[i].pop(0)
#             d[asdf].remove(i)
#             t[asdf]=True
#             t[i]=True
#             f=1
#     if f==0:
#         break
#     k+=1
# print(k)
"Codeforces Round #272 (Div. 2)"
"B. Dreamoon and WiFi"
# q=0
# for i in input():
#     if i=='+':
#         q+=1
#     else:
#         q-=1
# a=k=0
# for i in input():
#     if i=='+':
#         k+=1
#     elif i=='-':
#         k-=1
#     else:
#         a+=1

# arr=[k]
# for i in range(a):
#     arr.extend(arr)
#     for j in range(int(len(arr)/2)):
#         arr[j]+=1
#     for j in range(int(len(arr)/2),len(arr)):
#         arr[j]-=1
# hit=arr.count(q)
# print(hit/2**a)
"Codeforces Round #268 (Div. 2)"
"B. Chat Online"
# p,q,l,r=map(int,input().split())
# z=[]
# x=[]
# for i in range(p):
#     a,b=map(int,input().split())
#     z.append([a,b])
# for i in range(q):
#     c,d=map(int,input().split())
#     x.append([c,d])
# s=[i for i in range(l,r+1)]
# s=set(s)
# lr=set()
# # print(z,x)
# for j in z:
#     for i in x:
#         add=[]
#         if i[0]>j[1]:
#             continue
#         elif i[0]>=j[0]:
#             add.extend([t for t in range(0,j[1]-i[0]+1)])
#         elif i[1]>=j[0]:
#             add.extend([t for t in range(0,j[1]-i[0]+1)])
#         elif i[1]<j[0]:
#             add.extend([t for t in range(j[0]-i[1],j[1]-i[0]+1)])
#         m=set(add)
#         # print(add,m,i,j)
#         lr=lr.union(m)
# # print(s,lr)
# print(len(s.intersection(lr)))
"Codeforces Round #132 (Div. 2)"
"B. Olympic Medal"
# from math import sqrt
# x=list(map(int,input().split()))
# y=list(map(int,input().split()))
# z=list(map(int,input().split()))
# r1=max(x[1:])
# p1=max(y[1:])
# p2=min(z[1:])
# a,b=map(int,input().split())
# bp1=b*p1
# ap2=a*p2
# r2=r1*sqrt(bp1/(bp1+ap2))
# print(r2)
"Codeforces Round #371 (Div. 2)"
"B. Filya and Homework"
# n=int(input())
# a=list(map(int,input().split()))
# s=list(set(a))
# if (len(s)==3 and sum(s)%3==0 and sum(s)/3 in s) or len(s)<3:
#     print("YES")
# else:
#     print("NO")
"Codeforces Round #234 (Div. 2)"
"B. Inna and New Matrix of Candies"
# n,m=map(int,input().split())
# r=[]
# for i in range(n):
#     a=list(input())
#     fg=0
#     d=0
#     for j in range(m):
#         if a[j]=='G':
#             fg=j+1
#         elif fg==0 and a[j]=='S':
#             fg=-1
#             break
#         elif fg!=0 and a[j]=='S':
#             d+=1
#             break
#         elif fg!=0:
#             d+=1
#     if fg==-1:
#         print(-1)
#         break
#     r.append(d)
# # print(r)
# if fg!=-1:
#     print(len(set(r)))
"Codeforces Round #108 (Div. 2)"
"B. Steps"
# n,m=map(int,input().split())
# x,y=map(int,input().split())
# k=int(input())
# d=0
# for i in range(k):
#     a,b=map(int,input().split())
#     na1=na2=nb1=nb2=0
#     if a!=0:
#         na1=int((n-x)/a)
#         na2=int((1-x)/a)
#     if b!=0:
#         nb1=int((m-y)/b)
#         nb2=int((1-y)/b)
#     na=max(na1,na2)
#     nb=max(nb1,nb2)
#     if a==0 or b==0:
#         na+=nb
#         nb=na
#     z=min(na,nb)
#     d+=z
#     x+=z*a
#     y+=z*b
#     # print(na1,na2,nb1,nb2)
#     # print(d,x,y)
# print(d)
"Codeforces Round #118 (Div. 2)"
"B. Growing Mushrooms"
from operator import itemgetter
n,t1,t2,k=map(int,input().split())
arr=[]
k=(100-k)/100
for i in range(1,n+1):
    a,b=map(int,input().split())
    p=(a*t1*k)+(b*t2)
    q=(b*t1*k)+(a*t2)
    arr.append([max(p,q),i])
# arr.sort(key= lambda l: l[1],reverse=True)
# print(arr)
# arr.sort(key= lambda l: (l[0]),reverse=True)
s = sorted(arr, key= lambda l : l[1])
s=sorted(s, key= lambda l : l[0], reverse=True)
for i in s:
    print(i[1],"{0:.2f}".format(i[0]))


#from sys import maxsize
#from collections import Counter as cnt, defaultdict as dic
#import string
from decimal import Decimal as de
get_int = lambda: int(input())
get_mul_int = lambda: map(int, input().rstrip().split())
get_list = lambda: list(map(int, input().rstrip().split()))

TEST_CASES = False
def main():
    n,t1,t2,k=get_mul_int()
    table= []
    for j in range(n):
        a,b=get_mul_int()
        h1=(de(a*t1*((100-k)/100))+(b*t2))
        h2=(de(b*t1*((100-k)/100))+(a*t2))
        table.append([j+1,round(max(h1,h2),2)])
    new=sorted(table,key=lambda x: x[-1],reverse=True)
    for i in new:
        print(*i)

# START
if not TEST_CASES: main()
else: [main() for _ in range(int(input()))]


#include <bits/stdc++.h>

#define in freopen("input.txt", "r", stdin);
#define out freopen("output.txt", "w", stdout);
#define clr(arr, key) memset(arr, key, sizeof arr)
#define pb push_back
#define mp(a, b) make_pair(a, b)
#define infinity (1 << 28)
#define LL long long
#define PI acos(-1)
#define gcd(a, b) __gcd(a, b)
#define CF ios_base::sync_with_stdio(0);cin.tie(0);
#define lcm(a, b) ((a)*((b)/gcd(a,b)))
#define all(v) v.begin(), v.end()
#define no_of_ones __builtin_popcount // __builtin_popcountll for LL
#define SZ(v) (int)(v.size())
#define eps 1e-7

//int col[8] = {0, 1, 1, 1, 0, -1, -1, -1};
//int row[8] = {1, 1, 0, -1, -1, -1, 0, 1};
//int col[4] = {1, 0, -1, 0};
//int row[4] = {0, 1, 0, -1};
//int months[13] = {0, ,31,28,31,30,31,30,31,31,30,31,30,31};

using namespace std;

struct point{int x, y; point () {} point(int a, int b) {x = a, y = b;}};
template <class T> T sqr(T a){return a * a;}
template <class T> T power(T n, T p) { T res = 1; for(int i = 0; i < p; i++) res *= n; return res;}
template <class T> double getdist(T a, T b){return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));}    // distance between a and b
template <class T> T extract(string s, T ret) {stringstream ss(s); ss >> ret; return ret;}
template <class T> string tostring(T n) {stringstream ss; ss << n; return ss.str();}
//LL bigmod(LL B,LL P,LL M){LL R=1; while(P>0)  {if(P%2==1){R=(R*B)%M;}P/=2;B=(B*B)%M;} return R;}
struct fast{fast(){ios_base::sync_with_stdio(0);cin.tie(0);}}cincout;

#define MAX 400010
/***********************************THE GRASS IS ALWAYS GREENER ON THE OTHER SIDE***********************************/
struct info
{
    int tup[2], indx; //tup[0] = prev rank, tup[1] = new rank
}arr[MAX];

int n, sorted[20][MAX], step;
char text[MAX];

bool comp(const info &a, const info &b)
{
    return a.tup[0] != b.tup[0]? a.tup[0] < b.tup[0] : a.tup[1] < b.tup[1];
}

void build_suffix_array(void)
{
    int i, jump;
    for(i = 0; i < n; i++)
    {
        sorted[0][i] = text[i] - 'a'; //rank suffixes according to 1st char
//        clr(arr[i].tup, 0);
    }
    for(step = 1, jump = 1; jump <= n; step++, jump <<= 1)
    {
        for(i = 0; i <=n; i++)
        {
            arr[i].indx = i;
            arr[i].tup[0] = sorted[step - 1][i]; // what i was in prev step
            arr[i].tup[1] = i + jump < n? sorted[step - 1][i + jump] : -1;
        }
        sort(arr, arr + n, comp);
        sorted[step][arr[0].indx] = 0;
        for(i = 1; i < n; i++)
            sorted[step][arr[i].indx] = arr[i].tup[0] == arr[i - 1].tup[0] &&
            arr[i].tup[1] == arr[i - 1].tup[1] ? sorted[step][arr[i - 1].indx] : i;
    }
//    cout << "Suffix Array : \n\n";
//    for(i = 0; i < n; i++)
//        cout<<arr[i].indx<<' '<<text.substr(arr[i].indx)<<endl;
}

int lcp(int x, int y) {
    int k, ret = 0;
    if (x == y) return n - x;
    for (k = step - 1; k >= 0 && x < n && y < n; k--) {
        if (sorted[k][x] == sorted[k][y]) {
            x += (1 << k);
            y += (1 << k);
            ret += (1 << k);
        }
    }
    return ret;
}

int LCP(int id1, int id2)
{
    int ret = 0;
    int j;
    for(j = step - 1; j >= 0 && id1 < n && id2 < n; j--)
        if(sorted[j][id1] == sorted[j][id2])
        {
            ret += (1 << j);
            id1 += (1 << j);
            id2 += (1 << j);
        }
    return ret;
//    for(i = 0; i < n; i++)
//        cout << i << ' ' << LCP[i] << endl;
}

bool ok(int l, int r, int len)
{
    if(LCP(l, r) >= len)
        return true;
    if(len % 2)
        return false;
    if(ok(l, r, len/2) && ok(l+(len/2), r + (len/2), len/2))
        return true;
    if(ok(l, r+(len/2), len/2) && ok(l+(len/2), r, len/2))
        return true;
    return false;
}

bool eq(int a, int b, int c, int d) {
    int l;
    l = b - a + 1;
    if (LCP(a, c) >= l) return true;
    if (l % 2 == 1) return false;
    return (eq(a, (a + b) / 2, (c + d) / 2 + 1, d) && eq((a + b) / 2 + 1, b, c, (c + d) / 2))
           || (eq(a, (a + b) / 2, c, (c + d) / 2) && eq((a + b) / 2 + 1, b, (c + d) / 2 + 1, d));
}

char s[MAX];

int main()
{
    scanf("%s %s", text, s);
    n = strlen(text);
    int i = 0;
    while(s[i])
        text[n++] = s[i++];
    build_suffix_array();
    if(ok(0, n-i, i))
        cout << "YES";
    else
        cout << "NO";
    return 0;
}


#include <bits/stdc++.h>

#define in freopen("input.txt", "r", stdin);
#define out freopen("output.txt", "w", stdout);
#define clr(arr, key) memset(arr, key, sizeof arr)
#define pb push_back
#define mp(a, b) make_pair(a, b)
#define infinity (1 << 28)
#define LL long long
#define PI acos(-1)
#define gcd(a, b) __gcd(a, b)
#define CF ios_base::sync_with_stdio(0);cin.tie(0);
#define lcm(a, b) ((a)*((b)/gcd(a,b)))
#define all(v) v.begin(), v.end()
#define no_of_ones __builtin_popcount // __builtin_popcountll for LL
#define SZ(v) (int)(v.size())
#define eps 1e-7

//int col[8] = {0, 1, 1, 1, 0, -1, -1, -1};
//int row[8] = {1, 1, 0, -1, -1, -1, 0, 1};
//int col[4] = {1, 0, -1, 0};
//int row[4] = {0, 1, 0, -1};
//int months[13] = {0, ,31,28,31,30,31,30,31,31,30,31,30,31};

using namespace std;

struct point{int x, y; point () {} point(int a, int b) {x = a, y = b;}};
template <class T> T sqr(T a){return a * a;}
template <class T> T power(T n, T p) { T res = 1; for(int i = 0; i < p; i++) res *= n; return res;}
template <class T> double getdist(T a, T b){return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));}    // distance between a and b
template <class T> T extract(string s, T ret) {stringstream ss(s); ss >> ret; return ret;}
template <class T> string tostring(T n) {stringstream ss; ss << n; return ss.str();}
//LL bigmod(LL B,LL P,LL M){LL R=1; while(P>0)  {if(P%2==1){R=(R*B)%M;}P/=2;B=(B*B)%M;} return R;}
struct fast{fast(){ios_base::sync_with_stdio(0);cin.tie(0);}}cincout;

#define MAX 400010
/***********************************THE GRASS IS ALWAYS GREENER ON THE OTHER SIDE***********************************/
struct info
{
    int tup[2], indx; //tup[0] = prev rank, tup[1] = new rank
}arr[MAX];

int sorted[20][MAX], step;
string text;

bool comp(const info &a, const info &b)
{
    return a.tup[0] != b.tup[0]? a.tup[0] < b.tup[0] : a.tup[1] < b.tup[1];
}

void build_suffix_array(void)
{
    int i, n = SZ(text), jump;
    for(i = 0; i < n; i++)
    {
        sorted[0][i] = text[i] - 'a'+1; //rank suffixes according to 1st char
//        clr(arr[i].tup, 0);
    }
    for(step = 1, jump = 1; jump <= n; step++, jump <<= 1)
    {
        for(i = 0; i <=n; i++)
        {
            arr[i].indx = i;
            arr[i].tup[0] = sorted[step - 1][i]; // what i was in prev step
            arr[i].tup[1] = i + jump < n? sorted[step - 1][i + jump] : -1;
        }
        sort(arr, arr + n, comp);
        sorted[step][arr[0].indx] = 0;
        for(i = 1; i < n; i++)
            sorted[step][arr[i].indx] = arr[i].tup[0] == arr[i - 1].tup[0] &&
            arr[i].tup[1] == arr[i - 1].tup[1] ? sorted[step][arr[i - 1].indx] : i;
    }
//    cout << "Suffix Array : \n\n";
//    for(i = 0; i < n; i++)
//        cout<<arr[i].indx<<' '<<text.substr(arr[i].indx)<<endl;
}

int LCP(int id1, int id2)
{
    int ret = 0;
    int n = SZ(text), i, j;
    for(i = 1; i < n; i++)
    {
        for(j = step - 1; j >= 0; j--)
            if(sorted[j][id1] == sorted[j][id2] && sorted[j][id1])
            {
                ret += (1 << j);
                id1 += (1 << j);
                id2 += (1 << j);
            }
    }
    return ret;
//    for(i = 0; i < n; i++)
//        cout << i << ' ' << LCP[i] << endl;
}

string s1, s2;
map <tuple<int,int, int>, bool> mpp;

bool ok(int l, int r, int len)
{
    tuple <int,int, int> look = make_tuple(l, r, len);
    if(mpp.find(look) != mpp.end())
        return mpp[look];
    bool &ret = mpp[look];
    if(LCP(l, r) >= len)
        return ret = true;
    if(len % 2)
        return ret = false;
    if(ok(l, r, len/2) && ok(l+(len/2), r + (len/2), len/2))
        return ret = true;
    if(ok(l, r+(len/2), len/2) && ok(l+(len/2), r, len/2))
        return ret = true;
    return ret = false;
}

int main()
{
    cin >> s1 >> s2;
    text = s1 + "#" + s2;
    build_suffix_array();
    if(ok(0, SZ(s1)+1, SZ(s1)))
        cout << "YES";
    else
        cout << "NO";
    return 0;
}


#include <bits/stdc++.h>

#define in freopen("input.txt", "r", stdin);
#define out freopen("output.txt", "w", stdout);
#define clr(arr, key) memset(arr, key, sizeof arr)
#define pb push_back
#define mp(a, b) make_pair(a, b)
#define infinity (1 << 28)
#define LL long long
#define PI acos(-1)
#define gcd(a, b) __gcd(a, b)
#define CF ios_base::sync_with_stdio(0);cin.tie(0);
#define lcm(a, b) ((a)*((b)/gcd(a,b)))
#define all(v) v.begin(), v.end()
#define no_of_ones __builtin_popcount // __builtin_popcountll for LL
#define SZ(v) (int)(v.size())
#define eps 1e-7

//int col[8] = {0, 1, 1, 1, 0, -1, -1, -1};
//int row[8] = {1, 1, 0, -1, -1, -1, 0, 1};
//int col[4] = {1, 0, -1, 0};
//int row[4] = {0, 1, 0, -1};
//int months[13] = {0, ,31,28,31,30,31,30,31,31,30,31,30,31};

using namespace std;

struct point{int x, y; point () {} point(int a, int b) {x = a, y = b;}};
template <class T> T sqr(T a){return a * a;}
template <class T> T power(T n, T p) { T res = 1; for(int i = 0; i < p; i++) res *= n; return res;}
template <class T> double getdist(T a, T b){return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));}    // distance between a and b
template <class T> T extract(string s, T ret) {stringstream ss(s); ss >> ret; return ret;}
template <class T> string tostring(T n) {stringstream ss; ss << n; return ss.str();}
//LL bigmod(LL B,LL P,LL M){LL R=1; while(P>0)  {if(P%2==1){R=(R*B)%M;}P/=2;B=(B*B)%M;} return R;}
struct fast{fast(){ios_base::sync_with_stdio(0);cin.tie(0);}}cincout;

#define MAX 400010
/***********************************THE GRASS IS ALWAYS GREENER ON THE OTHER SIDE***********************************/
struct info
{
    int tup[2], indx; //tup[0] = prev rank, tup[1] = new rank
}arr[MAX];

int sorted[20][MAX], step;
string text;

bool comp(const info &a, const info &b)
{
    return a.tup[0] != b.tup[0]? a.tup[0] < b.tup[0] : a.tup[1] < b.tup[1];
}

void build_suffix_array(void)
{
    int i, n = SZ(text), jump;
    for(i = 0; i < n; i++)
    {
        sorted[0][i] = text[i] - 'a'; //rank suffixes according to 1st char
//        clr(arr[i].tup, 0);
    }
    for(step = 1, jump = 1; jump <= n; step++, jump <<= 1)
    {
        for(i = 0; i <=n; i++)
        {
            arr[i].indx = i;
            arr[i].tup[0] = sorted[step - 1][i]; // what i was in prev step
            arr[i].tup[1] = i + jump < n? sorted[step - 1][i + jump] : -1;
        }
        sort(arr, arr + n, comp);
        sorted[step][arr[0].indx] = 0;
        for(i = 1; i < n; i++)
            sorted[step][arr[i].indx] = arr[i].tup[0] == arr[i - 1].tup[0] &&
            arr[i].tup[1] == arr[i - 1].tup[1] ? sorted[step][arr[i - 1].indx] : i;
    }
//    cout << "Suffix Array : \n\n";
//    for(i = 0; i < n; i++)
//        cout<<arr[i].indx<<' '<<text.substr(arr[i].indx)<<endl;
}

int LCP(int id1, int id2)
{
    int ret = 0;
    int n = SZ(text), i, j;
    for(i = 1; i < n; i++)
    {
        for(j = step - 1; j >= 0; j--)
            if(sorted[j][id1] == sorted[j][id2])
            {
                ret += (1 << j);
                id1 += (1 << j);
                id2 += (1 << j);
            }
    }
    return ret;
//    for(i = 0; i < n; i++)
//        cout << i << ' ' << LCP[i] << endl;
}

string s1, s2;

bool ok(int l, int r, int len)
{
    if(LCP(l, r) >= len)
        return true;
    if(len % 2)
        return false;
    if(ok(l, r, len/2) && ok(l+(len/2), r + (len/2), len/2))
        return true;
    if(ok(l, r+(len/2), len/2) && ok(l+(len/2), r, len/2))
        return true;
    return false;
}

bool eq(int a, int b, int c, int d) {
    int l;
    l = b - a + 1;
    if (LCP(a, c) >= l) return true;
    if (l % 2 == 1) return false;
    return (eq(a, (a + b) / 2, (c + d) / 2 + 1, d) && eq((a + b) / 2 + 1, b, c, (c + d) / 2))
           || (eq(a, (a + b) / 2, c, (c + d) / 2) && eq((a + b) / 2 + 1, b, (c + d) / 2 + 1, d));
}

int main()
{
    cin >> s1 >> s2;
    text = s1 + s2;
    build_suffix_array();
    if(eq(0, SZ(s1)-1, SZ(s1)+1, SZ(text)-1))
        cout << "YES";
    else
        cout << "NO";
    return 0;
}


#include <bits/stdc++.h>

#define in freopen("input.txt", "r", stdin);
#define out freopen("output.txt", "w", stdout);
#define clr(arr, key) memset(arr, key, sizeof arr)
#define pb push_back
#define mp(a, b) make_pair(a, b)
#define infinity (1 << 28)
#define LL long long
#define PI acos(-1)
#define gcd(a, b) __gcd(a, b)
#define CF ios_base::sync_with_stdio(0);cin.tie(0);
#define lcm(a, b) ((a)*((b)/gcd(a,b)))
#define all(v) v.begin(), v.end()
#define no_of_ones __builtin_popcount // __builtin_popcountll for LL
#define SZ(v) (int)(v.size())
#define eps 1e-7

//int col[8] = {0, 1, 1, 1, 0, -1, -1, -1};
//int row[8] = {1, 1, 0, -1, -1, -1, 0, 1};
//int col[4] = {1, 0, -1, 0};
//int row[4] = {0, 1, 0, -1};
//int months[13] = {0, ,31,28,31,30,31,30,31,31,30,31,30,31};

using namespace std;

struct point{int x, y; point () {} point(int a, int b) {x = a, y = b;}};
template <class T> T sqr(T a){return a * a;}
template <class T> T power(T n, T p) { T res = 1; for(int i = 0; i < p; i++) res *= n; return res;}
template <class T> double getdist(T a, T b){return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));}    // distance between a and b
template <class T> T extract(string s, T ret) {stringstream ss(s); ss >> ret; return ret;}
template <class T> string tostring(T n) {stringstream ss; ss << n; return ss.str();}
//LL bigmod(LL B,LL P,LL M){LL R=1; while(P>0)  {if(P%2==1){R=(R*B)%M;}P/=2;B=(B*B)%M;} return R;}
//struct fast{fast(){ios_base::sync_with_stdio(0);cin.tie(0);}}cincout;

#define MAX 400010
/***********************************THE GRASS IS ALWAYS GREENER ON THE OTHER SIDE***********************************/
struct info
{
    int tup[2], indx; //tup[0] = prev rank, tup[1] = new rank
}arr[MAX];
char str[MAX];

int sorted[20][MAX], step;
string text;

bool comp(const info &a, const info &b)
{
    return a.tup[0] != b.tup[0]? a.tup[0] < b.tup[0] : a.tup[1] < b.tup[1];
}

void build_suffix_array(void)
{
    int i, n = SZ(text), jump;
    for(i = 0; i < n; i++)
    {
        sorted[0][i] = text[i] - 'a'+1; //rank suffixes according to 1st char
//        clr(arr[i].tup, 0);
    }
    for(step = 1, jump = 1; jump <= n; step++, jump <<= 1)
    {
        for(i = 0; i <=n; i++)
        {
            arr[i].indx = i;
            arr[i].tup[0] = sorted[step - 1][i]; // what i was in prev step
            arr[i].tup[1] = i + jump < n? sorted[step - 1][i + jump] : -1;
        }
        sort(arr, arr + n, comp);
        sorted[step][arr[0].indx] = 0;
        for(i = 1; i < n; i++)
            sorted[step][arr[i].indx] = arr[i].tup[0] == arr[i - 1].tup[0] &&
            arr[i].tup[1] == arr[i - 1].tup[1] ? sorted[step][arr[i - 1].indx] : i;
    }
//    cout << "Suffix Array : \n\n";
//    for(i = 0; i < n; i++)
//        cout<<arr[i].indx<<' '<<text.substr(arr[i].indx)<<endl;
}

int LCP(int id1, int id2)
{
    int ret = 0;
    int n = SZ(text), i, j;
    for(i = 1; i < n; i++)
    {
        for(j = step - 1; j >= 0; j--)
            if(sorted[j][id1] == sorted[j][id2] && sorted[j][id1])
            {
                ret += (1 << j);
                id1 += (1 << j);
                id2 += (1 << j);
            }
    }
    return ret;
//    for(i = 0; i < n; i++)
//        cout << i << ' ' << LCP[i] << endl;
}

string s1, s2;
map <tuple<int,int, int>, bool> mpp;
int cum[26][MAX];

bool ok(int l, int r, int len)
{
    tuple <int,int, int> look = make_tuple(l, r, len);
    if(mpp.find(look) != mpp.end())
        return mpp[look];
    bool &ret = mpp[look];
    if(LCP(l, r) >= len)
        return ret = true;
    if(len % 2)
        return ret = false;
    int i;
    for(i = 0; i < 26; i++)
        if(cum[i][l+len-1]-cum[i][l-1] != cum[i][r+len-1]-cum[i][r-1])
            return ret = false;
    if(ok(l, r, len/2) && ok(l+(len/2), r + (len/2), len/2))
        return ret = true;
    if(ok(l, r+(len/2), len/2) && ok(l+(len/2), r, len/2))
        return ret = true;
    return ret = false;
}

int main()
{
//    in;
    int i, j;
    scanf(" %s", str);
    s1 = str;
    scanf(" %s", str);
    s2 = str;
    text = "$" + s1 + "#" + s2;
    build_suffix_array();
    for(j = 0; j < 26; j++)
    {
        for(i = 1; i < SZ(text); i++)
        {
            cum[j][i] = cum[j][i-1] + (text[i]-'a' == j);
        }
    }
    if(ok(1, SZ(s1)+2, SZ(s1)))
        cout << "YES";
    else
        cout << "NO";
    return 0;
}


#include <bits/stdc++.h>

#define in freopen("input.txt", "r", stdin);
#define out freopen("output.txt", "w", stdout);
#define clr(arr, key) memset(arr, key, sizeof arr)
#define pb push_back
#define mp(a, b) make_pair(a, b)
#define infinity (1 << 28)
#define LL long long
#define PI acos(-1)
#define gcd(a, b) __gcd(a, b)
#define CF ios_base::sync_with_stdio(0);cin.tie(0);
#define lcm(a, b) ((a)*((b)/gcd(a,b)))
#define all(v) v.begin(), v.end()
#define no_of_ones __builtin_popcount // __builtin_popcountll for LL
#define SZ(v) (int)(v.size())
#define eps 1e-7

//int col[8] = {0, 1, 1, 1, 0, -1, -1, -1};
//int row[8] = {1, 1, 0, -1, -1, -1, 0, 1};
//int col[4] = {1, 0, -1, 0};
//int row[4] = {0, 1, 0, -1};
//int months[13] = {0, ,31,28,31,30,31,30,31,31,30,31,30,31};

using namespace std;

struct point{int x, y; point () {} point(int a, int b) {x = a, y = b;}};
template <class T> T sqr(T a){return a * a;}
template <class T> T power(T n, T p) { T res = 1; for(int i = 0; i < p; i++) res *= n; return res;}
template <class T> double getdist(T a, T b){return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));}    // distance between a and b
template <class T> T extract(string s, T ret) {stringstream ss(s); ss >> ret; return ret;}
template <class T> string tostring(T n) {stringstream ss; ss << n; return ss.str();}
//LL bigmod(LL B,LL P,LL M){LL R=1; while(P>0)  {if(P%2==1){R=(R*B)%M;}P/=2;B=(B*B)%M;} return R;}
struct fast{fast(){ios_base::sync_with_stdio(0);cin.tie(0);}}cincout;

#define MAX 400010
/***********************************THE GRASS IS ALWAYS GREENER ON THE OTHER SIDE***********************************/
struct info
{
    int tup[2], indx; //tup[0] = prev rank, tup[1] = new rank
}arr[MAX];

int sorted[20][MAX], step;
string text;

bool comp(const info &a, const info &b)
{
    return a.tup[0] != b.tup[0]? a.tup[0] < b.tup[0] : a.tup[1] < b.tup[1];
}

void build_suffix_array(void)
{
    int i, n = SZ(text), jump;
    for(i = 0; i < n; i++)
    {
        sorted[0][i] = text[i] - 'a'+1; //rank suffixes according to 1st char
//        clr(arr[i].tup, 0);
    }
    for(step = 1, jump = 1; jump <= n; step++, jump <<= 1)
    {
        for(i = 0; i <=n; i++)
        {
            arr[i].indx = i;
            arr[i].tup[0] = sorted[step - 1][i]; // what i was in prev step
            arr[i].tup[1] = i + jump < n? sorted[step - 1][i + jump] : -1;
        }
        sort(arr, arr + n, comp);
        sorted[step][arr[0].indx] = 0;
        for(i = 1; i < n; i++)
            sorted[step][arr[i].indx] = arr[i].tup[0] == arr[i - 1].tup[0] &&
            arr[i].tup[1] == arr[i - 1].tup[1] ? sorted[step][arr[i - 1].indx] : i;
    }
//    cout << "Suffix Array : \n\n";
//    for(i = 0; i < n; i++)
//        cout<<arr[i].indx<<' '<<text.substr(arr[i].indx)<<endl;
}

int LCP(int id1, int id2)
{
    int ret = 0;
    int n = SZ(text), i, j;
    for(i = 1; i < n; i++)
    {
        for(j = step - 1; j >= 0; j--)
            if(sorted[j][id1] == sorted[j][id2] && sorted[j][id1])
            {
                ret += (1 << j);
                id1 += (1 << j);
                id2 += (1 << j);
            }
    }
    return ret;
//    for(i = 0; i < n; i++)
//        cout << i << ' ' << LCP[i] << endl;
}

string s1, s2;
map <pair<int,int>, bool> mpp;

bool ok(int l, int r, int len)
{
    pair <int,int> look = {l, r};
    if(mpp.find(look) != mpp.end())
        return mpp[look];
    bool &ret = mpp[look];
    if(LCP(l, r) >= len)
        return ret = true;
    if(len % 2)
        return ret = false;
    if(ok(l, r, len/2) && ok(l+(len/2), r + (len/2), len/2))
        return ret = true;
    if(ok(l, r+(len/2), len/2) && ok(l+(len/2), r, len/2))
        return ret = true;
    return ret = false;
}

int main()
{
    cin >> s1 >> s2;
    text = s1 + "#" + s2;
    build_suffix_array();
    if(ok(0, SZ(s1)+1, SZ(s1)))
        cout << "YES";
    else
        cout << "NO";
    return 0;
}


#include <bits/stdc++.h>

#define in freopen("input.txt", "r", stdin);
#define out freopen("output.txt", "w", stdout);
#define clr(arr, key) memset(arr, key, sizeof arr)
#define pb push_back
#define mp(a, b) make_pair(a, b)
#define infinity (1 << 28)
#define LL long long
#define PI acos(-1)
#define gcd(a, b) __gcd(a, b)
#define CF ios_base::sync_with_stdio(0);cin.tie(0);
#define lcm(a, b) ((a)*((b)/gcd(a,b)))
#define all(v) v.begin(), v.end()
#define no_of_ones __builtin_popcount // __builtin_popcountll for LL
#define SZ(v) (int)(v.size())
#define eps 1e-7

//int col[8] = {0, 1, 1, 1, 0, -1, -1, -1};
//int row[8] = {1, 1, 0, -1, -1, -1, 0, 1};
//int col[4] = {1, 0, -1, 0};
//int row[4] = {0, 1, 0, -1};
//int months[13] = {0, ,31,28,31,30,31,30,31,31,30,31,30,31};

using namespace std;

struct point{int x, y; point () {} point(int a, int b) {x = a, y = b;}};
template <class T> T sqr(T a){return a * a;}
template <class T> T power(T n, T p) { T res = 1; for(int i = 0; i < p; i++) res *= n; return res;}
template <class T> double getdist(T a, T b){return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));}    // distance between a and b
template <class T> T extract(string s, T ret) {stringstream ss(s); ss >> ret; return ret;}
template <class T> string tostring(T n) {stringstream ss; ss << n; return ss.str();}
//LL bigmod(LL B,LL P,LL M){LL R=1; while(P>0)  {if(P%2==1){R=(R*B)%M;}P/=2;B=(B*B)%M;} return R;}
struct fast{fast(){ios_base::sync_with_stdio(0);cin.tie(0);}}cincout;

#define MAX 400010
/***********************************THE GRASS IS ALWAYS GREENER ON THE OTHER SIDE***********************************/
struct info
{
    int tup[2], indx; //tup[0] = prev rank, tup[1] = new rank
}arr[MAX];

int sorted[20][MAX], step;
string text;

bool comp(const info &a, const info &b)
{
    return a.tup[0] != b.tup[0]? a.tup[0] < b.tup[0] : a.tup[1] < b.tup[1];
}

void build_suffix_array(void)
{
    int i, n = SZ(text), jump;
    for(i = 0; i < n; i++)
    {
        sorted[0][i] = text[i] - 'a'+1; //rank suffixes according to 1st char
//        clr(arr[i].tup, 0);
    }
    for(step = 1, jump = 1; jump <= n; step++, jump <<= 1)
    {
        for(i = 0; i <=n; i++)
        {
            arr[i].indx = i;
            arr[i].tup[0] = sorted[step - 1][i]; // what i was in prev step
            arr[i].tup[1] = i + jump < n? sorted[step - 1][i + jump] : -1;
        }
        sort(arr, arr + n, comp);
        sorted[step][arr[0].indx] = 0;
        for(i = 1; i < n; i++)
            sorted[step][arr[i].indx] = arr[i].tup[0] == arr[i - 1].tup[0] &&
            arr[i].tup[1] == arr[i - 1].tup[1] ? sorted[step][arr[i - 1].indx] : i;
    }
//    cout << "Suffix Array : \n\n";
//    for(i = 0; i < n; i++)
//        cout<<arr[i].indx<<' '<<text.substr(arr[i].indx)<<endl;
}

int LCP(int id1, int id2)
{
    int ret = 0;
    int n = SZ(text), i, j;
    for(j = step - 1; j >= 0; j--)
        if(sorted[j][id1] == sorted[j][id2] && sorted[j][id1])
        {
            ret += (1 << j);
            id1 += (1 << j);
            id2 += (1 << j);
        }
    return ret;
//    for(i = 0; i < n; i++)
//        cout << i << ' ' << LCP[i] << endl;
}

string s1, s2;

bool ok(int l, int r, int len)
{
    if(LCP(l, r) >= len)
        return true;
    if(len % 2)
        return false;
    if(ok(l, r, len/2) && ok(l+(len/2), r + (len/2), len/2))
        return true;
    if(ok(l, r+(len/2), len/2) && ok(l+(len/2), r, len/2))
        return true;
    return false;
}

int main()
{
    cin >> s1 >> s2;
    text = s1 + "#" + s2;
    build_suffix_array();
    if(ok(0, SZ(s1)+1, SZ(s1)))
        cout << "YES";
    else
        cout << "NO";
    return 0;
}