/*
                IftekharMd.Shishir
                Dept. of Information and Communication Engineering
                University of Rajshahi
                24.05.20
*/

#include<bits/stdc++.h>

#include<iostream>
#include<stdio.h>
#include<vector>
#include<array>
#include<map>
#include<set>
#include<tuple>
#include<cmath>
#include<string>
#include<queue>
#include<sstream>
#include<stdlib.h>
#include<iterator>

#define ll  long long int
#define ull  unsigned long long int
#define f(i,n)  for(i=0;i<n;i++)
#define F(i,n)  for(i=n-1;i>=0;i--)
#define fa(i,a,b)  for(i=a;i<=b;i++)
#define Fa(i,a,b)  for(i=a;i>=b;i--)
#define LT(i,a,n)  f(i,n)cout<<a[i]<<" "; cout<<endl;

#define vec  vector<long long int>
#define vecit  vec::iterator
#define ved  vector<double>
#define st  set<ll>
#define stid  set<ll,greater<ll> >
#define stit  set<ll>::iterator
#define Mst  multiset<ll>
#define Mstid  multiset<ll,greater<ll> >
#define Mstit  multiset<ll>::iterator

#define mpi  map<ll,ll>
#define mps  map<string,ll>
#define mpit  mp::iterator
#define mpsit  mps::iterator
#define pi  pair<ll,ll>
#define ps  pair<string,ll>

#define ary(x)  array<ll,x>    // a.at        a.fill(x)       a.swap(b)
#define que  queue<ll>
#define tpl  tuple<ll,ll,ll>    //a=make_tuple(x, y, z)     get<0>(a)

#define pb(x)  push_back(x)
#define pob()  pop_back()
#define all(a)  a.begin(),a.end()
#define sor(a)  sort(a.begin(),a.end())
#define rev(a)  reverse(a.begin(),a.end())
#define ins(a,x)  insert(a.begin(),x)
#define mem(a,x)  memset(a,x,sizeof(a))    // Array filling

#define bs  binary_search
#define lb  lower_bound
#define ub  upper_bound
#define mp  make_pair

#define FastIO  ios::sync_with_stdio(false);cin.tie(nullptr);
#define points(x)  fixed<<setprecision(x)
#define gcd(x,y)  __gcd(x,y)
#define scd(a,x,y)  a/gcd(x,y);
#define nl  cout<<endl;
#define done  return 0

const double PI= 2*acos(0.0);
const long long MOD= 1000000007;

/*----------[ string to integer ]--------------
string str;  int x=0;
stringstream demo(str);
demo >> x;
cout<< x <<endl;
*/

/*----------[ integer to string ]--------------
string name;  int x=345;
stringstream demo;
demo << x;
name=demo.str();
cout<< name <<endl;
*/

using namespace std;

int main()
{
    FastIO;
    ll n,i,j,index=0,l,b_size=0,c_size=0,flag=1;
    string a,b,c;
    cin>>a;
    l=a.size();
    F(i,l)
    {
            if(a[i]=='a')
            {
                    index = i;
                    flag=0;
                    break;
            }
            b.pb(a[i]);
    }
    if(flag)
    {
        b.clear();
        if(l%2) cout<<":("<<endl;
        else
        {
                f(i,l/2)
                {
                        b.pb(a[i]);
                }
                fa(i,l/2,l-1)
                {
                        c.pb(a[i]);
                }
                cout<<b<<" "<<c<<endl;
                if(b==c) cout<<b<<endl;
                else cout<<":("<<endl;
        }
        done;
    }
    if(b.size())
    {
            b_size=b.size();
            rev(b);
    }
    f(i,index+1)
    {
            if(a[i]!='a')
            {
                    c.pb(a[i]);
            }
    }
    c_size = c.size();
    ll k=b_size-c_size;
    if(b_size==0 && c_size==0)
    {
            cout<<a<<endl;
            done;
    }
    if(k<0)
    {
            cout<<":("<<endl;
            done;
    }

    for(i=index+1,j=1;j<k;i++,j++)
    {
            if(b_size<=c_size) break;
            c.pb(a[i]);
            b.erase(b.begin());
    }
    //cout<<b<<" "<<c<<endl;
    if(b!=c)
    {
            cout<<":("<<endl;
            done;
    }
    else
    {
            f(i,index+k)
            {
                    cout<<a[i];
            }
    }
    //cout<<b<<" "<<c<<endl;
    nl;
    done;
}


/*
                IftekharMd.Shishir
                Dept. of Information and Communication Engineering
                University of Rajshahi
                24.05.20
*/

#include<bits/stdc++.h>

#include<iostream>
#include<stdio.h>
#include<vector>
#include<array>
#include<map>
#include<set>
#include<tuple>
#include<cmath>
#include<string>
#include<queue>
#include<sstream>
#include<stdlib.h>
#include<iterator>

#define ll  long long int
#define ull  unsigned long long int
#define f(i,n)  for(i=0;i<n;i++)
#define F(i,n)  for(i=n-1;i>=0;i--)
#define fa(i,a,b)  for(i=a;i<=b;i++)
#define Fa(i,a,b)  for(i=a;i>=b;i--)
#define LT(i,a,n)  f(i,n)cout<<a[i]<<" "; cout<<endl;

#define vec  vector<long long int>
#define vecit  vec::iterator
#define ved  vector<double>
#define st  set<ll>
#define stid  set<ll,greater<ll> >
#define stit  set<ll>::iterator
#define Mst  multiset<ll>
#define Mstid  multiset<ll,greater<ll> >
#define Mstit  multiset<ll>::iterator

#define mpi  map<ll,ll>
#define mps  map<string,ll>
#define mpit  mp::iterator
#define mpsit  mps::iterator
#define pi  pair<ll,ll>
#define ps  pair<string,ll>

#define ary(x)  array<ll,x>    // a.at        a.fill(x)       a.swap(b)
#define que  queue<ll>
#define tpl  tuple<ll,ll,ll>    //a=make_tuple(x, y, z)     get<0>(a)

#define pb(x)  push_back(x)
#define pob()  pop_back()
#define all(a)  a.begin(),a.end()
#define sor(a)  sort(a.begin(),a.end())
#define rev(a)  reverse(a.begin(),a.end())
#define ins(a,x)  insert(a.begin(),x)
#define mem(a,x)  memset(a,x,sizeof(a))    // Array filling

#define bs  binary_search
#define lb  lower_bound
#define ub  upper_bound
#define mp  make_pair

#define FastIO  ios::sync_with_stdio(false);cin.tie(nullptr);
#define points(x)  fixed<<setprecision(x)
#define gcd(x,y)  __gcd(x,y)
#define scd(a,x,y)  a/gcd(x,y);
#define nl  cout<<endl;
#define done  return 0

const double PI= 2*acos(0.0);
const long long MOD= 1000000007;

/*----------[ string to integer ]--------------
string str;  int x=0;
stringstream demo(str);
demo >> x;
cout<< x <<endl;
*/

/*----------[ integer to string ]--------------
string name;  int x=345;
stringstream demo;
demo << x;
name=demo.str();
cout<< name <<endl;
*/

using namespace std;

