#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mkp make_pair
#define vi vector<int>
#define pii pair<int,int>
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define ull unsigned long long
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i,k,j) for(int i=(k);i>=(j);i--)
#define For(i,k,j) for(int i=(k);i<=(j);i++)
#define Foe(i,u) for(int i=lst[u],v=e[i].v;i;i=e[i].nxt,v=e[i].v)
#define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define Fin(s) freopen(s,"r",stdin)
#define Fout(s) freopen(s,"w",stdout)
#define file(s) Fin(s".in"),Fout(s".out")
#define INF ((1ll<<60)-1)
#define int long long
const int P=998244353; //
using namespace std;
template<typename T>inline void ckmax(T &a,T b) {(a<b)&&(a=b);}
template<typename T>inline void ckmin(T &a,T b) {(a>b)&&(a=b);}
inline int mul(int a,int b) {return 1ull*a*b%P;}
inline int add(int a,int b) {return a+b>=P?a+b-P:a+b;}
inline int sub(int a,int b) {return a-b>=0?a-b:a-b+P;}
inline void mulmod(int &a,int b) {a=mul(a, b);}
inline void addmod(int &a,int b) {((a+=b)>=P)&&(a-=P);}
inline void submod(int &a,int b) {((a-=b)<0)&&(a+=P);}
inline int ksm(int a,int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline void fprint(const int &x,char c=' ') {fprintf(stderr,"%d%c",x,c);}
inline void fprint(const pii &x,char c='\n') {fprintf(stderr,"%d %d%c",x.first,x.second,c);}
inline void fprint(const int *f,const int &n,char c='\n') {for(int i=1;i<=n;i++) fprint(f[i]); fprintf(stderr,"%c",c);}
inline void fprint(const vector<int> &f,char c='\n') {for(int i=0;i<(int)f.size();i++) fprint(f[i]); fprintf(stderr,"%c",c);}
inline int inv(int a) {return ksm(a,P-2);}
namespace FastIO {
  const int SIZE=1<<16; char buf[SIZE],obuf[SIZE],str[64]; int bi=SIZE,bn=SIZE,opt;
  int read(char *s) {
    while (bn) {for (;bi<bn&&buf[bi]<=' ';bi++);if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}
    int sn=0;while (bn) {for (;bi<bn&&buf[bi]>' ';bi++) s[sn++]=buf[bi];if (bi<bn) break; bn=fread(buf,1,SIZE,stdin),bi=0;}s[sn]=0;return sn;
  }
  bool read(int& x) {if(x)x=0;int bf=0,n=read(str); if(!n) return 0; int i=0; if (str[i]=='-') bf=1,i=1; for(x=0;i<n;i++) x=x*10+str[i]-'0'; if(bf) x=-x; return 1;}
  void write(int x) {
    if(!x) obuf[opt++]='0'; else {if(x<0) obuf[opt++]='-',x=-x;int sn=0; while(x)str[sn++]=x%10+'0',x/=10;for (int i=sn-1;i>=0;i--) obuf[opt++]=str[i];}
    if (opt>=(SIZE>>1)){fwrite(obuf,1,opt,stdout); opt=0;}
  }
  void write(char x) {obuf[opt++]=x;if (opt>=(SIZE>>1)){fwrite(obuf,1,opt,stdout); opt=0;}}
	void Fflush() {if (opt) fwrite(obuf,1,opt,stdout); opt=0;}
};
inline int read() {int x; FI(x); return x;}
const int MN=3e5+5;
int n,a[MN],sum,pw[MN];
signed main() {
	#ifndef ONLINE_JUDGE
		freopen("pro.in","r",stdin);
		freopen("pro.out","w",stdout);
	#endif
	n=read();
	pw[0]=1; For(i,1,n) a[i]=read(),pw[i]=mul(pw[i-1],2);
	sort(a+1,a+1+n,greater<int>());
	foR(i,n,1) {
		mulmod(sum,2); addmod(sum,a[i]);	
	}
	int ans=0;
	For(i,1,n) {
		submod(sum,a[i]);
		mulmod(sum,inv(2));
		addmod(ans,mul(a[i],sum));
	}
	For(i,1,n) {
		addmod(ans,mul(a[i],a[i]));
	}
	
	cout<<ans<<endl;
	return FastIO::Fflush(),0; 
}
/*

*/

//Author : RISHABH (still under construction)
//Don't give up if you can't solve problem !

//TIPS : //copied from Benq
/*
	--> check out for integer overflows
	--> special cases like n==1 
	--> do something instead of just sitting and fooling around
	--> write everything before you forget
	--> think of various approaches 
	--> think if all the cases are similar by taking one case 
	--> "NEVER USE FLOAT OR DOUBLE IF YOU HAVE NOT BEEN GIVEN THE ANS AS FLOAT OR DOUBLE"
*/

//includes all headder files :
#include <bits/stdc++.h>

//standard namespace :
using namespace std ;

//defining macros :
#define ll long long 
#define fo(i , k , n) for(int i = k ; i < n ; i++)
#define pb push_back 
#define eb embrace_back
#define rtn return 
#define mp make_pair
#define f first 
#define s second 
#define all(x) x.begin() , x.end() //forward traversal
#define rall(x) (x).rbegin, (x).rend() //reverse traversal
#define sz(a) int((a).size()) // Avoiding wrap around of size()-1 where size is a unsigned int.
#define sortall(x) sort(all(x))
#define rep(it , v) for(auto it = v.begin() ; it != v.end() ; it++)
#define each(a,x) for(auto& a : x)
#define ft front 
#define bk back 
#define print(x) cout << (x) ;
#define printarr(x) cout << (x) << " " ; //Credit - Harsh (cf handle : silvermirror)
#define nline endl ;
#define max(a,b,c) fmax(fmax(a,b) , c)
#define min(a,b,c) fmin(fmin(a,b) , c) 
#define square(x) x*x 
#define cube(x) x*x*x
#define cin(x) cin >> x ;
#define cin2(a,b) cin >> a >> b ;
#define cin3(a,b,c) cin >> a >> b >> c ;
#define cin4(a,b,c,d) cin >> a >> b >> c >> d ;
#define gline(s) getline(cin , a) ;
#define sortarr(a,n) sort(a , a+n) ;
#define Ignore cin.ignore() ;
#define mem(n,i) memset(n , i , sizeof(n)) ;
#define deci(n) cout << fixed << setprecision(n) ;
#define clr clear() 
#define yes cout << "YES" 
#define no cout << "NO" 


//inevilability is the unavailability of vernability - Credit - Harsh (cf handle : silvermirror)

//constants : 1'000'000'007 (can be used this type too)
const long long int mod = 1e9 + 7 ;
const double PI = 3.1415926535897932384626 ;
const long long int max = INT_MAX ;
const long long int INF = 1e18 ;


//using typedef
typedef string str ;
typedef vector<ll , ll> vi ;
typedef vector<str> vs ;
typedef pair<ll , ll> pii ;
typedef vector<pii> vpii ;
typedef map<ll , ll> mii ;
typedef map<str , ll> msi ;
typedef pair<ll , ll> pii ;
typedef set<ll> si ;
typedef set<str> ss ;



//No that's not me ! Credit - Harsh (cf handle : silvermirror)

//I don't know what the hell this is
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std::chrono ;
using namespace __gnu_pbds ;

//solution starts here :
void solve(){
	ll n ;
	ll D , H;
	cin >> n >> D >> H ;
	long double x , d[n] , h[n] , max = 0 ;
	fo(i , 0 , n){
		cin2(d[i] , h[i]) ;
		x = h[i] - (d[i]*(H-h[i]))/(D-d[i]) ;
		(x > max)?max = x : max ;
	}cout << fixed << setprecision(9) << max ;
}

//main function :
int main(){
	//fast IO and clock :
	ios_base::sync_with_stdio(0) , cin.tie(0) , cout.tie(0) ;
	srand(chrono::high_resolution_clock::now().time_since_epoch().count()) ;

	//t is no. of testcase : 
	int t = 1 , tc = 1;
	// cin >> t ;
	while(t--){
		solve() ;
		cout << nline ;
		// for Google competition and single ans use this :
		// cout << "Case #" << tc << ": " << ans << endl ;
	}
}