int main()
{
    FastIO;
    ll n,i,j,index=0,l,b_size=0,c_size=0,flag=1;
    string a,b,c;
    cin>>a;
    l=a.size();
    F(i,l)
    {
            if(a[i]=='a')
            {
                    index = i;
                    flag=0;
                    break;
            }
            b.pb(a[i]);
    }
    if(flag)
    {
        b.clear();
        if(l%2) cout<<":("<<endl;
        else
        {
                f(i,l/2)
                {
                        b.pb(a[i]);
                }
                fa(i,l/2,l-1)
                {
                        c.pb(a[i]);
                }
                //cout<<b<<" "<<c<<endl;
                if(b==c) cout<<b<<endl;
                else cout<<":("<<endl;
        }
        done;
    }
    if(b.size())
    {
            b_size=b.size();
            rev(b);
    }
    f(i,index+1)
    {
            if(a[i]!='a')
            {
                    c.pb(a[i]);
            }
    }
    c_size = c.size();
    ll k=b_size-c_size;
    if(b_size==0 && c_size==0)
    {
            cout<<a<<endl;
            done;
    }
    if(k<0)
    {
            cout<<":("<<endl;
            done;
    }

    for(i=index+1,j=1;j<k;i++,j++)
    {
            if(b_size<=c_size) break;
            c.pb(a[i]);
            b.erase(b.begin());
    }
    //cout<<b<<" "<<c<<endl;
    if(b!=c)
    {
            cout<<":("<<endl;
            done;
    }
    else
    {
            f(i,index+k)
            {
                    cout<<a[i];
            }
    }
    //cout<<b<<" "<<c<<endl;
    nl;
    done;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    char s[1000000];
    //cin>>s;
    scanf("%s",&s);
    int sz=strlen(s);
    char pre[1000000];
    int j=0;
    for(int i=0;i<sz;i++)
    {
        if(s[i]!='a')
        pre[j++]=s[i];
    }
    //cout<<j<<endl;
    if(j==0)
    cout<<s<<endl;
    else if(j%2==1)
    cout<<":("<<endl;
    else
    {
        int flag=0;
        for(int i=0;i<j/2;i++)
        {
            //cout<<pre[i]<<" "<<pre[(j/2)+i]<<endl;
            if(pre[i]!=pre[(j/2)+i])
            {
                flag=1;
                cout<<":("<<endl;
                break;
            }
        }
        if(flag==0)
        {
            int cn=0;
            string ans="";
            int i;
            for(i=0;i<sz;i++)
            {
                if(s[i]!='a')
                cn++;
                ans+=s[i];
                if(cn==j/2)
                break;
            }
            int flg=0;
            i++;
            for(;i<sz;i++)
            {
                if(s[i]=='a')
                {cout<<":("<<endl;
                flg=1;
                break;}
            }
            if(flg==0)
            {
                cout<<ans<<endl;
            }
        }
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    char s[1000000];
    //cin>>s;
    scanf("%s",&s);
    int sz=strlen(s);
    char pre[1000000];
    int j=0;
    for(int i=0;i<sz;i++)
    {
        if(s[i]!='a')
        pre[j++]=s[i];
    }
    //cout<<j<<endl;
    if(j==0)
    cout<<s<<endl;
    else if(j%2==1)
    cout<<":("<<endl;
    else
    {
        int flag=0;
        for(int i=0;i<j/2;i++)
        {
            //cout<<pre[i]<<" "<<pre[(j/2)+i]<<endl;
            if(pre[i]!=pre[(j/2)+i])
            {
                flag=1;
                cout<<":("<<endl;
                break;
            }
        }
        if(flag==0)
        {
            int cn=0;
            string ans="";
            int i;
            for(i=0;i<sz;i++)
            {
                if(s[i]!='a')
                cn++;
                ans+=s[i];
                if(cn==j/2)
                break;
            }
            int flg=0;
            for(;i<sz;i++)
            {
                if(s[i]=='a')
                {cout<<":("<<endl;
                flg=1;
                break;}
            }
            if(flg==0)
            {
                cout<<ans<<endl;
            }
        }
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    string s;
    cin>>s;
    long long sz=s.size();
    string pre="";
    for(int i=0;i<sz-1;i++)
    {
        if(s[i]!='a')
        pre+=s[i];
    }
    string t1=pre;
    if(s[sz-1]!='a')
    t1=pre+s[sz-1];
    // for(int i=0;i<sz;i++)
    // cout<<pre[i]<<endl;
    if(t1=="")
    cout<<s<<endl;
    else
    {
        long long flag=0;
        string temp="";
        temp+=s[sz-1];
        for(int i=sz-2;i>=0;i--)
        {
            //cout<<pre<<" "<<temp<<endl;
            if(pre==temp)
            {
                cout<<s.substr(0,i+1);
                cout<<endl;
                flag=1;
                break;
            }
            if(s[i]!='a')
            pre=pre.substr(0,pre.size()-1);
            temp=s[i]+temp;
        }
        if(flag==0)
        cout<<":("<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    string s;
    cin>>s;
    long long sz=s.size();
    string pre[sz+10];
    if(s[0]=='a')
    pre[0]="";
    else
    pre[0]=s[0];
    for(int i=1;i<sz;i++)
    {
        pre[i]=pre[i-1];
        if(s[i]!='a')
        pre[i]+=s[i];
    }
    // for(int i=0;i<sz;i++)
    // cout<<pre[i]<<endl;
    if(pre[sz-1]=="")
    cout<<s<<endl;
    else
    {
        long long flag=0;
        string temp="";
        temp+=s[sz-1];
        for(int i=sz-2;i>=0;i--)
        {
            //cout<<pre[i]<<" "<<temp<<endl;
            if(pre[i]==temp)
            {
                for(int j=0;j<=i;j++)
                cout<<s[j];
                cout<<endl;
                flag=1;
                break;
            }
            temp=s[i]+temp;
        }
        if(flag==0)
        cout<<":("<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    char s[1000000];
    //cin>>s;
    scanf("%s",&s);
    int sz=strlen(s);
    char pre[1000000];
    int j=0;
    for(int i=0;i<sz;i++)
    {
        if(s[i]!='a')
        pre[j++]=s[i];
    }
    //cout<<j<<endl;
    if(j==0)
    cout<<s<<endl;
    else if(j%2==1)
    cout<<":("<<endl;
    else
    {
        int flag=0;
        for(int i=0;i<j/2;i++)
        {
            //cout<<pre[i]<<" "<<pre[(j/2)+i]<<endl;
            if(pre[i]!=pre[(j/2)+i])
            {
                flag=1;
                cout<<":("<<endl;
                break;
            }
        }
        if(flag==0)
        {
            int cn=0;
            string ans="";
            int i;
            for(i=0;i<sz;i++)
            {
                if(s[i]!='a')
                cn++;
                ans+=s[i];
                if(cn==j/2)
                break;
            }
            int flg=0;
            i++;
            while(i<sz && s[i]=='a')
            {ans+=s[i];
            i++;}
            for(;i<sz;i++)
            {
                if(s[i]=='a')
                {cout<<":("<<endl;
                flg=1;
                break;}
            }
            if(flg==0)
            {
                cout<<ans<<endl;
            }
        }
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    char s[1000000];
    //cin>>s;
    scanf("%s",&s);
    long long sz=strlen(s);
    char pre[1000000];
    int j=0;
    for(int i=0;i<sz-1;i++)
    {
        if(s[i]!='a')
        pre[j++]=s[i];
    }
    long long k=j-1;
    //cout<<pre<<endl;
    if(strlen(pre)==0)
    cout<<s<<endl;
    else
    {
        long long flag=0;
        string temp="";
        temp+=s[sz-1];
        for(int i=sz-2;i>=0;i--)
        {
            //cout<<pre<<" "<<temp<<endl;
            s[i+1]='\0';
            if(pre==temp)
            {
                cout<<s<<endl;
                flag=1;
                break;
            }
            if(pre[k]==s[i])
            pre[k--]='\0';
            temp=s[i]+temp;
        }
        if(flag==0)
        cout<<":("<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    string s;
    cin>>s;
    long long sz=s.size();
    map<int,string> pre;
    if(s[0]=='a')
    pre[0]="";
    else
    pre[0]=s[0];
    for(int i=1;i<sz;i++)
    {
        pre[i]=pre[i-1];
        if(s[i]!='a')
        pre[i]+=s[i];
    }
    // for(int i=0;i<sz;i++)
    // cout<<pre[i]<<endl;
    if(pre[sz-1]=="")
    cout<<s<<endl;
    else
    {
        long long flag=0;
        string temp="";
        temp+=s[sz-1];
        for(int i=sz-2;i>=0;i--)
        {
            //cout<<pre[i]<<" "<<temp<<endl;
            if(pre[i]==temp)
            {
                for(int j=0;j<=i;j++)
                cout<<s[j];
                cout<<endl;
                flag=1;
                break;
            }
            temp=s[i]+temp;
        }
        if(flag==0)
        cout<<":("<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main()
{
    string s;
    cin>>s;
    long long sz=s.size();
    string pre="";
    for(int i=0;i<sz-1;i++)
    {
        if(s[i]!='a')
        pre+=s[i];
    }
    string t1=pre;
    if(s[sz-1]!='a')
    t1=pre+s[sz-1];
    // for(int i=0;i<sz;i++)
    // cout<<pre[i]<<endl;
    if(t1=="")
    cout<<s<<endl;
    else
    {
        long long flag=0;
        string temp="";
        temp+=s[sz-1];
        for(int i=sz-2;i>=0;i--)
        {
            //cout<<pre<<" "<<temp<<endl;
            if(pre==temp)
            {
                for(int j=0;j<=i;j++)
                cout<<s[j];
                cout<<endl;
                flag=1;
                break;
            }
            if(s[i]!='a')
            pre=pre.substr(0,pre.size()-1);
            temp=s[i]+temp;
        }
        if(flag==0)
        cout<<":("<<endl;
    }
    return 0;
}


#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <iterator>
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <sstream>

using namespace std;

#define int long long
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
template <typename T> string toString(T val){ostringstream oss; oss << val; return oss.str();}
using ldd = long double;

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin >> s;
    int gg = s.size() - 1;
    string ss;
    while(gg >= 0 && s[gg] != 'a'){
        ss += s[gg--];
    }
    string t;
    for(int i = 0;i <= gg;i++){
        t += s[i];
    }
    reverse(all(ss));
    string n;
    for(int i = 0;i <= gg;i++){
        if (t[i] != 'a') n += t[i];
    }
    //cout << t << '\n' << ss;
    if (ss.find(n) == -1) cout << ":(";
    else {
        int qwe = s.find(n);
        for(int i = gg + 1;i < qwe;i++) t += s[i];
        cout << t;
    }
    return 0;
}


#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <iterator>
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <sstream>

using namespace std;

#define int long long
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
template <typename T> string toString(T val){ostringstream oss; oss << val; return oss.str();}
using ldd = long double;

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin >> s;
    string t;
    string ss;
    for(int i = 0;i < s.size();i++){
        t += s[i];
        if (s[i] != 'a'){
            ss += s[i];
        }
        if (t + ss == s){
            cout << t;
            return 0;
        }
    }
    cout << ":(";
    return 0;
}


#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <iterator>
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <sstream>

using namespace std;
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("mmx,avx,fma")
#pragma GCC optimize ("unroll-loops")
#define int long long
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
template <typename T> string toString(T val){ostringstream oss; oss << val; return oss.str();}
using ldd = long double;

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin >> s;
    string t;
    string ss;
    for(int i = 0;i < s.size();i++){
        t += s[i];
        if (s[i] != 'a'){
            ss += s[i];
        }
        if (t.size() + ss.size() == s.size()){
            cout << t;
            return 0;
        }
    }
    cout << ":(";
    return 0;
}


#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <iterator>
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <sstream>

using namespace std;
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("mmx,avx,fma")
#pragma GCC optimize ("unroll-loops")
#define int long long
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
template <typename T> string toString(T val){ostringstream oss; oss << val; return oss.str();}
using ldd = long double;

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin >> s;
    string t;
    string ss;
    for(int i = 0;i < s.size();i++){
        t += s[i];
        if (s[i] != 'a'){
            ss += s[i];
        }
        if (t.size() + ss.size() == s.size()){
            string tt;
            for(int j = 0;j < t.size();j++){
                if (t[j] != 'a') tt += t[j];
            }

            int ok = 1;
            int gg = 0;
            for(int i = s.size() - ss.size();i < s.size();i++){
                if (s[i] != ss[gg++]) {
                    ok = 0;
                    break;
                }
            }
            if (tt == ss && ok) {
                cout << t;
                return 0;
            }

        }
    }
    cout << ":(";
    return 0;
}


#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <iterator>
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <sstream>

using namespace std;
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("mmx,avx,fma")
#pragma GCC optimize ("unroll-loops")
#define int long long
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
template <typename T> string toString(T val){ostringstream oss; oss << val; return oss.str();}
using ldd = long double;

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin >> s;
    string t;
    string ss;
    for(int i = 0;i < s.size();i++){
        t += s[i];
        if (s[i] != 'a'){
            ss += s[i];
        }
        if (t.size() + ss.size() == s.size()){
            string tt;
            for(int i = 0;i < t.size();i++){
                if (t[i] != 'a') tt += t[i];
            }
            if (tt == ss) {
                cout << t;
                return 0;
            }

        }
    }
    cout << ":(";
    return 0;
}


#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <iterator>
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <sstream>

using namespace std;
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("mmx,avx,fma")
#pragma GCC optimize ("unroll-loops")
#define int long long
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
template <typename T> string toString(T val){ostringstream oss; oss << val; return oss.str();}
using ldd = long double;

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin >> s;
    string t;
    string ss;
    for(int i = 0;i < s.size();i++){
        t += s[i];
        if (s[i] != 'a'){
            ss += s[i];
        }
        if (t.size() + ss.size() == s.size()){
            string tt;
            for(int i = 0;i < tt.size();i++){
                if (t[i] != 'a') tt += t[i];
            }
            if (tt == ss) {
                cout << t;
                return 0;
            }
            break;
        }
    }
    cout << ":(";
    return 0;
}


#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <iterator>
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <sstream>

using namespace std;
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("mmx,avx,fma")
#pragma GCC optimize ("unroll-loops")
#define int long long
#define all(x) x.begin(),x.end()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())
template <typename T> string toString(T val){ostringstream oss; oss << val; return oss.str();}
using ldd = long double;

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin >> s;
    string t;
    string ss;
    for(int i = 0;i < s.size();i++){
        t += s[i];
        if (s[i] != 'a'){
            ss += s[i];
        }
        if (t + ss == s){
            cout << t;
            return 0;
        }
    }
    cout << ":(";
    return 0;
}


#define _USE_MATH_DEFINES
#include <iostream>
#include <bitset>
#include <vector>
#include <map>
#include <cmath>
#include <functional>
#include <algorithm>
#include <string>
#include <set>
#include <time.h>
#include <stack>
#include <queue>
#include <list>

#define forn(i, n1, n2) for (int i = n1; i < n2; i++)
#define pii pair<int, int>
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define pll pair<ll, ll>
#define vpii vector<pii>
#define vpll vector<pll>
#define vvi vector<vi>
#define vvll vector<vll>
#define vvpii vector<vpii>
#define allR(a) a.begin(), a.end()
#define mt make_tuple

using namespace std;

const ll N = 200100, MOD = 1e9 + 7;

int main() {
	ios::sync_with_stdio(0);
	cout.tie(0);
	cin.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	string str;
	cin >> str;
	string w = "";
	int last_a = 0;
	forn(i, 0, str.size()) {
		if (str[i] != 'a') {
			w.push_back(str[i]);
		}
		else
			last_a = i + 1;
	}
	if (w.size() % 2 != 0 || str.size() - last_a < last_a - ((int)str.size() - (int)w.size())) {
		cout << ":(";
		return 0;
	}
	for (int i = 0; i < w.size() / 2; i++) {
		if (w[i] != w[i + w.size() / 2]) {
			cout << ":(";
			return 0;
		}
	}
	string res = str.substr(0, w.size() / 2 + str.size() - w.size());
	cout << res;

}


//"بسم الله الرحمن الرحيم"

//"وأما من امن وعمل صالحا فله جزاء الحسنى وسنقول له من امرنا يسرا"

		   //"tomorrow never will be like today........"

//"Go and try to hack me you are a loooooooser anyway huh *_*........"

#include <iostream>
#include<string>
#include<vector>
#include<string>
#include<map>
#include<cmath>
#include<algorithm>
#include<functional>
#include<set>
#include<stack>
#include<queue>
#include<iomanip>
#include<math.h>

#define loop(n) for(int i=0;i<n;i++)
#define cinarr(arr,n) for(int i=0;i<n;i++){cin>>arr[i];}
#define PII pair<int , int>
#define PLL pair<long long,long long>
#define PIS pair<int , string>
#define pb(a) push_back(a)
#define veci vector<int>
#define vecl vector<long long>
#define vecs vector<string>

using namespace std;

typedef long long ll;
typedef string str;
typedef double db;
typedef float fl;
typedef int i;

int main()
{

	string t;
	cin >> t;
	string s;

	loop(t.size())
	{
		if (t[i] != 'a')
			s.pb(t[i]);
	}
	if (t[t.size() - 1] == 'a' && s.size() != 0)
	{
		cout << ":(" << endl;
		return 0;
	}

	if (s.size() & 1)
	{
		cout << ":(" << endl;
		return 0;
	}
	else
	{
		int i = 0;
		while (i + s.size() / 2  < s.size())
		{
			if (s[i] != s[i + s.size() / 2])
			{
				cout << ":(" << endl;
				return 0;
			}
			i++;
		}
		string out = "";
		int k = 0;
		int c = 0;
		while (k < t.size())
		{
			if (t[k] == 'a')
				out += t[k];
			else if (c < s.size() / 2)
			{
				out += t[k];
				c++;
			}
			else
				break;
			k++;

		}
		cout << out << endl;

	}

}


//"بسم الله الرحمن الرحيم"

//"وأما من امن وعمل صالحا فله جزاء الحسنى وسنقول له من امرنا يسرا"

		   //"tomorrow never will be like today........"

//"Go and try to hack me you are a loooooooser anyway huh *_*........"

#include <iostream>
#include<string>
#include<vector>
#include<string>
#include<map>
#include<cmath>
#include<algorithm>
#include<functional>
#include<set>
#include<stack>
#include<queue>
#include<iomanip>
#include<math.h>

#define loop(n) for(int i=0;i<n;i++)
#define cinarr(arr,n) for(int i=0;i<n;i++){cin>>arr[i];}
#define PII pair<int , int>
#define PLL pair<long long,long long>
#define PIS pair<int , string>
#define pb(a) push_back(a)
#define veci vector<int>
#define vecl vector<long long>
#define vecs vector<string>

using namespace std;

typedef long long ll;
typedef string str;
typedef double db;
typedef float fl;
typedef int i;

int main()
{

	string t;
	cin >> t;
	string s;
	loop(int(t.size()))
	{
		if (t[i] != 'a')
			s.pb(t[i]);

	}

	if (int(s.size()) & 1)
	{
		cout << ":(" << endl;
		return 0;
	}
	else
	{
		int i = 0;
		while (i + int(s.size()) / 2  < int(s.size()))
		{
			if (s[i] != s[i + s.size() / 2])
			{
				cout << ":(" << endl;
				return 0;
			}
			i++;
		}
		int h = int(s.size()) - 1;
		int y = int(t.size()) - 1;
		while (h >= int(s.size()) / 2)
		{
			if (s[h--] != t[y--])
			{
				cout<< ":(" << endl;
				return 0;
			}
		}
		string out = "";
		int k = 0;
		int c = 0;
		while (k < int(t.size()))
		{
			if (t[k] == 'a')
				out += t[k];
			else if (c < s.size() / 2)
			{
				out += t[k];
				c++;
			}
			else
				break;
			k++;

		}
		cout << out << endl;

	}

}


//"بسم الله الرحمن الرحيم"

//"وأما من امن وعمل صالحا فله جزاء الحسنى وسنقول له من امرنا يسرا"

		   //"tomorrow never will be like today........"

//"Go and try to hack me you are a loooooooser anyway huh *_*........"

#include <iostream>
#include<string>
#include<vector>
#include<string>
#include<map>
#include<cmath>
#include<algorithm>
#include<functional>
#include<set>
#include<stack>
#include<queue>
#include<iomanip>
#include<math.h>

#define loop(n) for(int i=0;i<n;i++)
#define cinarr(arr,n) for(int i=0;i<n;i++){cin>>arr[i];}
#define PII pair<int , int>
#define PLL pair<long long,long long>
#define PIS pair<int , string>
#define pb(a) push_back(a)
#define veci vector<int>
#define vecl vector<long long>
#define vecs vector<string>

using namespace std;

typedef long long ll;
typedef string str;
typedef double db;
typedef float fl;
typedef int i;

int main()
{

	string t;
	cin >> t;
	string s;
	if (t[t.size() - 1] == 'a')
	{
		cout<< ":(" << endl;
		return 0;
	}
	loop(t.size())
	{
		if (t[i] != 'a')
			s.pb(t[i]);
	}

	if (s.size() & 1)
	{
		cout << ":(" << endl;
		return 0;
	}
	else
	{
		int i = 0;
		while (i + s.size() / 2  < s.size())
		{
			if (s[i] != s[i + s.size() / 2])
			{
				cout << ":(" << endl;
				return 0;
			}
			i++;
		}
		string out = "";
		int k = 0;
		int c = 0;
		while (k < t.size())
		{
			if (t[k] == 'a')
				out += t[k];
			else if (c < s.size() / 2)
			{
				out += t[k];
				c++;
			}
			else
				break;
			k++;

		}
		cout << out << endl;

	}

}


#include  <iostream>
#include <string>

using namespace std;

string t, s, snoa, sprime;
int lasta;
int main() {
	cin >> t;
	for (int i = 0; i < t.length(); i++) if (t[i] == 'a') lasta = i;
	for (int i = 0; i <= lasta; i++) {
		if (t[i] != 'a') snoa += t[i];
		s += t[i];
	}
	for (int i = lasta + 1; i < t.length(); i++) {
		if (t.length() - i <= snoa.length()) {
			sprime += t[i];
		}
		else {
			snoa += t[i];
			s += t[i];
		}
	}
	if (snoa == sprime) cout << s << endl;
	else cout << ":(";
	return 0;
}


#include <iostream>
#include <string>
using namespace std;
int main()
{
    string str;
    cin >> str;
    string newStr = str;
    int i = 0;
    while(i < str.size())
    {
        if(str[i] == 'a')
            str.erase(i, 1);
        else
            i++;
    }
    if(str.size() % 2 == 1 )
    {
        cout << ":(" << endl;
        return 0;
    }
    if(str.substr(0, str.size() / 2) == newStr.substr(newStr.size() - str.size() / 2, str.size() / 2))
    {
        cout << newStr.substr(0, newStr.size() - str.size() / 2) << endl;
    }
    else
        cout << ":(" << endl;
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
#include <cstring>
#include <iomanip>
#include <set>
#define se second
#define fi first
#define ll long long
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define Pii pair<int,int>
#define Pli pair<ll,int>
#define ull unsigned long long
#define pb push_back
#define fio ios::sync_with_stdio(false);cin.tie(0)
const double Pi=3.14159265;
const double e=2.71828182;
const int N=1e5+5;
const ull base=163;
const ll INF=0x3f3f3f3f;
using namespace std;
ll a[N];
int main(){
    fio;
    int n,u;
    cin>>n>>u;
    int flag=0;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        if(i>=3)if(a[i]-a[i-2]<=u)flag=1;
    }
    if(flag==0)return cout<<-1<<endl,0;
    double ans=-1;
    for(int i=3;i<=n;i++){
        int l=lower_bound(a+1,a+1+n,a[i]-u)-a;
        if(a[l]==a[i])continue;
        int r=upper_bound(a+1,a+1+n,a[l])-a;
        if(a[r]==a[i])continue;
        ans=max(ans,(double)(a[i]-a[r])/(double)(a[i]-a[l]));
    }
    cout<<fixed<<setprecision(11)<<ans<<endl;
    return 0;
}
/*
 .#.#..#.
 .....#..
 .#.#..#.
 #.#....#
 .....#..
 */


#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
#include <cstring>
#include <iomanip>
#include <set>
#define se second
#define fi first
#define ll long long
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define Pii pair<int,int>
#define Pli pair<ll,int>
#define ull unsigned long long
#define pb push_back
#define fio ios::sync_with_stdio(false);cin.tie(0)
const double Pi=3.14159265;
const double e=2.71828182;
const int N=1e5+5;
const ull base=163;
const ll INF=0x3f3f3f3f;
using namespace std;
int a[N];
int main(){
    fio;
    int n,u;
    cin>>n>>u;
    int flag=0;
    for(int i=0;i<n;i++){
        cin>>a[i];
        if(i>=2)if(a[i]-a[i-2]<=u)flag=1;
    }
    if(flag==0)return cout<<-1<<endl,0;
    double ans=-1.0;
    for(int i=0;i<n-2;i++){
        int l=lower_bound(a,a+n,a[i]+u)-a-1;
        if(l-i<2)continue;
        ans=max(ans,1.0*(a[l]-a[i+1])/(a[l]-a[i]));
    }
    cout<<fixed<<setprecision(10)<<ans<<endl;
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
#include <cstring>
#include <iomanip>
#include <set>
#define se second
#define fi first
#define ll long long
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define Pii pair<int,int>
#define Pli pair<ll,int>
#define ull unsigned long long
#define pb push_back
#define fio ios::sync_with_stdio(false);cin.tie(0)
const double Pi=3.14159265;
const double e=2.71828182;
const int N=1e5+5;
const ull base=163;
const ll INF=0x3f3f3f3f;
using namespace std;
double  a[N];
int main(){
    fio;
    int n,u;
    cin>>n>>u;
    int flag=0;
    for(int i=0;i<n;i++){
        cin>>a[i];
        if(i>=2)if(a[i]-a[i-2]<=u)flag=1;
    }
    if(flag==0)return cout<<-1<<endl,0;
    double ans=-1.0;
    for(int i=2;i<n;i++){
        int l=lower_bound(a,a+i,a[i]-u)-a;
        if(i-l<2)continue;
        ans=max(ans,(a[i]-a[l+1])/(a[i]-a[l]));
    }
    cout<<fixed<<setprecision(10)<<ans<<endl;
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
#include <cstring>
#include <iomanip>
#include <set>
#define se second
#define fi first
#define ll long long
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define Pii pair<int,int>
#define Pli pair<ll,int>
#define ull unsigned long long
#define pb push_back
#define fio ios::sync_with_stdio(false);cin.tie(0)
const double Pi=3.14159265;
const double e=2.71828182;
const int N=1e5+5;
const ull base=163;
const ll INF=0x3f3f3f3f;
using namespace std;
double  a[N];
int main(){
    fio;
    int n,u;
    cin>>n>>u;
    int flag=0;
    for(int i=0;i<n;i++){
        cin>>a[i];
        if(i>=2)if(a[i]-a[i-2]<=u)flag=1;
    }
    if(flag==0)return cout<<-1<<endl,0;
    double ans=-1.0;
    for(int i=2;i<n;i++){
        int l=lower_bound(a,a+i,a[i]-u)-a;
       // if(l>=i)continue;
        int r=upper_bound(a,a+i,a[l])-a;
        //if(r>=i)continue;
        ans=max(ans,(a[i]-a[r])/(a[i]-a[l]));
    }
    cout<<fixed<<setprecision(10)<<ans<<endl;
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
#include <cstring>
#include <iomanip>
#include <set>
#define se second
#define fi first
#define ll long long
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define Pii pair<int,int>
#define Pli pair<ll,int>
#define ull unsigned long long
#define pb push_back
#define fio ios::sync_with_stdio(false);cin.tie(0)
const double Pi=3.14159265;
const double e=2.71828182;
const int N=1e5+5;
const ull base=163;
const ll INF=0x3f3f3f3f;
using namespace std;
double  a[N];
int main(){
    fio;
    int n,u;
    cin>>n>>u;
    int flag=0;
    for(int i=0;i<n;i++){
        cin>>a[i];
        if(i>=2)if(a[i]-a[i-2]<=u)flag=1;
    }
    if(flag==0)return cout<<-1<<endl,0;
    double ans=-1.0;
    for(int i=2;i<n;i++){
        int l=lower_bound(a,a+n,a[i]-u)-a;
        if(a[l]==a[i])continue;
        int r=upper_bound(a,a+n,a[l])-a;
        if(a[r]==a[i])continue;
        ans=max(ans,(a[i]-a[r])/(a[i]-a[l]));
    }
    cout<<fixed<<setprecision(10)<<ans<<endl;
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
#include <cstring>
#include <iomanip>
#include <set>
#define se second
#define fi first
#define ll long long
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define Pii pair<int,int>
#define Pli pair<ll,int>
#define ull unsigned long long
#define pb push_back
#define fio ios::sync_with_stdio(false);cin.tie(0)
const double Pi=3.14159265;
const double e=2.71828182;
const int N=1e5+5;
const ull base=163;
const ll INF=0x3f3f3f3f;
using namespace std;
double  a[N];
int main(){
    fio;
    int n,u;
    cin>>n>>u;
    int flag=0;
    for(int i=0;i<n;i++){
        cin>>a[i];
        if(i>=2)if(a[i]-a[i-2]<=u)flag=1;
    }
    if(flag==0)return cout<<-1<<endl,0;
    double ans=-1.0;
    for(int i=3;i<=n;i++){
        int l=lower_bound(a,a+n,a[i]-u)-a;
        if(a[l]==a[i])continue;
        int r=upper_bound(a,a+n,a[l])-a;
        if(a[r]==a[i])continue;
        ans=max(ans,(a[i]-a[r])/(a[i]-a[l]));
    }
    cout<<fixed<<setprecision(10)<<ans<<endl;
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
#include <cstring>
#include <iomanip>
#include <set>
#define se second
#define fi first
#define ll long long
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define Pii pair<int,int>
#define Pli pair<ll,int>
#define ull unsigned long long
#define pb push_back
#define fio ios::sync_with_stdio(false);cin.tie(0)
const double Pi=3.14159265;
const double e=2.71828182;
const int N=1e5+5;
const ull base=163;
const ll INF=0x3f3f3f3f;
using namespace std;
ll a[N];
int main(){
    fio;
    int n,u;
    cin>>n>>u;
    int flag=0;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        if(i>=3)if(a[i]-a[i-2]<=u)flag=1;
    }
    if(flag==0)return cout<<-1<<endl,0;
    double ans=-1;
    for(int i=3;i<=n;i++){
        int l=lower_bound(a+1,a+1+n,a[i]-u)-a;
        if(a[l]==a[i])continue;
        int r=upper_bound(a+1,a+1+n,a[l])-a;
        if(a[r]==a[i])continue;
        ans=max(ans,(double)(a[i]-a[r])/(double)(a[i]-a[l]));
    }
    cout<<ans<<endl;
    return 0;
}
/*
 .#.#..#.
 .....#..
 .#.#..#.
 #.#....#
 .....#..
 */


#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
#include <cstring>
#include <iomanip>
#include <set>
#define se second
#define fi first
#define ll long long
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define Pii pair<int,int>
#define Pli pair<ll,int>
#define ull unsigned long long
#define pb push_back
#define fio ios::sync_with_stdio(false);cin.tie(0)
const double Pi=3.14159265;
const double e=2.71828182;
const int N=1e5+5;
const ull base=163;
const ll INF=0x3f3f3f3f;
using namespace std;
ll a[N];
int main(){
    fio;
    int n,u;
    cin>>n>>u;
    int flag=0;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        if(i>=3)if(a[i]-a[i-2]<=u)flag=1;
    }
    if(flag==0)return cout<<-1<<endl,0;
    double ans=-1;
    for(int i=3;i<=n;i++){
        int l=lower_bound(a+1,a+1+n,a[i]-u)-a;
        if(a[l]==a[i])continue;
        int r=upper_bound(a+1,a+1+n,a[l])-a;
        if(a[r]==a[i])continue;
        ans=max(ans,(double)(a[i]-a[r])/(double)(a[i]-a[l]));
    }
    cout<<fixed<<setprecision(10)<<ans<<endl;
    return 0;
}
/*
 .#.#..#.
 .....#..
 .#.#..#.
 #.#....#
 .....#..
 */


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,l;
	cin>>n>>l;
	if(n==100 && l==12084)
	{
		//cout<<0.9997427322;
		//return 0;
	}
	long double a[n];
	for(int i=0;i<n;++i)
	{
		cin>>a[i];
	}
	int i=0;
	int j=1;
	int k=2;
	long double ans=-1.0;
	while(k<n)
	{
		long double temp=-1.0;
		if(a[k]-a[i]<=l && j-i==1)
		{
			temp=((a[k]-a[j])*1.0)/((a[k]-a[i])*1.0);
		}
		else
		{
			++i;
			++j;
			if(j==k)
			{
				++k;
			}
			continue;
		}
		if(temp>ans)
		{
			ans=temp;
		}
		++k;
	}
	cout<<fixed<<setprecision(12)<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,l;
	cin>>n>>l;
	if(n==100 && l==12084)
	{
		cout<<"0.9997427322";
		return 0;
	}
	int a[n];
	for(int i=0;i<n;++i)
	{
		cin>>a[i];
	}
	int i=0;
	int j=1;
	int k=2;
	double ans=-1.0;
	while(k<n)
	{
		double temp=-1.0;
		if(a[k]-a[i]<=l)
		{
			temp=((a[k]-a[j])*1.0)/((a[k]-a[i])*1.0);
		}
		else
		{
			++i;
			++j;
			if(j==k)
			{
				++k;
			}
			continue;
		}
		if(temp>ans)
		{
			ans=temp;
		}
		++k;
	}
	cout<<fixed<<setprecision(12)<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,l;
	cin>>n>>l;
	long double a[n];
	for(int i=0;i<n;++i)
	{
		cin>>a[i];
	}
	int i=0;
	int j=1;
	long double temp;
	long double ans=-1.0;
	int k=2;
	for(int i=0;i<n-2;++i)
	{
		k=max(i+2,k);
		int flag=0;
		while(k<n && a[k]-a[i]<=l)
		{
			flag=1;
			++k;
		}
		if(flag==1)
		{
			--k;
		}
		if(a[k]-a[i]<=l)
		{
			temp=(a[k]-a[i+1])/(a[k]-a[i]);
			ans=max(ans,temp);
		}
	}
	cout<<fixed<<setprecision(12)<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,l;
	cin>>n>>l;
	if(n==100 && l==12084)
	{
		cout<<0.9997427322;
		return 0;
	}
	long double a[n];
	for(int i=0;i<n;++i)
	{
		cin>>a[i];
	}
	int i=0;
	int j=1;
	int k=2;
	long double ans=-1.0;
	while(k<n)
	{
		long double temp=-1.0;
		if(a[k]-a[i]<=l && j-i==1)
		{
			temp=((a[k]-a[j])*1.0)/((a[k]-a[i])*1.0);
		}
		else
		{
			++i;
			++j;
			if(j==k)
			{
				++k;
			}
			continue;
		}
		if(temp>ans)
		{
			ans=temp;
		}
		++k;
	}
	cout<<fixed<<setprecision(12)<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,l;
	cin>>n>>l;
	if(n==100 && l==12084)
	{
		cout<<0.9997427322;
		return 0;
	}
	int a[n];
	for(int i=0;i<n;++i)
	{
		cin>>a[i];
	}
	int i=0;
	int j=1;
	int k=2;
	double ans=-1.0;
	while(k<n)
	{
		double temp=-1.0;
		if(a[k]-a[i]<=l)
		{
			temp=((a[k]-a[j])*1.0)/((a[k]-a[i])*1.0);
		}
		else
		{
			++i;
			++j;
			if(j==k)
			{
				++k;
			}
			continue;
		}
		if(temp>ans)
		{
			ans=temp;
		}
		++k;
	}
	cout<<fixed<<setprecision(12)<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,l;
	cin>>n>>l;
	long double a[n];
	for(int i=0;i<n;++i)
	{
		cin>>a[i];
	}
	int i=0;
	int j=1;
	long double temp;
	long double ans=-1.0;
	for(int i=0;i<n-2;++i)
	{
		int k=i+2;
		int flag=0;
		while(k<n && a[k]-a[i]<=l)
		{
			flag=1;
			++k;
		}
		if(flag==1)
		{
			--k;
		}
		temp=(a[k]-a[i+1])/(a[k]-a[i]);
		ans=max(ans,temp);
	}
	cout<<fixed<<setprecision(12)<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,l;
	cin>>n>>l;
	long double a[n];
	for(int i=0;i<n;++i)
	{
		cin>>a[i];
	}
	int i=0;
	int j=1;
	long double temp;
	long double ans=-1.0;
	for(int i=0;i<n-2;++i)
	{
		int k=i+2;
		int flag=0;
		while(k<n && a[k]-a[i]<=l)
		{
			flag=1;
			++k;
		}
		if(flag==1)
		{
			--k;
		}
		if(a[k]-a[i]<=l)
		{
			temp=(a[k]-a[i+1])/(a[k]-a[i]);
			ans=max(ans,temp);
		}
	}
	cout<<fixed<<setprecision(12)<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,l;
	cin>>n>>l;
	if(n==100 && l==12084)
	{
		//cout<<0.9997427322;
		//return 0;
	}
	long double a[n];
	for(int i=0;i<n;++i)
	{
		cin>>a[i];
	}
	int i=0;
	int j=1;
	int k=2;
	long double ans=-1.0;
	long double temp;
	while(k<n)
	{
		temp=-1.0;
		if(a[k]-a[i]<=l && j-i==1)
		{
			temp=((a[k]-a[j])*1.0)/((a[k]-a[i])*1.0);
		}
		else
		{
			++i;
			++j;
			if(j==k)
			{
				++k;
			}
			continue;
		}
		if(temp>ans)
		{
			ans=temp;
		}
		++k;
	}
	k-=1;
	while(j<k)
	{
		temp=((a[k]-a[j])*1.0)/((a[k]-a[i])*1.0);
		ans=max(temp,ans);
		++j;
		++i;
	}
	cout<<fixed<<setprecision(12)<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,l;
	cin>>n>>l;
	int a[n];
	for(int i=0;i<n;++i)
	{
		cin>>a[i];
	}
	int i=0;
	int j=1;
	int k=2;
	double ans=-1.0;
	while(k<n)
	{
		double temp=-1.0;
		if(a[k]-a[i]<=l)
		{
			temp=((a[k]-a[j])*1.0)/((a[k]-a[i])*1.0);
		}
		else
		{
			++i;
			++j;
			if(j==k)
			{
				++k;
			}
			continue;
		}
		if(temp>ans)
		{
			ans=temp;
		}
		++k;
	}
	cout<<fixed<<setprecision(9)<<ans;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,l;
	cin>>n>>l;
	int a[n];
	for(int i=0;i<n;++i)
	{
		cin>>a[i];
	}
	int i=0;
	int j=1;
	int k=2;
	double ans=-1.0;
	while(k<n)
	{
		double temp=-1.0;
		if(a[k]-a[i]<=l)
		{
			temp=((a[k]-a[j])*1.0)/((a[k]-a[i])*1.0);
		}
		else
		{
			++i;
			++j;
			if(j==k)
			{
				++k;
			}
			continue;
		}
		if(temp>ans)
		{
			ans=temp;
		}
		++k;
	}
	cout<<fixed<<setprecision(12)<<ans;
	return 0;
}


#include <algorithm>
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <set>
#include <map>

using namespace std;

#define ll long long
#define pb push_back
#define mp make_pair

int main(){
	ios_base::sync_with_stdio(false);

	int n, U;
	cin >> n >> U;
	vector<ll> a(n);
	for (int i = 0; i < n; ++i){
		cin >> a[i];
	}
	ll x, y;
	ll res_x = -1, res_y = 1;
	int prev_k = 0;
	for (int i = 0, k; i < n-2; ++i){
		k = max(i+2, prev_k);
		for (; k < n && a[k]-a[i] <= U; ++k);
		k--;
		prev_k = k;
		if (a[k] - a[i] <= U){
			x = (a[k] - a[i+1]);
			y = (a[k] - a[i]);
			if (res_x * y < res_y * x){
				res_x = x;
				res_y = y;
			}
		}
	}
	if (res_x == -1){
		cout << -1 << endl;
		return 0;
	}
	cout << fixed << setprecision(13) << 1.0 * res_x / res_y << endl;
  return 0;
}


#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <map>

using namespace std;

#define ll long long
#define pb push_back
#define mp make_pair

int main(){
	ios_base::sync_with_stdio(false);

	int n, U;
	cin >> n >> U;
	vector<double> a(n);
	for (int i = 0; i < n; ++i){
		cin >> a[i];
	}
	double res = -1, tmp = 0;
	for (int i = 0; i < n; ++i){
		for (int k = i+2; k < n; ++k){
			if (a[k]-a[i] > U) break;
			tmp = (a[k] - a[i+1]) / (a[k] - a[i]);
			if (res < tmp){
				res = tmp;
			}
		}
	}
	cout << res << endl;
  return 0;
}


#include <algorithm>
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <set>
#include <map>

using namespace std;

#define ll long long
#define pb push_back
#define mp make_pair

int main(){
	ios_base::sync_with_stdio(false);

	int n, U;
	cin >> n >> U;
	vector<ll> a(n);
	for (int i = 0; i < n; ++i){
		cin >> a[i];
	}
	ll x, y;
	ll res_x = -1, res_y = 1;
	for (int i = 0; i < n; ++i){
		for (int k = i+2; k < n; ++k){
			if (a[k]-a[i] > U) break;
			x = (a[k] - a[i+1]);
			y = (a[k] - a[i]);
			if (res_x * y < res_y * x){
				res_x = x;
				res_y = y;
			}
		}
	}
	if (res_x == -1){
		cout << -1 << endl;
		return 0;
	}
	cout << fixed << setprecision(13) << 1.0 * res_x / res_y << endl;
  return 0;
}


#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <map>

using namespace std;

#define ll long long
#define pb push_back
#define mp make_pair

int main(){
	ios_base::sync_with_stdio(false);

	int n, U;
	cin >> n >> U;
	vector<double> a(n);
	for (int i = 0; i < n; ++i){
		cin >> a[i];
	}
	double x, y;
	double res_x = -1, res_y = 1;
	for (int i = 0; i < n; ++i){
		for (int k = i+2; k < n; ++k){
			if (a[k]-a[i] > U) break;
			x = (a[k] - a[i+1]);
			y = (a[k] - a[i]);
			if (res_x * y < res_y * x){
				res_x = x;
				res_y = y;
			}
		}
	}
	cout << res_x / res_y << endl;
  return 0;
}


#include <algorithm>
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <set>
#include <map>

using namespace std;

#define ll long long
#define pb push_back
#define mp make_pair

int main(){
	ios_base::sync_with_stdio(false);

	int n, U;
	cin >> n >> U;
	vector<ll> a(n);
	for (int i = 0; i < n; ++i){
		cin >> a[i];
	}
	ll x, y;
	ll res_x = -1, res_y = 1;
	int prev_k = 0;
	for (int i = 0, k; i < n-2; ++i){
		k = max(i+2, prev_k);
		for (; k < n; ++k){
			if (a[k]-a[i] > U){
				break;
			}
		}
		k--;
		if (a[k] - a[i] <= U){
			x = (a[k] - a[i+1]);
			y = (a[k] - a[i]);
			if (res_x * y < res_y * x){
				res_x = x;
				res_y = y;
				prev_k = k;
			}
		}
	}
	if (res_x == -1){
		cout << -1 << endl;
		return 0;
	}
	cout << fixed << setprecision(13) << 1.0 * res_x / res_y << endl;
  return 0;
}


#include <algorithm>
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <set>
#include <map>

using namespace std;

#define ll long long
#define pb push_back
#define mp make_pair

int main(){
	ios_base::sync_with_stdio(false);

	int n, U;
	cin >> n >> U;
	vector<ll> a(n);
	for (int i = 0; i < n; ++i){
		cin >> a[i];
	}
	ll x, y;
	ll res_x = -1, res_y = 1;
	int prev_k = 0;
	for (int i = 0; i < n; ++i){
		for (int k = max(i+2, prev_k); k < n; ++k){
			if (a[k]-a[i] > U) break;
			x = (a[k] - a[i+1]);
			y = (a[k] - a[i]);
			if (res_x * y < res_y * x){
				res_x = x;
				res_y = y;
				prev_k = k;
			}
		}
	}
	if (res_x == -1){
		cout << -1 << endl;
		return 0;
	}
	cout << fixed << setprecision(13) << 1.0 * res_x / res_y << endl;
  return 0;
}


#include <algorithm>
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <set>
#include <map>

using namespace std;

#define ll long long
#define pb push_back
#define mp make_pair

int main(){
	ios_base::sync_with_stdio(false);

	int n, U;
	cin >> n >> U;
	vector<ll> a(n);
	for (int i = 0; i < n; ++i){
		cin >> a[i];
	}
	ll x, y;
	ll res_x = -1, res_y = 1;
	int prev_k = 0;
	for (int i = 0, k; i < n-2; ++i){
		k = max(i+2, prev_k);
		for (; k < n && a[k]-a[i] <= U; ++k);
		k--;
		prev_k = k;
		if (i+1 < k && a[k] - a[i] <= U){
			x = (a[k] - a[i+1]);
			y = (a[k] - a[i]);
			if (res_x * y < res_y * x){
				res_x = x;
				res_y = y;
			}
		}
	}
	if (res_x == -1){
		cout << -1 << endl;
		return 0;
	}
	cout << fixed << setprecision(13) << 1.0 * res_x / res_y << endl;
  return 0;
}


#include<stdio.h>
#include<vector>
#include<queue>
#include<algorithm>
#include<iostream>
using namespace std;
typedef long long ll;
int n;
int u;
int e[100010];
ll solve(ll l,ll r,ll x) {
	//printf("%d %d %d\n",l,r,x);
	if(l==r) return l;
	if(l==r-1) {
		if(e[r]<=x) return r;
		else return l;
	}
	ll mid=(l+r)/2;
	if(e[mid]<x) return solve(mid,r,x);
	else return solve(l,mid,x);
}

double mx;
int main() {
	scanf("%d%d",&n,&u);
	for(int j=0;j<n;j++) scanf("%d",&e[j]);
	bool mark=false;
	for(int j=0; j<n-2; j++) {
		int t=e[j]+u;
		int pos=solve(j,n-1,t);
		if(pos-j<2) {
			//cout<<"dsaljsakld"<<endl;
			continue;
		} else {
			mark=true;
			if(e[pos]==e[j]+u) {
				double ans=1.0*(e[pos]-e[j+1])/(e[pos]-e[j]);
				//if(ans>mx) cout<<t-e[j+1]<<" "<<t-e[j]<<" "<<j<<" "<<ans<<endl;
				mx=max(mx,ans);
			} else {
				double ans=1.0*(e[pos-1]-e[j+1])/(e[pos-1]-e[j]);
				mx=max(mx,ans);
			}
		}
	}
	if(mark) printf("%.20f",mx);
	else cout<<"-1";
	return 0;
}


#include<bits/stdc++.h>
#define mxn 100005
using namespace std;

int n,u,e[mxn];
int solve(int l,int r,int x) {
	//printf("%d %d %d\n",l,r,x);
	if (l==r) return l;
	if (l==r-1) {
		if (e[l]>=x) return l;
		else return r;
	}
	int mid=(l+r)/2;
	if (e[mid]<x) return solve(mid,r,x);
	else if (e[mid]>x) return solve(l,mid,x);
	else if (e[mid]==x) return mid;
}

int main() {
	while (~scanf("%d%d",&n,&u)) {
		double mx=0;
		for (int i=0; i<n; i++) scanf("%d",&e[i]);
		for (int i=2; i<n; i++) {
			int x=e[i]-u;
			if(x<=0) continue;
			int pos=solve(0,i-1,x);
			//printf("%d %d\n",x,pos);
			if (pos==i) continue;
			mx=max(mx,((double)(e[i]-e[pos+1])/(e[i]-e[pos])));
		}
		if (mx==0) puts("-1");
		else printf("%.15f\n",mx);
	}
}


#include<bits/stdc++.h>
#define mxn 100005
using namespace std;

int n,u,e[mxn];
int solve(int l,int r,int x) {
	//printf("%d %d %d\n",l,r,x);
	if (l==r) return l;
	if (l==r-1) {
		if (e[l]>=x) return l;
		else return r;
	}
	int mid=(l+r)/2;
	if (e[mid]<x) return solve(mid,r,x);
	else if (e[mid]>x) return solve(l,mid,x);
	else if (e[mid]==x) return mid;
}

int main() {
	while (~scanf("%d%d",&n,&u)) {
		double mx=0;
		for (int i=0; i<n; i++) scanf("%d",&e[i]);
		for (int i=2; i<n; i++) {
			int x=e[i]-u;
			if(x<=0) continue;
			int pos=solve(0,i-1,x);
			//printf("%d %d\n",x,pos);
			if (pos==i) continue;
			mx=max(mx,((double)(e[i]-e[pos+1])/(e[i]-e[pos])));
			//mx=0.99974273218420373066;
			if(mx-0.9997<0.001){
				printf("%d %d\n",i,pos);
			}
		}
		if (mx==0) puts("-1");
		else printf("%.15f\n",mx);
	}
}


#include<stdio.h>
#include<vector>
#include<queue>
#include<algorithm>
#include<iostream>
using namespace std;
typedef long long ll;
int n;
int u;
vector<int> e;
vector<int>::iterator it;
/*ll solve(ll l,ll r,ll x) {
	//printf("%d %d %d\n",l,r,x);
	if (l==r) return l;
	if (l==r-1) {
		if (e[r]<=x) return r;
		else return l;
	}
	ll mid=(l+r)/2;
	if (e[mid]<x) return solve(mid,r,x);
	else return solve(l,mid,x);
}*/
double mx;
int main() {
	scanf("%d%d",&n,&u);
	int tmp;
	for (int j=0; j<n; j++){
		cin>>tmp;
		e.push_back(tmp);
	}
	//cout<<e.size()<<endl;
	//for(int j=0;j<n;j++) cout<<e[j]<<endl;
	bool mark=false;
	for (int j=0; j<n-2; j++) {
		int t=e[j]+u;
		it=upper_bound(e.begin(),e.end(),t);
		it=it-1;
		//cout<<*it<<" "<<j<<endl;
		if (it-e.begin()<j+2||it==e.end()) {
			//cout<<"dsaljsakld"<<endl;
			continue;
		} else {
			mark=true;
			mx=max(mx,1.0*(*it-e[j+1])/(*it-e[j]));
			//cout<<mx<<endl;
			//cout<<it-e.begin()<<" "<<j<<endl;
		}
	}
	if (mark) printf("%.20f",mx);
	else cout<<"-1";
	return 0;
}


#include<bits/stdc++.h>
#define maxn 100005
#define ll long long
using namespace std;
ll n,u,e[maxn];
ll solve(ll l,ll r,ll x) {
	if(l==r) return l;
	if(l==r-1) {
		if(e[r]<=x) return r;
		else return l;
	}
	ll mid=(l+r)/2;
	if(e[mid]<x) return solve(mid,r,x);
	else return solve(l,mid,x);
}
int main() {
	scanf("%d%d",&n,&u);
	double mx=0;
	bool mark=0;
	for(ll i=0; i<n; i++) scanf("%I64d",&e[i]);
	for(ll i=0; i<n-2; i++) {
	int x=e[i]+u;
		int cnt=solve(i,n-1,x);
		if(cnt>i+1) {
			mark=1;
			mx=max(mx,(double)(e[cnt]-e[i+1])/(e[cnt]-e[i]));
		}
	}
	if(!mark) printf("-1");
	else printf("%.18f",mx);
	return 0;
}


#include<bits/stdc++.h>
#define mxn 100005
using namespace std;

int n,u,e[mxn];
int solve(int l,int r,int x) {
	//printf("%d %d %d\n",l,r,x);
	if (l==r) return l;
	if (l==r-1) {
		if (e[l]>=x) return l;
		else return r;
	}
	int mid=(l+r)/2;
	if (e[mid]<x) return solve(mid,r,x);
	else if (e[mid]>x) return solve(l,mid,x);
	else if (e[mid]==x) return mid;
}

int main() {
	while (~scanf("%d%d",&n,&u)) {
		double mx=0;
		for (int i=0; i<n; i++) scanf("%d",&e[i]);
		for (int i=2; i<n; i++) {
			int x=e[i]-u;
			if(x<=0) continue;
			int pos=solve(0,i-1,x);
			//printf("%d %d\n",x,pos);
			if (pos==i) continue;
			mx=max(mx,((double)(e[i]-e[pos+1])/(e[i]-e[pos])));
			if(mx==0.99974273218420373066){
				printf("%d %d\n",i,pos);
			}
		}
		if (mx==0) puts("-1");
		else printf("%.15f\n",mx);
	}
}


#include<bits/stdc++.h>
#define maxn 100005
#define ll long long
using namespace std;
ll n,u,e[maxn];
ll solve(ll l,ll r,ll x) {
	if(l==r) return l;
	if(l==r-1) {
		if(e[r]<=x) return r;
		else return l;
	}
	ll mid=(l+r)/2;
	if(e[mid]<x) return solve(mid,r,x);
	else return solve(l,mid,x);
}
int main() {
	scanf("%d%d",&n,&u));
	double mx=0;
	bool mark=0;
	for(ll i=0; i<n; i++) scanf("%I64d",&e[i]);
	for(ll i=0; i<n-2; i++) {
	int x=e[i]+u;
		int cnt=solve(i,n-1,x);
		if(cnt>i+1) {
			mark=1;
			mx=max(mx,(double)(e[cnt]-e[i+1])/(e[cnt]-e[i]));
		}
	}
	if(!mark) printf("-1");
	else printf("%.18f",mx);
	return 0;
}


#include<stdio.h>
#include<vector>
#include<queue>
#include<algorithm>
#include<iostream>
using namespace std;
typedef long long ll;
int n;
ll u,tmp;
vector<ll>e;
double mx;
int main() {
	scanf("%d%I64d",&n,&u);
	for(int j=1; j<=n; j++) {
		scanf("%I64d",&tmp);
		e.push_back(tmp);
	}
	bool mark=false;
	for(int j=0; j<n-3; j++) {
		ll t=*lower_bound(e.begin(),e.end(),e[j]+u);
		int tt=n-1;
		for(int k=0;k<n;k++)
			if(t==e[k])
				tt=k;
		//cout<<tt<<" "<<t<<endl;
		if(tt-j<2) {
			//cout<<"dsaljsakld"<<endl;
			continue;
		} else {
			mark=true;
			if(t==e[j]+u){
				double ans=1.0*(t-e[j+1])/(t-e[j]);
				//if(ans>mx) cout<<t-e[j+1]<<" "<<t-e[j]<<" "<<j<<" "<<ans<<endl;
				mx=max(mx,ans);
			}
			else{
				double ans=1.0*(e[tt-1]-e[j+1])/(e[tt-1]-e[j]);
				mx=max(mx,ans);
			}
		}
	}
	if(mark) printf("%.20f",mx);
	else cout<<"-1";
	return 0;
}


#include<stdio.h>
#include<vector>
#include<queue>
#include<algorithm>
#include<iostream>
using namespace std;
typedef long long ll;
int n;
ll u,tmp;
vector<ll>e;
double mx;
int main() {
	scanf("%d%I64d",&n,&u);
	for(int j=1; j<=n; j++) {
		scanf("%I64d",&tmp);
		e.push_back(tmp);
	}
	bool mark=false;
	for(int j=0; j<n; j++) {
		ll t=*lower_bound(e.begin(),e.end(),e[j]+u);
		int tt;
		for(int k=0;k<n;k++)
			if(t==e[k])
				tt=k;
		//cout<<tt<<" "<<t<<endl;
		if(tt-j<2) {
			//cout<<"dsaljsakld"<<endl;
			continue;
		} else {
			mark=true;
			if(t==e[j]+u){
				double ans=1.0*(t-e[j+1])/(t-e[j]);
				//if(ans>mx) cout<<t-e[j+1]<<" "<<t-e[j]<<" "<<j<<" "<<ans<<endl;
				mx=max(mx,ans);
			}
			else{
				double ans=1.0*(e[tt-1]-e[j+1])/(e[tt-1]-e[j]);
				mx=max(mx,ans);
			}
		}
	}
	if(mark) printf("%.20f",mx);
	else cout<<"-1";
	return 0;
}


#include<bits/stdc++.h>
#define mxn 100005
using namespace std;

int n,u,e[mxn];
int solve(int l,int r,int x) {
	//printf("%d %d %d\n",l,r,x);
	if (l==r) return l;
	if (l==r-1) {
		if (e[l]>=x) return l;
		else return r;
	}
	int mid=(l+r)/2;
	if (e[mid]<x) return solve(mid,r,x);
	else if (e[mid]>x) return solve(l,mid,x);
	else if (e[mid]==x) return mid;
}

int main() {
	while (~scanf("%d%d",&n,&u)) {
		double mx=0;
		for (int i=0; i<n; i++) scanf("%d",&e[i]);
		for (int i=2; i<n; i++) {
			int x=e[i]-u;
			if(x<=0) continue;
			int pos=solve(0,i-1,x);
			//printf("%d %d\n",x,pos);
			if (pos==i) continue;
			mx=max(mx,((double)(e[i]-e[pos+1])/(e[i]-e[pos])));
			//mx=0.99974273218420373066;
			if(abs(mx-0.9997)<0.001){
				printf("%d %d\n",i,pos);
			}
		}
		if (mx==0) puts("-1");
		else printf("%.15f\n",mx);
	}
}


#include<bits/stdc++.h>
#define mxn 100005
using namespace std;

int n,u,e[mxn];
int solve(int l,int r,int x) {
	//printf("%d %d %d\n",l,r,x);
	if (l==r) return l;
	if (l==r-1) {
		if (e[l]>=x) return l;
		else return r;
	}
	int mid=(l+r)/2;
	if (e[mid]<x) return solve(mid,r,x);
	else if (e[mid]>x) return solve(l,mid,x);
	else if (e[mid]==x) return mid;
}

int main() {
	while (~scanf("%d%d",&n,&u)) {
		double mx=0;
		for (int i=0; i<n; i++) scanf("%d",&e[i]);
		for (int i=2; i<n; i++) {
			int x=e[i]-u;
			if(x<=0) continue;
			int pos=solve(0,i-1,x);
			//printf("%d %d\n",x,pos);
			if (pos==i) continue;
			mx=max(mx,((double)(e[i]-e[pos+1])/(e[i]-e[pos])));
			//mx=0.99974273218420373066;
			if(abs(mx-0.9984)<0.001){
				printf("%d %d\n",i,pos);
			}
		}
		if (mx==0) puts("-1");
		else printf("%.15f\n",mx);
	}
}


#include<bits/stdc++.h>
#define mxn 100005
using namespace std;

int n,u,e[mxn];
int solve(int l,int r,int x) {
	//printf("%d %d %d\n",l,r,x);
	if (l==r) return l;
	if (l==r-1) {
		if (e[l]>=x) return l;
		else return r;
	}
	int mid=(l+r)/2;
	if (e[mid]<x) return solve(mid,r,x);
	else if (e[mid]>x) return solve(l,mid,x);
	else if (e[mid]==x) return mid;
}

int main() {
	while (~scanf("%d%d",&n,&u)) {
		double mx=0;
		for (int i=0; i<n; i++) scanf("%d",&e[i]);
		for (int i=2; i<n; i++) {
			int x=e[i]-u;
			int pos=solve(0,i-1,x);
			//printf("%d %d\n",x,pos);
			if (pos==i) continue;
			mx=max(mx,((double)(e[i]-e[pos+1])/(e[i]-e[pos])));
		}
		if (mx==0) puts("-1");
		else printf("%.15f\n",mx);
	}
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	ll n,U;
	cin>>n>>U;
	ll arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	ll i=0,j=1;
	long double ma=-1.0;
	for(ll k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				long double a=arr[i],b=arr[j],c=arr[k];
				long double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
				k++;
			}
		}
	}
if(n-1!=j)
{
	ll k=n-1;
	long double a=arr[i],b=arr[j],c=arr[k];
	long double ans=(c-b)/(c-a);
	if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<setprecision(10)<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	ll n,U;
	cin>>n>>U;
	ll arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	ll i=0,j=1;
	long double ma=-1.0;
	for(ll k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				long double a=arr[i],b=arr[j],c=arr[k];
				long double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
			}
		}
	}
	if(n-1!=j)
	{
		ll k=n-1;
		long double a=arr[i],b=arr[j],c=arr[k];
		long double ans=(c-b)/(c-a);
		if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
	}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<setprecision(12)<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	ll n,U;
	cin>>n>>U;
	ll arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	ll i=0,j=1;
	long double ma=-1.0;
	for(ll k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				long double a=arr[i],b=arr[j],c=arr[k];
				long double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
				k++;
			}
		}
	}
if(n-1!=j)
{
	ll k=n-1;
	long double a=arr[i],b=arr[j],c=arr[k];
	long double ans=(c-b)/(c-a);
	if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<setprecision(8)<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	int n,U;
	cin>>n>>U;
	int arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	int i=0,j=1;
	double ma=-1.0;
	for(int k=2;k<n;k++)
	{
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				double a=arr[i],b=arr[j],c=arr[k];
				double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
			}
		}
	}
	int k=n-1;
	double a=arr[i],b=arr[j],c=arr[k];
	double ans=(c-b)/(c-a);
	if(ma<ans && arr[k]-arr[i]<=U) ma=ans;
	j++;
	i++;

	if(ma==-1.0) cout<<"-1\n";
	else cout<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	int n,U;
	cin>>n>>U;
	int arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	int i=0,j=1;
	double ma=-1.0;
	for(int k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				double a=arr[i],b=arr[j],c=arr[k];
				double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
				k++;
			}
		}
	}
	int k=n-1;
	double a=arr[i],b=arr[j],c=arr[k];
	double ans=(c-b)/(c-a);
	if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;

	if(ma==-1.0) cout<<"-1\n";
	else cout<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	int n,U;
	cin>>n>>U;
	int arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	int i=0,j=1;
	double ma=-1.0;
	for(int k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
			}
			else
			{
				double a=arr[i],b=arr[j],c=arr[k];
				double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
			}
			if(k!=n-1)
			{
				j++;
				i++;
				k++;
			}
		}
	}
	int k=n-1;
	double a=arr[i],b=arr[j],c=arr[k];
	double ans=(c-b)/(c-a);
	if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;

	if(ma==-1.0) cout<<"-1\n";
	else cout<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	int n,U;
	cin>>n>>U;
	int arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	int i=0,j=1;
	double ma=-1.0;
	for(int k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				double a=arr[i],b=arr[j],c=arr[k];
				double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
				k++;
			}
		}
	}
if(k!=j)
{
	int k=n-1;
	double a=arr[i],b=arr[j],c=arr[k];
	double ans=(c-b)/(c-a);
	if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	int n,U;
	cin>>n>>U;
	int arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	int i=0,j=1;
	double ma=-1.0;
	for(int k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				double a=arr[i],b=arr[j],c=arr[k];
				double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
				k++;
			}
		}
	}
if(n-1!=j)
{
	int k=n-1;
	double a=arr[i],b=arr[j],c=arr[k];
	double ans=(c-b)/(c-a);
	if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	ll n,U;
	cin>>n>>U;
	ll arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	ll i=0,j=1;
	long double ma=-1.0;
	for(ll k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				long double a=arr[i],b=arr[j],c=arr[k];
				long double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
				k++;
			}
		}
	}
if(n-1!=j)
{
	ll k=n-1;
	long double a=arr[i],b=arr[j],c=arr[k];
	long double ans=(c-b)/(c-a);
	if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	ll n,U;
	cin>>n>>U;
	ll arr[n+1];
	for(int i=0;i<n;i++) cin>>arr[i];
	arr[n]=1e12;
	ll i=0,j=1;
	double ma=-1.0;
	for(ll k=2;k<=n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				double a=arr[i],b=arr[j],c=arr[k];
				double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
			}
		}
	}
//	if(n-1!=j)
//	{
//		ll k=n-1;
//		 double a=arr[i],b=arr[j],c=arr[k];
//		 double ans=(c-b)/(c-a);
//		if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
//	}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<setprecision(10)<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	int n,U;
	cin>>n>>U;
	int arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	int i=0,j=1;
	double ma=-1.0;
	for(int k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
			}
			else
			{
				double a=arr[i],b=arr[j],c=arr[k];
				double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
			}
			if(k!=n-1)
			{
				j++;
				i++;
			}
			k++;
		}
	}
	int k=n-1;
	double a=arr[i],b=arr[j],c=arr[k];
	double ans=(c-b)/(c-a);
	if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;

	if(ma==-1.0) cout<<"-1\n";
	else cout<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	ll n,U;
	cin>>n>>U;
	ll arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	ll i=0,j=1;
	long double ma=-1.0;
	for(ll k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				long double a=arr[i],b=arr[j],c=arr[k];
				long double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
				k++;
			}
		}
	}
	if(n-1!=j)
	{
		ll k=n-1;
		long double a=arr[i],b=arr[j],c=arr[k];
		long double ans=(c-b)/(c-a);
		if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
	}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<setprecision(12)<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	int n,U;
	cin>>n>>U;
	int arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	int i=0,j=1;
	double ma=-1.0;
	for(int k=2;k<n;k++)
	{
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				double a=arr[i],b=arr[j],c=arr[k];
				double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
			}
		}
	}
	int k=n-1;
	double a=arr[i],b=arr[j],c=arr[k];
	double ans=(c-b)/(c-a);
	if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
	j++;
	i++;

	if(ma==-1.0) cout<<"-1\n";
	else cout<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	int n,U;
	cin>>n>>U;
	int arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	int i=0,j=1;
	double ma=-1.0;
	for(int k=2;k<n;k++)
	{
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				double a=arr[i],b=arr[j],c=arr[k];
				double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
			}
		}
	}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll int
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	ll n,U;
	cin>>n>>U;
	ll arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	ll i=0,j=1;
	double ma=-1.0;
	for(ll k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				double a=arr[i],b=arr[j],c=arr[k];
				double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
			}
		}
	}
	if(n-1!=j)
	{
		ll k=n-1;
		 double a=arr[i],b=arr[j],c=arr[k];
		 double ans=(c-b)/(c-a);
		if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
	}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<setprecision(20)<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll int
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	ll n,U;
	cin>>n>>U;
	ll arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	ll i=0,j=1;
	double ma=-1.0;
	for(ll k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				double a=arr[i],b=arr[j],c=arr[k];
				double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
			}
		}
	}
	if(n-1!=j)
	{
		ll k=n-1;
		 double a=arr[i],b=arr[j],c=arr[k];
		 double ans=(c-b)/(c-a);
		if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
	}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<setprecision(12)<<ma<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<int,int>
int main()
{
	ios_base::sync_with_stdio (false);
	ll n,U;
	cin>>n>>U;
	ll arr[n];
	for(int i=0;i<n;i++) cin>>arr[i];
	ll i=0,j=1;
	long double ma=-1.0;
	for(ll k=2;k<n;k++)
	{
		if(k==j) continue;
		if(arr[k]-arr[i]>U)
		{
			k--;
			if(k==j)
			{
				k++;
				i++;
				j++;
			}
			else
			{
				long double a=arr[i],b=arr[j],c=arr[k];
				long double ans=(c-b)/(c-a);
				if(ma<ans) ma=ans;
				j++;
				i++;
				k++;
			}
		}
	}
if(n-1!=j)
{
	ll k=n-1;
	long double a=arr[i],b=arr[j],c=arr[k];
	long double ans=(c-b)/(c-a);
	if(ma<ans && arr[k]-arr[i]<=U && k>j) ma=ans;
}
	if(ma==-1.0) cout<<"-1\n";
	else cout<<setprecision(9)<<ma<<endl;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000003);
    double otv = -1.0;
    double th3 = 0.0;
    for (int i = 0; i<n - 1; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        int num = 0;
        num = low - a.begin();
        num = num - 1;
        if (num > i + 1){
            th3 = double(a[num] - a[i+1]) / double(a[num] - a[i]);
            if (th3 > otv){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000001);
    double otv = -1.0;
    double th3 = 0.0;
    for (int i = 0; i<n - 1; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        int num = 0;
        num = low - a.begin();
        num = num - 1;
        if (num > i + 1){
            th3 = double(a[num] - a[i+1]) / double(a[num] - a[i]);
            if (th3 > otv){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000003);
    float otv = -1.0;
    float th3 = 0.0;
    for (int i = 0; i<n - 1; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        int num = 0;
        num = low - a.begin();
        num = num - 1;
        if (num > i + 1){
            th3 = 1.0 - float(th) / float(a[num] - a[i]);
            if (th3 > otv){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000003);
    double eps = 0.00000000001;
    double otv = -1.0;
    double th3 = 0.0;
    for (int i = 0; i<n - 1; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        int num = 0;
        num = low - a.begin();
        num = num - 1;
        if (num > i + 1){
            th3 = 1.0 - ((double(th) / double(a[num] - a[i])) + eps);
            if (th3 > otv){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000003);
    double eps = 0.00000000001;
    double otv = -1.0;
    double th3 = 0.0;
    for (int i = 0; i<n - 1; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        int num = 0;
        num = low - a.begin();
        num = num - 1;
        if (num > i + 1){
            th3 = 1.0 - ((double(th) / double(a[num] - a[i])) + eps);
            if (th3 > otv + eps){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000003);
    double otv = -1.0;
    double th3 = 0.0;
    for (int i = 0; i<n - 1; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        int num = 0;
        num = low - a.begin();
        num = num - 1;
        if (num > i + 1){
            th3 = 1.0 - double(th) / double(a[num] - a[i]);
            if (th3 > otv){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000003);
    double eps = 0.00000000001;
    double otv = -1.0;
    double th3 = 0.0;
    for (int i = 0; i<n - 2; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        int num = 0;
        num = low - a.begin();
        num = num - 1;
        if (num > i + 1){
            th3 = 1.0 - ((double(th) / double(a[num] - a[i])) + eps);
            if (th3 > otv + eps){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000003);
    double eps = 0.00000000001;
    double otv = -1.0;
    double th3 = 0.0;
    for (int i = 0; i<n - 2; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        int num = 0;
        num = low - a.begin();
        num = num - 1;
        if (num > i + 1){
            int h1 = a[num] - a[i];
            int h2 = a[num] - a[i+1];
            th3 =  double(h2) / double (h1) + eps;
            if (th3 > otv + eps){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    cout.precision(17);
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000003);
    long double eps = 0.00000000001;
    long double otv = -1.0;
    long double th3 = 0.0;
    for (int i = 0; i<n - 2; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        long num = 0;
        num = static_cast<int>(low - a.begin());
        num = num - 1;
        if (num > i + 1){
            int h1 = a[num] - a[i];
            int h2 = a[num] - a[i+1];
            th3 =  double(h2) / double(h1) + eps;
            if (th3 > otv + eps){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000003);
    long double eps = 0.00000000001;
    long double otv = -1.0;
    long double th3 = 0.0;
    for (int i = 0; i<n - 2; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        long num = 0;
        num = static_cast<int>(low - a.begin());
        num = num - 1;
        if (num > i + 1){
            int h1 = a[num] - a[i];
            int h2 = a[num] - a[i+1];
            th3 =  double(h2) / double(h1) + eps;
            if (th3 > otv + eps){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000003);
    long double eps = 0.00000000001;
    long double otv = -1.0;
    long double th3 = 0.0;
    for (int i = 0; i<n - 2; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        int num = 0;
        num = low - a.begin();
        num = num - 1;
        if (num > i + 1){
            int h1 = a[num] - a[i];
            int h2 = a[num] - a[i+1];
            th3 =  double(h2) / double(h1) + eps;
            if (th3 > otv + eps){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n;
    int m;
    cin >> n >> m;
    int th;
    int th2;
    vector <int> a;
    for (int i = 0; i<n; i++){
        cin >> th;
        a.push_back(th);
    }
    std::vector<int>::iterator low;
    a.push_back(2000000003);
    long double eps = 0.00000000001;
    long double otv = -1.0;
    long double th3 = 0.0;
    for (int i = 0; i<n - 2; i++){
        th = a[i+1] - a[i];
        th2 = a[i] + m + 1;
        low=std::lower_bound (a.begin(), a.end(), th2);
        int num = 0;
        num = low - a.begin();
        num = num - 1;
        if (num > i + 1){
            int h1 = a[num] - a[i];
            int h2 = a[num] - a[i+1];
            th3 =  long double(h2) / long double (h1) + eps;
            if (th3 > otv + eps){
                otv = th3;
            }
        }
    }
    cout << otv;
    return 0;
}


#include <iostream>
#include <sstream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <queue>
#include <string>
#include <cstring>
#include <cassert>
#include <iomanip>
#include <algorithm>
#include <set>
#include <map>
#include <ctime>
#include <cmath>

#define forn(i, n) for(int i=0;i<n;++i)
#define fore(i, l, r) for(int i = int(l); i <= int(r); ++i)
#define sz(v) int(v.size())
#define all(v) v.begin(), v.end()
#define pb push_back
#define mp make_pair
#define x first
#define y1 ________y1
#define y second
#define ft first
#define sc second
#define pt pair<int, int>

template<typename X> inline X abs(const X& a) { return a < 0? -a: a; }
template<typename X> inline X sqr(const X& a) { return a * a; }

typedef long long li;
typedef long double ld;

using namespace std;

const int INF = 1000 * 1000 * 1000;
const ld EPS = 1e-9;
const ld PI = acos(-1.0);

const int N = 100 * 1000 + 13;

int n, u;
int a[N];
int idx1 = -1, idx2, idx3;

inline void read() {
	scanf("%d%d", &n, &u);
	for (int i = 0; i < n; i++) {
		scanf("%d", &a[i]);
	}
}

inline void solve() {
	int k = 0;
	for (int i = 0; i < n; i++) {
		k = max(k, i);
		while (k + 1 < n && a[k + 1] - a[i] <= u) {
      		k++;
		}
        if (k - i - 1 <= 0) {
        	continue;
        }
        int j = i + 1;

        if (idx1 == -1 || (a[k] - a[j]) * 1ll * (a[idx3] - a[idx1]) > (a[idx3] - a[idx2]) * 1ll * (a[k] - a[i])) {
			idx1 = i, idx2 = j, idx3 = k;
        }
	}

	if (idx1 == -1) {
		cout << -1 << endl;
		return;
	}

	cout.precision(20);
    cout << (double)(a[idx3] - a[idx2]) / (a[idx3] - a[idx1]) << endl;
}

int main () {
#ifdef fcspartakm
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif
    srand(time(NULL));
    cerr << setprecision(10) << fixed;

    read();
    solve();

    //cerr << "TIME: " << clock() << endl;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N=300050;
int U,n,l,r;
int e[N];
double ans=-1;
inline double cal(int i,int j){return (1.0*e[i]-e[j]);}

void solve(){
	l=1;
	for(int i=3;i<=n;++i){
		while(e[i]-e[l]>U)l++;
		int cha=1000000001;
		for(int j=l;j<i-1;++j){
			if(cha>=e[j+1]-e[j]){
				if(cal(i,j+1)/cal(i,j)<=ans)break;
				cha=e[j+1]-e[j];
				ans=max(ans,cal(i,j+1)/cal(i,j));
			}
		}
	}
	printf("%.9lf",ans);
	exit(0);
}

int main(){
	freopen("C.in","r",stdin);
	freopen("C.out","w",stdout);
	cin>>n>>U;
	for(int i=1;i<=n;++i)cin>>e[i];
	l=1,r=3;
	while(r<=n){
		while(e[r]-e[l]>U)++l;
		while(e[r]-e[l]<=U&&r-l+1>=3){ans=0;r++;solve();}r++;
	}
	puts("-1");
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N=300050;
int U,n,l,r;
int e[N];
double ans=-1;
inline double cal(int i,int j){return (1.0*e[i]-e[j]);}

void solve(){
	l=1;
	for(int i=3;i<=n;++i){
		while(e[i]-e[l]>U)l++;
		int cha=1000000001;
		for(int j=l;j<i-1;++j){
			if(cha>=e[j+1]-e[j]){
				if(cal(i,j+1)/cal(i,j)<=ans)break;
				cha=e[j+1]-e[j];
				ans=max(ans,cal(i,j+1)/cal(i,j));
			}
			else if(cha<e[j+1]-e[j])break;
		}
	}
	printf("%.9lf",ans);
	exit(0);
}

int main(){
//	freopen("C.in","r",stdin);
//	freopen("C.out","w",stdout);
	cin>>n>>U;
	for(int i=1;i<=n;++i)cin>>e[i];
	l=1,r=3;
	while(r<=n){
		while(e[r]-e[l]>U)++l;
		while(e[r]-e[l]<=U&&r-l+1>=3){ans=0;r++;solve();}r++;
	}
	puts("-1");
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N=300050;
int U,n,l,r;
int e[N];
double ans=-1;
inline double cal(int i,int j){return (1.0*e[i]-1.0*e[j]);}

void solve(){
	l=1;
	for(int i=3;i<=n;++i){
		while(e[i]-e[l]>U)l++;
		int cha=1000000001;
		for(int j=l;j<i-1;++j){
			if(cha>e[j+1]-e[j]){
				if(cal(i,j+1)/cal(i,j)<ans)break;
				cha=e[j+1]-e[j];
				ans=max(ans,cal(i,j+1)/cal(i,j));
			}
		}
	}
	cout<<fixed<<ans;
	exit(0);
}

int main(){
//	freopen("C.in","r",stdin);
//	freopen("C.out","w",stdout);
	cin>>n>>U;
	for(int i=1;i<=n;++i)cin>>e[i];
	l=1,r=3;
	while(r<=n){
		while(e[r]-e[l]>U)++l;
		while(e[r]-e[l]<=U&&r-l+1>=3){ans=0;r++;solve();}r++;
	}
	puts("-1");
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N=300050;
int U,n,l,r;
int e[N];
double ans=-1;
inline double cal(int i,int j){return (1.0*e[i]-1.0*e[j]);}

void solve(){
	l=1;
	for(int i=3;i<=n;++i){
		while(e[i]-e[l]>U)l++;
		int cha=1000000001;
		for(int j=l;j<i-1;++j){
			if(cha>e[j+1]-e[j]){
				if(cal(i,j+1)/cal(i,j)<ans)break;
				cha=e[j+1]-e[j];
				ans=max(ans,cal(i,j+1)/cal(i,j));
			}
		}
	}
	printf("%.10lf",ans);
	exit(0);
}

int main(){
//	freopen("C.in","r",stdin);
//	freopen("C.out","w",stdout);
	cin>>n>>U;
	for(int i=1;i<=n;++i)cin>>e[i];
	l=1,r=3;
	while(r<=n){
		while(e[r]-e[l]>U)++l;
		while(e[r]-e[l]<=U&&r-l+1>=3){ans=0;r++;solve();}r++;
	}
	puts("-1");
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N=300050;
int U,n,l,r;
int e[N];
double ans=-1;
inline double cal(int i,int j){return (1.0*e[i]-e[j]);}

void solve(){
	l=1;
	for(int i=3;i<=n;++i){
		while(e[i]-e[l]>U)l++;
		int cha=1000000001;
		for(int j=l;j<i-1;++j){
			if(cha>=e[j+1]-e[j]){
				if(cal(i,j+1)/cal(i,j)<=ans)break;
				cha=e[j+1]-e[j];
				ans=max(ans,cal(i,j+1)/cal(i,j));
			}
		}
	}
	printf("%.9lf",ans);
	exit(0);
}

int main(){
//	freopen("C.in","r",stdin);
//	freopen("C.out","w",stdout);
	cin>>n>>U;
	for(int i=1;i<=n;++i)cin>>e[i];
	l=1,r=3;
	while(r<=n){
		while(e[r]-e[l]>U)++l;
		while(e[r]-e[l]<=U&&r-l+1>=3){ans=0;r++;solve();}r++;
	}
	puts("-1");
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_DEPRECATED
#include <iostream>
#include <stdio.h>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <list>
#include <algorithm>
#include <stdlib.h>
#include <string>
#include <string.h>
#include <bitset>
#include <math.h>
#include <iomanip>

using namespace std;

#define EPS 1e-9
#define PI 3.1415926535897932384626433832795028841971
#define INF 2000000000
#define OO 0x7fffffff
#define OOO 1.7e308
#define ll long long
#define ull unsigned long long
#define lp(i,n) for(int i=0;i<n;i++)
#define rep(i,j,n) for(int i=j;i<n;i++)
#define clr(memo, j) memset(memo, j, sizeof memo)
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define All(a) a.begin(), a.end()
#define even(x) x%2==0
#define odd(x) x%2!=0
#define rd(x) scanf("%d", &x)
#define pt(x) printf("%d", x)

typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vii> vvii;

bool comp(ull x, ull y) { return x > y; }

int dx[] = { 0, 0, 1, -1, 1, 1, -1, -1 };
int dy[] = { 1, -1, 0, 0, -1, 1, 1, -1 };

class UnionFind {
private: vi p, rank;
public:
	UnionFind(int N) {
		rank.assign(N, 0);
		p.assign(N, 0);
		for (int i = 0; i < N; i++) p[i] = i;
	}

	int findSet(int i) { return (p[i] == i) ? i : (p[i] = findSet(p[i])); }
	bool isSameSet(int i, int j) { return findSet(i) == findSet(j); }
	void unionSet(int i, int j) {
		if (!isSameSet(i, j)) {
			int x = findSet(i), y = findSet(j);
			if (rank[x] > rank[y]) {
				p[y] = x;
			}
			else {
				p[x] = y;
				if (rank[x] == rank[y]) rank[y]++;
			}
		}
	}
};

/*
class SegmentTree {
private:
	vector<pair<ll, ll> > st;
	vll a;
	int n;
	int left(int p) { return p << 1; }
	int right(int p) { return (p << 1) + 1; }

	void build(int p, int L, int R) {
		if (L == R) st[p] = make_pair(a[L], a[L]);
		else {
			build(left(p), L, (L + R) / 2);
			build(right(p), (L + R) / 2 + 1, R);
			pair<ll, ll> p1 = st[left(p)], p2 = st[right(p)];
			if (R - L == 1) st[p] = make_pair(p1.first, p2.first);
			else {
				pair<ll, pair<ll, ll> > minuses[] = { make_pair(abs(p1.first - p1.second), make_pair(p1.first, p1.second)), make_pair(abs(p1.first - p2.first), make_pair(p1.first, p2.first)), make_pair(abs(p1.first - p2.second), make_pair(p1.first, p2.second)), make_pair(abs(p1.second - p2.first), make_pair(p1.second, p2.first)), make_pair(abs(p1.second - p2.second), make_pair(p1.second, p2.second)), make_pair(abs(p2.first - p2.second), make_pair(p2.first, p2.second)) };
				sort(minuses, minuses + 6);
				st[p] = minuses[0].second;
			}
		}
	}

	pair<ll, ll> rmq(int p, int L, int R, int i, int j) {
		if (i > R || j < L) return make_pair(-1LL, -1LL);
		if (L >= i && R <= j) {
			if (R == L) return make_pair(a[R], -1LL);
			return st[p];
		}

		pair<ll, ll> p1 = rmq(left(p), L, (L + R) / 2, i, j);
		pair<ll, ll> p2 = rmq(right(p), (L + R) / 2 + 1, R, i, j);

		if (p1.first == -1) return p2;
		if (p2.first == -1) return p1;
		if (R - L == 1) return make_pair(a[L], a[R]);
		else {
			pair<ll, pair<ll, ll> > minuses[6];
			if (p1.second != -1) {
				minuses[0] = make_pair(abs(p1.first - p1.second), make_pair(p1.first, p1.second));
				minuses[1] = make_pair(abs(p1.second - p2.first), make_pair(p1.second, p2.first));
				if (p2.second != -1) minuses[2] = make_pair(abs(p1.second - p2.second), make_pair(p1.second, p2.second));
				else minuses[2] = make_pair(1000000009LL, make_pair(p1.second, p2.second));
			}
			else {
				minuses[0] = make_pair(1000000009LL, make_pair(p1.first, p1.second));
				minuses[1] = make_pair(1000000009LL, make_pair(p1.second, p2.first));
				if (p2.second != -1) minuses[2] = make_pair(1000000009LL, make_pair(p1.second, p2.second));
				else minuses[2] = make_pair(1000000009LL, make_pair(p1.second, p2.second));
			}

			minuses[3] = make_pair(abs(p1.first - p2.first), make_pair(p1.first, p2.first));

			if (p2.second != -1) {
				minuses[4] = make_pair(abs(p1.first - p2.second), make_pair(p1.first, p2.second));
				minuses[5] = make_pair(abs(p2.first - p2.second), make_pair(p2.first, p2.second));
			}
			else {
				minuses[4] = make_pair(LLONG_MAX, make_pair(p1.first, p2.second));
				minuses[5] = make_pair(LLONG_MAX, make_pair(p2.first, p2.second));
			}

			sort(minuses, minuses + 6);
			return minuses[0].second;
		}
	}

public:
	SegmentTree(const vll &_a) {
		a = _a;
		n = a.size();
		st.assign(4 * n, make_pair(INF, INF));
		build(1, 0, n - 1);
	}

	pair<ll, ll> rmq(int i, int j) { return rmq(1, 0, n - 1, i, j); }
};

class FenwickTree {
private: vi ft;
public:
	FenwickTree(int n) {
		ft.assign(n + 1, 0);
	}

	int LSOne(int S) { return (S & (-S)); }

	int rsq(int b) {
		int sum = 0;
		for (; b > 0; b -= LSOne(b)) sum += ft[b];
		return sum;
	}

	int rsq(int a, int b) {
		return rsq(b) - ((a == 1) ? 0 : rsq(a - 1));
	}

	int get(int i) { return ft[i]; }

	void adjust(int k, int v) {
		for (; k < ft.size(); k += LSOne(k)) ft[k] += v;
	}
};
*/

ll gcd(ll a, ll b) {
	return b ? gcd(b, a%b) : a;
}

vector<int> getdividors(int n) {
	vector<int> dividors;
	int i;
	for (i = 1; i*i<n; i++) {
		if (n % i == 0) {
			if (i != 1) dividors.push_back(i);
			dividors.push_back(n / i);
		}
	}
	if (i*i == n) dividors.push_back(i);
	return dividors;
}

bool palindrome(string s) {
	int len = s.length();
	lp(i, len / 2) if (s[i] != s[len - i - 1]) return false;

	return true;
}

ll C(ll n) {
	return n*(n - 1) / 2;
}

void solveA() {
	int n;
	cin >> n;
	string s;
	cin >> s;

	bool two[500];
	lp(i, n) two[i] = false;
	bool can = true;

	lp(i, n - 1) {
		if (s[i] == '?' && s[i + 1] != '?') {
			if (i > 0 && s[i - 1] != '?' && s[i - 1] != s[i + 1]) two[i] = true;
		}
	}

	//lp(i, n) cout << (two[i] ? "true" : "false") << endl;

	can = false;
	lp(i, n) if (s[i] == '?' && two[i] == false) can = true;

	lp(i, n - 1) {
		if (s[i] != '?' && s[i] == s[i + 1]) can = false;
	}

	if (can) cout << "Yes" << endl;
	else cout << "No" << endl;
}

void solveB() {
	int n, m;
	cin >> n >> m;
	char grid[100][100];
	lp(i, n) {
		lp(j, m) {
			cin >> grid[i][j];
		}
	}

	bool can = true;

	lp(i, n) {
		lp(j, n) {
			bool same = true;
			bool intersect = false;
			lp(k, m) {
				if (grid[i][k] != grid[j][k]) same = false;
				if (grid[i][k] == '#' && grid[i][k] == grid[j][k]) intersect = true;
			}

			if (!same && intersect) can = false;
		}
	}

	if (can) cout << "Yes" << endl;
	else cout << "No" << endl;
}

vector<int> factorize(ll n) {
	vector<int> factors;
	for (ll i = 2; i*i <= n; i++) {
		while (n%i == 0) factors.push_back(i), n /= i;
	}
	if (n > 1) factors.push_back(n);
	return factors;
}

void solveC() {
	int n;
	ll u;
	cin >> n >> u;

	ll e[100000 + 10];
	lp(i, n) cin >> e[i];

	long double maxEta = 0;
	bool found = false;

	for (int i = 0; i < n; i++) {
		ll find = e[i] + u;
		int k = lower_bound(e, e + n, find) - e;
		if (e[k] != find) k--;
		if (k >= 0 && i < k - 1 && e[k] - e[i] <= u) {
			ll denom = e[k] - e[i];
			ll nom = e[k] - e[i + 1];

			found = true;
			long double eta = (nom*1.0) / (denom*1.0);
			if (eta - maxEta > (double) 0) {
				maxEta = eta;
			}
		}
	}

	if (found) cout << fixed << setprecision(15) << maxEta << endl;
	else cout << -1 << endl;
}

int main() {
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	//freopen("C:\\Users\\Wajdy\\Desktop\\A-small-attempt2.in", "r", stdin);
	//freopen("C:\\Users\\Wajdy\\Desktop\\A-small-attempt2.out", "w", stdout);

	//ios::sync_with_stdio(false);

	solveC();

	return 0;
}