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

#define ll long long
#define pb push_back
#define fast() ios_base::sync_with_stdio(false); cin.tie(NULL);
#define mod 1000000007
#define mp make_pair
#define ff first
#define ss second
#define log2(X) (63ll - __builtin_clzll(X))

ll po(ll a, ll b)
{
    ll res=1;
    while(b)
    {
        if(b&1)
        {
            res=((res)%mod*a)%mod;
        }
        a=(a*a)%mod;
        b=b/2;
    }
    return res%mod;
}

int main()
{
    fast()
    int t;
    cin>>t;
    while(t--)
    {
        ll n,k;
        cin>>n>>k;
        ll arr[n+1];
        for(int i=1; i<=n; i++)
        {
            cin>>arr[i];
        }
        ll ans[n+1]={0};
        ll c=0;
        ans[1]=0;
        int index[n+1]={0};
        for(int i=2; i<=n-1; i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
            {
                c++;
                index[i]=1;
            }
            ans[i]=c;
        }

        ans[n]=c;
        ll ma=0,in=0;
        for(int i=1; i<=n-k+1; i++)
        {
            if(ans[i+k-1]-ans[i]>ma && index[i]!=1 && index[i+k-1]!=1)
            {
               if(ans[i-1]<ans[i])
               {
                   ma=ans[i+k-1]-ans[i]+1;
                   in=i;
               }
               else
               {
                   ma=ans[i+k-1]-ans[i];
                   in=i;
               }
            }
        }
        if(in==0){
        cout<<ma<<" "<<1<<"\n";}
        else
        {
            cout<<ma+1<<" "<<in<<"\n";
        }
    }
    return 0;
}


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

#define ll long long
#define pb push_back
#define fast() ios_base::sync_with_stdio(false); cin.tie(NULL);
#define mod 1000000007
#define mp make_pair
#define ff first
#define ss second
#define log2(X) (63ll - __builtin_clzll(X))

ll po(ll a, ll b)
{
    ll res=1;
    while(b)
    {
        if(b&1)
        {
            res=((res)%mod*a)%mod;
        }
        a=(a*a)%mod;
        b=b/2;
    }
    return res%mod;
}

int main()
{
    fast()
    int t;
    cin>>t;
    while(t--)
    {
        ll n,k;
        cin>>n>>k;
        ll arr[n+1];
        for(int i=1; i<=n; i++)
        {
            cin>>arr[i];
        }
        ll ans[n+1]={0};
        ll c=0;
        ans[1]=0;
        int index[n+1]={0};
        for(int i=2; i<=n-1; i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
            {
                c++;
                index[i]=1;
            }
            ans[i]=c;
        }

        ans[n]=c;
        ll ma=0,in=0;
        for(int i=1; i<=n-k+1; i++)
        {
            ll v=ans[i+k-1]-ans[i];
            if(index[i]==1)
            {
              v--;
            }
            if(index[i+k-1]==1)
            {
                v--;
            }
            if(v>ma)
            {
                ma=v;
                in=i;
            }
        }
        if(in==0){
        cout<<ma<<" "<<1<<"\n";}
        else
        {
            cout<<ma+1<<" "<<in<<"\n";
        }
    }
    return 0;
}


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

#define ll long long
#define pb push_back
#define fast() ios_base::sync_with_stdio(false); cin.tie(NULL);
#define mod 1000000007
#define mp make_pair
#define ff first
#define ss second
#define log2(X) (63ll - __builtin_clzll(X))

ll po(ll a, ll b)
{
    ll res=1;
    while(b)
    {
        if(b&1)
        {
            res=((res)%mod*a)%mod;
        }
        a=(a*a)%mod;
        b=b/2;
    }
    return res%mod;
}

int main()
{
    fast()
    int t;
    cin>>t;
    while(t--)
    {
        ll n,k;
        cin>>n>>k;
        ll arr[n+1];
        for(int i=1; i<=n; i++)
        {
            cin>>arr[i];
        }
        ll ans[n+1]={0};
        ll c=0;
        ans[1]=0;
        int index[n+1]={0};
        for(int i=2; i<=n-1; i++)
        {
            if(arr[i]>arr[i-1] && arr[i]>arr[i+1])
            {
                c++;
                index[i]=1;
            }
            ans[i]=c;
        }

        ans[n]=c;
        ll ma=0,in=0;
        for(int i=1; i<=n-k+1; i++)
        {
            ll v=ans[i+k-1]-ans[i];
            if(index[i]==1)
            {
              v--;
            }
            if(index[i+k-1]==1)
            {
                v--;
            }
            if(v>ma)
            {
                ma=v;
                in=i;
            }
        }
        if(in==0){
        cout<<1<<" "<<1<<"\n";}
        else
        {
            cout<<ma+1<<" "<<in<<"\n";
        }
    }
    return 0;
}


/* SHAHADATH HOSSAIN TAMIM
   BANGLADESH UNIVERSITY OF BUSINESS AND TECHNOLOGY
*/

#include<iostream>
#include<map>

using namespace std;

#define ll long long
#define pb push_back
#define pob pop_back
#define sti(a) st.insert(a)
#define gcd __gcd
#define lcm(a,b) (a*b)/__gcd(a,b)
#define l s.length()
#define sts st.size()
#define mpss mps.size()
#define mpis mpi.size()
#define vs v.size()
#define s(a) sort(a.begin(), a.end())
#define f(a,b) for(int i=a; i<b; i++)
#define fl(a,b) for(long long i=a; i<b; i++)
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define INF 1e9
#define INFL 1e18
#define mod 1e9+7

void fast() {ios_base::sync_with_stdio(false); cin.tie(NULL);}

map<ll, ll>mp,mpi;
int main()
{
    //freopen("tamim.txt", "w", stdout);
    fast();

    ll tst;
    cin>>tst;
    while(tst--)
    {
        mp.clear();
        mpi.clear();
        ll n,s;
        cin>>n>>s;
        ll t[n+5];
        fl(1,n+1) cin>>t[i];
        ll p=0LL;
        fl(1, n+1)
        {
            if(i==1&&t[i]>t[i+1])
            {
                p++;
                mpi[i]=1;

            }
            else if(i==n&&t[i]>t[i-1]) mpi[i]=1,p++;
            else
            {
                if(t[i]>t[i-1]&&t[i]>t[i+1])
                {
                    p++;
                    mpi[i]=1;
                }
            }
            mp[i]=p;
        }
       //for(int i=1; i<=n; i++) cout<<mpi[i]<<" ";
        //cout<<endl;
       // for(int i=1; i<=n; i++) cout<<mp[i]<<" ";
       // cout<<endl;
        int j=mp[n];
        int dis[n+5];
        int x=0;
        for(int i=n; i>=1; i--)
        {
            if(mpi[i])
            {
                dis[i]=0;
                x=0;
            }
            x++;
            dis[i]=x;
        }
        //cout<<"pic "<<p<<" "<<n-s+1<<" "<<s<<endl;
        ll y=0,q=0,a,b;
        for(int i=1; i<=n-s+1; i++)
        {
            x=mp[i+s-1]-mp[i];
            //cout<<t[i]<<" "<<t[i+s-1]<<endl;
            //cout<<" part "<<x<<endl;
            //if(mpi[t[i]) x++;
            if(mpi[i+s-1]) x--;
            if(x+1==y&&dis[i]+2<q+2)
            {
                y=x+1;
                q=dis[i];
            }
            else if(x+1>y)
            {
                //cout<<" ans "<<x+1<<" "<<i<<endl;
                y=x+1;
                q=i;

            }

        }

        cout<<y<<" "<<q<<endl;

    }

    return 0;
}


/* SHAHADATH HOSSAIN TAMIM
   BANGLADESH UNIVERSITY OF BUSINESS AND TECHNOLOGY
*/

#include<bits/stdc++.h>
#include<map>

using namespace std;

#define ll long long
#define pb push_back
#define pob pop_back
#define sti(a) st.insert(a)
#define gcd __gcd
#define lcm(a,b) (a*b)/__gcd(a,b)
#define l s.length()
#define sts st.size()
#define mpss mps.size()
#define mpis mpi.size()
#define vs v.size()
#define s(a) sort(a.begin(), a.end())
#define f(a,b) for(int i=a; i<b; i++)
#define fl(a,b) for(long long i=a; i<b; i++)
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define INF 1e9
#define INFL 1e18
#define mod 1e9+7

void fast() {ios_base::sync_with_stdio(false); cin.tie(NULL);}

map<ll, ll>mp,mpi;

int main()
{
    //freopen("tamim.txt", "w", stdout);
    fast();

    ll tst;
    cin>>tst;
    while(tst--)
    {
        mp.clear();

        ll n,s;
        cin>>n>>s;
        ll t[n+5],mx=0LL;
        fl(1,n+1) cin>>t[i];
        ll p=0LL;
        fl(2, n+1)
        {

            if(i+1<=n&&i-1>=1LL&&t[i]>t[i-1]&&t[i]>t[i+1])
            {
                p++;
            }
            mp[i]=p;
        }
        ll y=0LL,q=0LL,a,b,x=0LL;
        for(ll i=1; i+s-1<=n; i++)
        {
            //cout<<i<<" index "<<i+s-1<<endl;
            x=mp[i+s-2]-mp[i];
            //cout<<x<<" "<<mp[i]<<" "<<mp[i+s-1]<<endl;
            //cout<<t[i]<<" "<<t[i+s-1]<<endl;
            //cout<<" part "<<x<<endl;
            //if(mpi[t[i]) x++;
            //cout<<x<<" "<<mp[i]<<" "<<mp[i+s-1]<<endl;
            if(x+1>y)
            {
                //cout<<" ans "<<x+1<<" "<<i<<endl;
                y=x+1;
                q=i;
                //cout<<y<<" "<<i<<endl;

            }
            //cout<<y<<" "<<dis[i]<<endl;

        }

        cout<<y<<" "<<q<<endl;

    }

    return 0;
}


/* SHAHADATH HOSSAIN TAMIM
   BANGLADESH UNIVERSITY OF BUSINESS AND TECHNOLOGY
*/

#include<bits/stdc++.h>

using namespace std;

#define ll long long
#define pb push_back
#define pob pop_back
#define sti(a) st.insert(a)
#define gcd __gcd
#define lcm(a,b) (a*b)/__gcd(a,b)
#define l s.length()
#define sts st.size()
#define mpss mps.size()
#define mpis mpi.size()
#define vs v.size()
#define s(a) sort(a.begin(), a.end())
#define f(a,b) for(int i=a; i<b; i++)
#define fl(a,b) for(long long i=a; i<b; i++)
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define INF 1e9
#define INFL 1e18
#define mod 1e9+7

void fast() {ios_base::sync_with_stdio(false); cin.tie(NULL);}

//map<int, int>mpi;
map<string, int>mps;
map<int, vector<int> > path;
map<int, int>visited;
set<int>st;
vector<int>v;
//map<int, int>::iterator iti;
map<string, int>::iterator its;
set<int>:: iterator sit;
vector<int>::iterator itv;

//void fresh() { mpi.clear(); mps.clear(); st.clear(); v.clear(); path.clear(); visited.clear(); }
map<ll, ll>mp,mpi;
int main()
{
    //freopen("tamim.txt", "w", stdout);
    fast();

    ll tst;
    cin>>tst;
    while(tst--)
    {
        mp.clear();
        mpi.clear();
        ll n,s;
        cin>>n>>s;
        ll t[n+5];
        fl(1,n+1) cin>>t[i];
        ll p=0LL;
        fl(1, n+1)
        {
            if(i==1&&t[i]>t[i+1])
            {
                p++;
                mpi[i]=1;

            }
            else if(i==n&&t[i]>t[i-1]) mpi[i]=1,p++;
            else
            {
                if(t[i]>t[i-1]&&t[i]>t[i+1])
                {
                    p++;
                    mpi[i]=1;
                }
            }
            mp[i]=p;
        }
        int j=mp[n];
        int dis[n+5];
        int x=0;
        for(int i=n; i>=1; i--)
        {
            if(mpi[i])
            {
                dis[i]=0;
                x=0;
            }
            x++;
            dis[i]=x;
        }
        //cout<<"pic "<<p<<" "<<n-s+1<<" "<<s<<endl;
        ll y=0,q=0,a,b;
        for(int i=1; i<=n-s+1; i++)
        {
            x=mp[i+s-1]-mp[i];
            //cout<<t[i]<<" "<<t[i+s-1]<<endl;
            //cout<<" part "<<x<<endl;
            //if(mpi[t[i]) x++;
            if(mpi[i+s-1]) x--;
            if(x+1==y&&dis[i]+2<q+2)
            {
                y=x+1;
                q=dis[i];
            }
            else if(x+1>y)
            {
                //cout<<" ans "<<x+1<<" "<<i<<endl;
                y=x+1;
                a=i;

            }

        }

        cout<<y<<" "<<q+2<<endl;

    }

    return 0;
}


/* SHAHADATH HOSSAIN TAMIM
   BANGLADESH UNIVERSITY OF BUSINESS AND TECHNOLOGY
*/

#include<bits/stdc++.h>
#include<map>

using namespace std;

#define ll long long
#define pb push_back
#define pob pop_back
#define sti(a) st.insert(a)
#define gcd __gcd
#define lcm(a,b) (a*b)/__gcd(a,b)
#define l s.length()
#define sts st.size()
#define mpss mps.size()
#define mpis mpi.size()
#define vs v.size()
#define s(a) sort(a.begin(), a.end())
#define f(a,b) for(int i=a; i<b; i++)
#define fl(a,b) for(long long i=a; i<b; i++)
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define INF 1e9
#define INFL 1e18
#define mod 1e9+7

void fast() {ios_base::sync_with_stdio(false); cin.tie(NULL);}

map<ll, ll>mp,mpi;
vector<ll>v;
int main()
{
    //freopen("tamim.txt", "w", stdout);
    fast();

    ll tst;
    cin>>tst;
    while(tst--)
    {
        mp.clear();
        mpi.clear();
        v.clear();
        ll n,s;
        cin>>n>>s;
        ll t[n+5];
        fl(1,n+1) cin>>t[i];
        ll p=0LL;
        fl(1, n+1)
        {

            if(i+1<=n&&i-1>=1LL&&t[i]>t[i-1]&&t[i]>t[i+1])
            {

                    p++;
                    mpi[i]=1LL;
                    v.pb(i);

            }
            mp[i]=p;
        }
        v.pb(n+1);
       /*for(int i=1; i<=n; i++) cout<<mpi[i]<<" ";
        cout<<endl;
        for(int i=1; i<=n; i++) cout<<mp[i]<<" ";
        cout<<endl;*/
        ll j=mp[n];
        ll dis[n+5];
        ll x=0LL;
        for(int i=1; i<=n; i++)
        {
            dis[i]=v[x]-i;
            if(v[x]==i) x++;
        }
        /*for(ll i=1; i<=n; i++) cout<<dis[i]<<" ";
        cout<<endl;*/
        //cout<<"pic "<<p<<" "<<n-s+1<<" "<<s<<endl;
        ll y=0LL,q=0LL,a,b;
        for(ll i=1; i<=n-s+1; i++)
        {
            x=mp[i+s-1]-mp[i];
            //cout<<t[i]<<" "<<t[i+s-1]<<endl;
            //cout<<" part "<<x<<endl;
            //if(mpi[t[i]) x++;
            if(mpi[i+s-1]) x--;
            if(x+1==y&&dis[i]+2<q+2)
            {
                y=x+1;
                q=dis[i];
            }
            else if(x+1>y)
            {
                //cout<<" ans "<<x+1<<" "<<i<<endl;
                y=x+1;
                q=i;

            }

        }

        cout<<y<<" "<<q<<endl;

    }

    return 0;
}


/* SHAHADATH HOSSAIN TAMIM
   BANGLADESH UNIVERSITY OF BUSINESS AND TECHNOLOGY
*/

#include<bits/stdc++.h>
#include<map>

using namespace std;

#define ll long long
#define pb push_back
#define pob pop_back
#define sti(a) st.insert(a)
#define gcd __gcd
#define lcm(a,b) (a*b)/__gcd(a,b)
#define l s.length()
#define sts st.size()
#define mpss mps.size()
#define mpis mpi.size()
#define vs v.size()
#define s(a) sort(a.begin(), a.end())
#define f(a,b) for(int i=a; i<b; i++)
#define fl(a,b) for(long long i=a; i<b; i++)
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define INF 1e9
#define INFL 1e18
#define mod 1e9+7

void fast() {ios_base::sync_with_stdio(false); cin.tie(NULL);}

map<ll, ll>mp,mpi;
vector<ll>v;
int main()
{
    //freopen("tamim.txt", "w", stdout);
    fast();

    ll tst;
    cin>>tst;
    while(tst--)
    {
        mp.clear();
        mpi.clear();
        v.clear();
        ll n,s;
        cin>>n>>s;
        ll t[n+5],mx=0LL;
        fl(1,n+1) cin>>t[i], mx=max(mx, t[i]);
        ll p=0LL;
        fl(1, n+1)
        {

            if(i+1<=n&&i-1>=1LL&&t[i]>t[i-1]&&t[i]>t[i+1])
            {

                    p++;
                    mpi[i]=1LL;
                    v.pb(i);

            }
            mp[i]=p;
        }
        ll y=0LL,q,a,b,x=0LL;
        for(ll i=1; i+s-1<=n; i++)
        {
            //cout<<i<<" index "<<i+s-1<<endl;
            x=mp[i+s-1]-mp[i];
            //cout<<x<<" "<<mp[i]<<" "<<mp[i+s-1]<<endl;
            //cout<<t[i]<<" "<<t[i+s-1]<<endl;
            //cout<<" part "<<x<<endl;
            //if(mpi[t[i]) x++;
            if(mpi[i+s-1]) x--;
            //cout<<x<<" "<<mp[i]<<" "<<mp[i+s-1]<<endl;
            else if(x+1>y)
            {
                //cout<<" ans "<<x+1<<" "<<i<<endl;
                y=x+1;
                q=i;
                //cout<<y<<" "<<i<<endl;

            }
            //cout<<y<<" "<<dis[i]<<endl;

        }

        cout<<y<<" "<<q<<endl;

    }

    return 0;
}


/* SHAHADATH HOSSAIN TAMIM
   BANGLADESH UNIVERSITY OF BUSINESS AND TECHNOLOGY
*/

#include<bits/stdc++.h>
#include<map>

using namespace std;

#define ll long long
#define pb push_back
#define pob pop_back
#define sti(a) st.insert(a)
#define gcd __gcd
#define lcm(a,b) (a*b)/__gcd(a,b)
#define l s.length()
#define sts st.size()
#define mpss mps.size()
#define mpis mpi.size()
#define vs v.size()
#define s(a) sort(a.begin(), a.end())
#define f(a,b) for(int i=a; i<b; i++)
#define fl(a,b) for(long long i=a; i<b; i++)
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define INF 1e9
#define INFL 1e18
#define mod 1e9+7

void fast() {ios_base::sync_with_stdio(false); cin.tie(NULL);}

map<ll, ll>mp,mpi;
vector<ll>v;
int main()
{
    //freopen("tamim.txt", "w", stdout);
    fast();

    ll tst;
    cin>>tst;
    while(tst--)
    {
        mp.clear();
        mpi.clear();
        v.clear();
        ll n,s;
        cin>>n>>s;
        ll t[n+5];
        fl(1,n+1) cin>>t[i];
        ll p=0LL;
        fl(1, n+1)
        {

            if(i+1<=n&&i-1>=1LL&&t[i]>t[i-1]&&t[i]>t[i+1])
            {

                    p++;
                    mpi[i]=1LL;
                    v.pb(i);

            }
            mp[i]=p;
        }
       /*for(int i=1; i<=n; i++) cout<<mpi[i]<<" ";
        cout<<endl;
        for(int i=1; i<=n; i++) cout<<mp[i]<<" ";
        cout<<endl;*/
        ll j=mp[n];
        ll dis[n+5];
        ll x=0LL;
        for(int i=1; i<=n; i++)
        {
            dis[i]=v[x]-i;
            if(v[x]==i) x++;
        }
        /*for(ll i=1; i<=n; i++) cout<<dis[i]<<" ";
        cout<<endl;*/
        //cout<<"pic "<<p<<" "<<n-s+1<<" "<<s<<endl;
        ll y=0LL,q=0LL,a,b;
        for(ll i=1; i<=n-s+1; i++)
        {
            x=mp[i+s-1]-mp[i];
            //cout<<t[i]<<" "<<t[i+s-1]<<endl;
            //cout<<" part "<<x<<endl;
            //if(mpi[t[i]) x++;
            if(mpi[i+s-1]) x--;
            if(x+1==y&&dis[i]+2<q+2)
            {
                y=x+1;
                q=dis[i];
            }
            else if(x+1>y)
            {
                //cout<<" ans "<<x+1<<" "<<i<<endl;
                y=x+1;
                q=i;

            }

        }

        cout<<y<<" "<<q<<endl;

    }

    return 0;
}


/* SHAHADATH HOSSAIN TAMIM
   BANGLADESH UNIVERSITY OF BUSINESS AND TECHNOLOGY
*/

#include<iostream>
#include<map>

using namespace std;

#define ll long long
#define pb push_back
#define pob pop_back
#define sti(a) st.insert(a)
#define gcd __gcd
#define lcm(a,b) (a*b)/__gcd(a,b)
#define l s.length()
#define sts st.size()
#define mpss mps.size()
#define mpis mpi.size()
#define vs v.size()
#define s(a) sort(a.begin(), a.end())
#define f(a,b) for(int i=a; i<b; i++)
#define fl(a,b) for(long long i=a; i<b; i++)
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define INF 1e9
#define INFL 1e18
#define mod 1e9+7

void fast() {ios_base::sync_with_stdio(false); cin.tie(NULL);}

map<ll, ll>mp,mpi;
int main()
{
    //freopen("tamim.txt", "w", stdout);
    fast();

    ll tst;
    cin>>tst;
    while(tst--)
    {
        mp.clear();
        mpi.clear();
        ll n,s;
        cin>>n>>s;
        ll t[n+5];
        fl(1,n+1) cin>>t[i];
        ll p=0LL;
        fl(1, n+1)
        {

            if(t[i]>t[i-1]&&t[i]>t[i+1]&&i+1<=n&&i-1>=1)
            {

                    p++;
                    mpi[i]=1;

            }
            mp[i]=p;
        }
       /*for(int i=1; i<=n; i++) cout<<mpi[i]<<" ";
        cout<<endl;
        for(int i=1; i<=n; i++) cout<<mp[i]<<" ";
        cout<<endl;*/
        int j=mp[n];
        int dis[n+5];
        int x=0;
        for(int i=n; i>=1; i--)
        {
            if(mpi[i])
            {
                dis[i]=0;
                x=0;
            }
            x++;
            dis[i]=x;
        }
        //cout<<"pic "<<p<<" "<<n-s+1<<" "<<s<<endl;
        ll y=0,q=0,a,b;
        for(int i=1; i<=n-s+1; i++)
        {
            x=mp[i+s-1]-mp[i];
            //cout<<t[i]<<" "<<t[i+s-1]<<endl;
            //cout<<" part "<<x<<endl;
            //if(mpi[t[i]) x++;
            if(mpi[i+s-1]) x--;
            if(x+1==y&&dis[i]+2<q+2)
            {
                y=x+1;
                q=dis[i];
            }
            else if(x+1>y)
            {
                //cout<<" ans "<<x+1<<" "<<i<<endl;
                y=x+1;
                q=i;

            }

        }

        cout<<y<<" "<<q<<endl;

    }

    return 0;
}


/* SHAHADATH HOSSAIN TAMIM
   BANGLADESH UNIVERSITY OF BUSINESS AND TECHNOLOGY
*/

#include<iostream>
#include<map>

using namespace std;

#define ll long long
#define pb push_back
#define pob pop_back
#define sti(a) st.insert(a)
#define gcd __gcd
#define lcm(a,b) (a*b)/__gcd(a,b)
#define l s.length()
#define sts st.size()
#define mpss mps.size()
#define mpis mpi.size()
#define vs v.size()
#define s(a) sort(a.begin(), a.end())
#define f(a,b) for(int i=a; i<b; i++)
#define fl(a,b) for(long long i=a; i<b; i++)
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define INF 1e9
#define INFL 1e18
#define mod 1e9+7

void fast() {ios_base::sync_with_stdio(false); cin.tie(NULL);}

map<ll, ll>mp,mpi;
int main()
{
    //freopen("tamim.txt", "w", stdout);
    fast();

    ll tst;
    cin>>tst;
    while(tst--)
    {
        mp.clear();
        mpi.clear();
        ll n,s;
        cin>>n>>s;
        ll t[n+5];
        fl(1,n+1) cin>>t[i];
        ll p=0LL;
        fl(1, n+1)
        {
            if(i==1&&t[i]>t[i+1])
            {
                p++;
                mpi[i]=1;

            }
            else if(i==n&&t[i]>t[i-1]) mpi[i]=1,p++;
            else
            {
                if(i-1>=1&&i+1<=n&&t[i]>t[i-1]&&t[i]>t[i+1])
                {
                    p++;
                    mpi[i]=1;
                }
            }
            mp[i]=p;
        }
       //for(int i=1; i<=n; i++) cout<<mpi[i]<<" ";
        //cout<<endl;
       // for(int i=1; i<=n; i++) cout<<mp[i]<<" ";
       // cout<<endl;
        int j=mp[n];
        int dis[n+5];
        int x=0;
        for(int i=n; i>=1; i--)
        {
            if(mpi[i])
            {
                dis[i]=0;
                x=0;
            }
            x++;
            dis[i]=x;
        }
        //cout<<"pic "<<p<<" "<<n-s+1<<" "<<s<<endl;
        ll y=0,q=0,a,b;
        for(int i=1; i<=n-s+1; i++)
        {
            x=mp[i+s-1]-mp[i];
            //cout<<t[i]<<" "<<t[i+s-1]<<endl;
            //cout<<" part "<<x<<endl;
            //if(mpi[t[i]) x++;
            if(mpi[i+s-1]) x--;
            if(x+1==y&&dis[i]+2<q+2)
            {
                y=x+1;
                q=dis[i];
            }
            else if(x+1>y)
            {
                //cout<<" ans "<<x+1<<" "<<i<<endl;
                y=x+1;
                q=i;

            }

        }

        cout<<y<<" "<<q<<endl;

    }

    return 0;
}


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

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int n,k;cin>>n>>k;
        int arr[n];
        for(int i=0;i<n;i++)
            cin>>arr[i];
        int peak_arr[n];
        int pre_sum[n];
        peak_arr[0]=0;
        peak_arr[n-1]=0;
        pre_sum[0]=0;
        int sum=0;
        for(int i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] and arr[i]>arr[i+1])
            {
                peak_arr[i]=1;
                pre_sum[i]=pre_sum[i-1]+1;
            }

            else
            {
                peak_arr[i]=0;
                pre_sum[i]=pre_sum[i-1];
            }

        }
        pre_sum[n-1]=pre_sum[n-2];

        int len=0;
        int p=1;
        for(int i=0;i+k-2<n;i++)
        {
            if(pre_sum[i+k-2]-pre_sum[i]>len)
            {
                len=pre_sum[i+k-2]-pre_sum[i];
                p=i+1;
            }
        }

        cout<<len+1<<" "<<p<<endl;
    }
    return 0;
}


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

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,k;
        cin>>n>>k;
        int arr[n];
        for(int i=0;i<n;i++)
            cin>>arr[i];

       int maxi=INT_MIN;
        int p;
        int len1;

        for(int i=0;i<=n-k;i++)
        {
             len1=0;
            int j=i+1;
            int flag=0;
            while(j<i+k-1)
            {

                if(flag==0 and arr[j]>arr[j-1])
                    flag=1;
                if(flag==1 and arr[j]>arr[j+1])
                {
                    len1++;
                    j=j+2;
                    flag=0;
                }
                else
                {
                      flag=1;
                j++;
                }
            }

            if(maxi<len1)
            {
                maxi=len1;
                p=i+1;

            }

        }

       cout<<maxi+1<<" "<<p<<endl;

    }

    return 0;
}


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

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,k;
        cin>>n>>k;
        int arr[n];
        for(int i=0;i<n;i++)
            cin>>arr[i];

       int maxi=INT_MIN;
        int p;
        int len1;

        for(int i=0;i<=n-k;i++)
        {
             len1=0;
            int j;
            for( j=i+1;j<i+k-1;j++)
            {
                if(arr[j]>arr[j-1] and arr[j]>arr[j+1])
                    len1++;

            }

            if(maxi<len1)
            {
                maxi=len1;
                p=i+1;

            }

        }

       cout<<maxi+1<<" "<<p<<endl;

    }

    return 0;
}


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

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int n,k;cin>>n>>k;
        int arr[n];
        for(int i=0;i<n;i++)
            cin>>arr[i];
        int peak_arr[n];
        int pre_sum[n];
        peak_arr[0]=0;
        peak_arr[n-1]=0;
        pre_sum[0]=0;
        int sum=0;
        for(int i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] and arr[i]>arr[i+1])
            {
                peak_arr[i]=1;
                pre_sum[i]=pre_sum[i-1]+1;
            }

            else
            {
                peak_arr[i]=0;
                pre_sum[i]=pre_sum[i-1];
            }

        }
        pre_sum[n-1]=pre_sum[n-2];

        int len=0;
        int p;
        for(int i=0;i+k-2<n;i++)
        {
            if(pre_sum[i+k-2]-pre_sum[i]>len)
            {
                len=pre_sum[i+k-2]-pre_sum[i];
                p=i+1;
            }
        }

        cout<<len+1<<" "<<p<<endl;
    }
    return 0;
}


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

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,k;
        cin>>n>>k;
        int arr[n];
        for(int i=0;i<n;i++)
            cin>>arr[i];

       int maxi=INT_MIN;
        int p;
        int len1;

        for(int i=0;i<=n-k;i++)
        {
             len1=0;
            int j=i+1;
            int flag=0;
            while(j<i+k-1)
            {

                if(flag==0 and arr[j]>arr[j-1])
                    flag=1;
                if(flag==1 and arr[j]>arr[j+1])
                {
                    len1++;
                    j=j+2;
                    flag=0;
                }
                else if (flag==1 and arr[j]<arr[j+1])
                {
                      flag=1;
                j++;
                }
                else
                    j++;

            }

            if(maxi<len1)
            {
                maxi=len1;
                p=i+1;

            }

        }

       cout<<maxi+1<<" "<<p<<endl;

    }

    return 0;
}


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

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int n,k;
        cin>>n>>k;
        int arr[n];
        for(int i=0;i<n;i++)
            cin>>arr[i];

       int maxi=INT_MIN;
        int p;
        int len1;

        for(int i=0;i<=n-k;i++)
        {
             len1=0;
            int j=i+1;
            while(j<i+k-1)
            {
                int flag=0;
                if(flag=0 and arr[j]>arr[j-1])
                    flag=1;
                if(flag=1 and arr[j]>arr[j+1])
                {
                    len1++;
                    j=j+2;
                }
                else
                {
                      flag=0;
                j++;
                }
            }

            if(maxi<len1)
            {
                maxi=len1;
                p=i+1;

            }

        }

       cout<<maxi+1<<" "<<p<<endl;

    }

    return 0;
}


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

int main()
{
    int t;cin>>t;
    while(t--)
    {
        int n,k;cin>>n>>k;
        int arr[n];
        for(int i=0;i<n;i++)
            cin>>arr[i];
        int peak_arr[n];
        int pre_sum[n];
        peak_arr[0]=0;
        peak_arr[n-1]=0;
        pre_sum[0]=0;
        int sum=0;
        for(int i=1;i<n-1;i++)
        {
            if(arr[i]>arr[i-1] and arr[i]>arr[i+1])
            {
                peak_arr[i]=1;
                pre_sum[i]=pre_sum[i-1]+1;
            }

            else
            {
                peak_arr[i]=0;
                pre_sum[i]=pre_sum[i-1];
            }

        }
        pre_sum[n-1]=pre_sum[n-2];

        int len=0;
        int p=0;
        for(int i=0;i+k-2<n;i++)
        {
            if(pre_sum[i+k-2]-pre_sum[i]>len)
            {
                len=pre_sum[i+k-2]-pre_sum[i];
                p=i+1;
            }
        }

        cout<<len+1<<" "<<p<<endl;
    }
    return 0;
}


//@author :  |< U $ |-|
#include<cmath>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<deque>
#include<queue>
#include<algorithm>
#include<list>
#include<cstring>
#include<unordered_map>
#define ll long long
#define vi vector<long long>
#define pb push_back
#define pop pop_back
#define pi pair<long long ,long long>
#define vp vector<pair<long long,long long> >
#define mkp make_pair
#define in(i,n) for(i=0;i<n;i++)
#define fon(i,n,m) for(i=n;i<m;i++)
#define rfon(i,n,m) for(i=n;i>=m;i--)
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define jaldi ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define map map<long long,long long>
#define inm1(b)  memset(b,-1,sizeof(b))
#define in0(b) memset(b,0,sizeof(b))
#define ininf(b) memset(b,1000000001,sizeof(b))
#define MOD         1000000007
#define I 1000000000000000001
#define t(a) cout<<a<<" "<<endl
#define tt(a,b) cout<<a<<" "<<b<<endl
#define th(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl
#define TakeInput freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
using namespace std;
ll gcd(ll a, ll b) {  if (a == 0)  return b; return gcd(b % a, a); }

int main(){
    jaldi
    #ifndef ONLINE_JUDGE
    TakeInput
    #endif

    ll i,j,k,n,m,t,q;

    cin>>t;

    while(t--){
        cin>>n>>k;
        ll a[n];
        in(i,n){
            cin>>a[i];
        }
        ll b[n];
        in0(b);
        ll f=1;
        fon(i,1,n-1){
            if(f==0 && a[i]>a[i-1]){
                f=1;
            }
            if(f && a[i]>a[i+1]){
                f=0;
                b[i]=1;
            }
        }
        ll count=0;
        fon(i,0,k-1){
            // cout<<b[i]<<" ";
            if(b[i]==1)count++;
        }
        // t(count);
        j=k-1;
        ll ma=0;
        ll x=1,y=1;
        fon(i,0,n-k+1){
            if(ma<count){
                // tt(i,j);
                ma=count;
                x=count+1;
                y=i+1;
                // v.pb(mkp(x,y))
            }
            // cout<<count<<" ";
            if(b[i+1]==1)count--;
            if(b[j]==1)count++;
            j++;
        }
        // cout<<endl;
        tt(x,y);
    }

}


//@author :  |< U $ |-|
#include<cmath>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<deque>
#include<queue>
#include<algorithm>
#include<list>
#include<cstring>
#include<unordered_map>
#define ll long long
#define vi vector<long long>
#define pb push_back
#define pop pop_back
#define pi pair<long long ,long long>
#define vp vector<pair<long long,long long> >
#define mkp make_pair
#define in(i,n) for(i=0;i<n;i++)
#define fon(i,n,m) for(i=n;i<m;i++)
#define rfon(i,n,m) for(i=n;i>=m;i--)
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define jaldi ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define map map<long long,long long>
#define inm1(b)  memset(b,-1,sizeof(b))
#define in0(b) memset(b,0,sizeof(b))
#define ininf(b) memset(b,1000000001,sizeof(b))
#define MOD         1000000007
#define I 1000000000000000001
#define t(a) cout<<a<<" "<<endl
#define tt(a,b) cout<<a<<" "<<b<<endl
#define th(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl
#define TakeInput freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
using namespace std;
ll gcd(ll a, ll b) {  if (a == 0)  return b; return gcd(b % a, a); }

int main(){
    jaldi
    #ifndef ONLINE_JUDGE
    TakeInput
    #endif

    ll i,j,k,n,m,t,q;

    cin>>t;

    while(t--){
        cin>>n>>k;
        ll a[n];
        in(i,n){
            cin>>a[i];
        }
        ll b[n];
        in0(b);
        ll f=1;
        fon(i,1,n-1){
            if(f==0 && a[i]>a[i-1]){
                f=1;
            }
            if(f && a[i]>a[i+1]){
                f=0;
                b[i]=1;
            }
        }
        ll count=0;
        fon(i,0,k-1){
            // cout<<b[i]<<" ";
            if(b[i]==1)count++;
        }
        // t(count);
        j=k-1;
        ll ma=0;
        ll x=1,y=1;
        fon(i,0,n-k+1){
            if(ma<count){
                // tt(i,j);
                ma=count;
                x=count+1;
                y=i+1;
                // v.pb(mkp(x,y))
            }
            // cout<<count<<" ";
            if(b[i]==1)count--;
            if(b[j]==1)count++;
            j++;
        }
        // cout<<endl;
        tt(x,y);
    }

}


//@author :  |< U $ |-|
#include<cmath>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<deque>
#include<queue>
#include<algorithm>
#include<list>
#include<cstring>
#include<unordered_map>
#define ll long long
#define vi vector<long long>
#define pb push_back
#define pop pop_back
#define pi pair<long long ,long long>
#define vp vector<pair<long long,long long> >
#define mkp make_pair
#define in(i,n) for(i=0;i<n;i++)
#define fon(i,n,m) for(i=n;i<m;i++)
#define rfon(i,n,m) for(i=n;i>=m;i--)
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define jaldi ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define map map<long long,long long>
#define inm1(b)  memset(b,-1,sizeof(b))
#define in0(b) memset(b,0,sizeof(b))
#define ininf(b) memset(b,1000000001,sizeof(b))
#define MOD         1000000007
#define I 1000000000000000001
#define t(a) cout<<a<<" "<<endl
#define tt(a,b) cout<<a<<" "<<b<<endl
#define th(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl
#define TakeInput freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
using namespace std;
ll gcd(ll a, ll b) {  if (a == 0)  return b; return gcd(b % a, a); }

int main(){
    jaldi
    #ifndef ONLINE_JUDGE
    TakeInput
    #endif

    ll i,j,k,n,m,t,q;

    cin>>t;

    while(t--){
        cin>>n>>k;
        ll a[n];
        in(i,n){
            cin>>a[i];
        }
        ll b[n];
        in0(b);
        ll f=1;
        fon(i,1,n-1){
            if(f==0 && a[i]>a[i-1]){
                f=1;
            }
            if(f && a[i]>a[i+1]){
                f=0;
                b[i]=1;
            }
        }
        ll count=0;
        fon(i,0,k-1){
            // cout<<b[i]<<" ";
            if(b[i]==1)count++;
        }
        // t(count);
        j=k-1;
        ll ma=0;
        ll x,y;
        fon(i,0,n-k+1){
            if(ma<count){
                // tt(i,j);
                ma=count;
                x=count+1;
                y=i+1;
                // v.pb(mkp(x,y))
            }
            // cout<<count<<" ";
            if(b[i]==1)count--;
            if(b[j]==1)count++;
            j++;
        }
        // cout<<endl;
        tt(x,y);
    }

}


//@author :  |< U $ |-|
#include<cmath>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<deque>
#include<queue>
#include<algorithm>
#include<list>
#include<cstring>
#include<unordered_map>
#define ll long long
#define vi vector<long long>
#define pb push_back
#define pop pop_back
#define pi pair<long long ,long long>
#define vp vector<pair<long long,long long> >
#define mkp make_pair
#define in(i,n) for(i=0;i<n;i++)
#define fon(i,n,m) for(i=n;i<m;i++)
#define rfon(i,n,m) for(i=n;i>=m;i--)
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define jaldi ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define map map<long long,long long>
#define inm1(b)  memset(b,-1,sizeof(b))
#define in0(b) memset(b,0,sizeof(b))
#define ininf(b) memset(b,1000000001,sizeof(b))
#define MOD         1000000007
#define I 1000000000000000001
#define t(a) cout<<a<<" "<<endl
#define tt(a,b) cout<<a<<" "<<b<<endl
#define th(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl
#define TakeInput freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
using namespace std;
ll gcd(ll a, ll b) {  if (a == 0)  return b; return gcd(b % a, a); }

int main(){
    jaldi
    #ifndef ONLINE_JUDGE
    TakeInput
    #endif

    ll i,j,k,n,m,t,q;

    cin>>t;

    while(t--){
        cin>>n>>k;
        ll a[n];
        in(i,n){
            cin>>a[i];
        }
        ll b[n];
        in0(b);
        ll f=1;
        fon(i,1,n-1){
            if(f==0 && a[i]>a[i-1]){
                f=1;
            }
            if(f && a[i]>a[i+1]){
                f=0;
                b[i]=1;
            }
        }
        ll count=0;
        fon(i,0,k-1){
            // cout<<b[i]<<" ";
            if(b[i]==1)count++;
        }
        // t(count);
        j=k-1;
        ll ma=1;
        ll x=1,y=1;
        fon(i,0,n-k+1){
            if(ma<count){
                // tt(i,j);
                ma=count;
                x=count+1;
                y=i+1;
                // v.pb(mkp(x,y))
            }
            // cout<<count<<" ";
            if(b[i+1]==1)count--;
            if(b[j]==1)count++;
            j++;
        }
        // cout<<endl;
        tt(x,y);
    }

}


//@author :  |< U $ |-|
#include<cmath>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<deque>
#include<queue>
#include<algorithm>
#include<list>
#include<cstring>
#include<unordered_map>
#define ll long long
#define vi vector<long long>
#define pb push_back
#define pop pop_back
#define pi pair<long long ,long long>
#define vp vector<pair<long long,long long> >
#define mkp make_pair
#define in(i,n) for(i=0;i<n;i++)
#define fon(i,n,m) for(i=n;i<m;i++)
#define rfon(i,n,m) for(i=n;i>=m;i--)
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define jaldi ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define map map<long long,long long>
#define inm1(b)  memset(b,-1,sizeof(b))
#define in0(b) memset(b,0,sizeof(b))
#define ininf(b) memset(b,1000000001,sizeof(b))
#define MOD         1000000007
#define I 1000000000000000001
#define t(a) cout<<a<<" "<<endl
#define tt(a,b) cout<<a<<" "<<b<<endl
#define th(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl
#define TakeInput freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
using namespace std;
ll gcd(ll a, ll b) {  if (a == 0)  return b; return gcd(b % a, a); }

int main(){
    jaldi
    #ifndef ONLINE_JUDGE
    TakeInput
    #endif

    ll i,j,k,n,m,t,q;

    cin>>t;

    while(t--){
        cin>>n>>k;
        ll a[n];
        in(i,n){
            cin>>a[i];
        }
        ll b[n];
        in0(b);
        ll f=1;
        fon(i,1,n-1){
            if(a[i-1]<a[i] && a[i]>a[i+1]){
                b[i]=1;
            }
        }
        // cout<<endl;
        fon(i,1,n){
            b[i]=b[i-1]+b[i];
            // cout<<b[i]<<" ";
        }
        // cout<<endl;
        ll ma=0;
        ll x=0,y=0;
        fon(i,0,n-k+1){
            ll c = b[i+k-1]-b[i];
            // t(c);
            if(b[i+k-2]!=b[i+k-1]){
                c--;
            }
            // t(c);
            if(ma<c){
                ma=c;
                // t(i);
                x=c+1;
                y=i+1;
            }
        }

        tt(x,y);

    }

}


//@author :  |< U $ |-|
#include<cmath>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<deque>
#include<queue>
#include<algorithm>
#include<list>
#include<cstring>
#include<unordered_map>
#define ll long long
#define vi vector<long long>
#define pb push_back
#define pop pop_back
#define pi pair<long long ,long long>
#define vp vector<pair<long long,long long> >
#define mkp make_pair
#define in(i,n) for(i=0;i<n;i++)
#define fon(i,n,m) for(i=n;i<m;i++)
#define rfon(i,n,m) for(i=n;i>=m;i--)
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define jaldi ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define map map<long long,long long>
#define inm1(b)  memset(b,-1,sizeof(b))
#define in0(b) memset(b,0,sizeof(b))
#define ininf(b) memset(b,1000000001,sizeof(b))
#define MOD         1000000007
#define I 1000000000000000001
#define t(a) cout<<a<<" "<<endl
#define tt(a,b) cout<<a<<" "<<b<<endl
#define th(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl
#define TakeInput freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
using namespace std;
ll gcd(ll a, ll b) {  if (a == 0)  return b; return gcd(b % a, a); }

int main(){
    jaldi
    #ifndef ONLINE_JUDGE
    TakeInput
    #endif

    ll i,j,k,n,m,t,q;

    cin>>t;

    while(t--){
        cin>>n>>k;
        ll a[n];
        in(i,n){
            cin>>a[i];
        }
        ll b[n];
        in0(b);
        ll f=1;
        fon(i,1,n-1){
            if(f==0 && a[i]>a[i-1]){
                f=1;
            }
            if(f && a[i]>a[i+1]){
                f=0;
                b[i]=1;
            }
            // cout<<b[i]<<" ";
        }
        // cout<<endl;
        fon(i,1,n){
            b[i]=b[i-1]+b[i];
            // cout<<b[i]<<" ";
        }
        // cout<<endl;
        ll ma=0;
        ll x=0,y=0;
        fon(i,0,n-k+1){
            ll c = b[i+k-1]-b[i];
            // t(c);
            if(b[i+k-2]!=b[i+k-1]){
                c--;
            }
            // t(c);
            if(ma<c){
                ma=c;
                // t(i);
                x=c+1;
                y=i+1;
            }
        }
        if(x==0)cout<<0<<endl;
        else
        tt(x,y);

    }

}


//@author :  |< U $ |-|
#include<cmath>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<deque>
#include<queue>
#include<algorithm>
#include<list>
#include<cstring>
#include<unordered_map>
#define ll long long
#define vi vector<long long>
#define pb push_back
#define pop pop_back
#define pi pair<long long ,long long>
#define vp vector<pair<long long,long long> >
#define mkp make_pair
#define in(i,n) for(i=0;i<n;i++)
#define fon(i,n,m) for(i=n;i<m;i++)
#define rfon(i,n,m) for(i=n;i>=m;i--)
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define jaldi ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define map map<long long,long long>
#define inm1(b)  memset(b,-1,sizeof(b))
#define in0(b) memset(b,0,sizeof(b))
#define ininf(b) memset(b,1000000001,sizeof(b))
#define MOD         1000000007
#define I 1000000000000000001
#define t(a) cout<<a<<" "<<endl
#define tt(a,b) cout<<a<<" "<<b<<endl
#define th(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl
#define TakeInput freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
using namespace std;
ll gcd(ll a, ll b) {  if (a == 0)  return b; return gcd(b % a, a); }

int main(){
    jaldi
    #ifndef ONLINE_JUDGE
    TakeInput
    #endif

    ll i,j,k,n,m,t,q;

    cin>>t;

    while(t--){
        cin>>n>>k;
        ll a[n];
        in(i,n){
            cin>>a[i];
        }
        ll b[n];
        in0(b);
        ll f=1;
        fon(i,1,n-1){
            if(f==0 && a[i]>a[i-1]){
                f=1;
            }
            if(f && a[i]>a[i+1]){
                f=0;
                b[i]=1;
            }
        }
        ll count=0;
        fon(i,0,k-1){
            // cout<<b[i]<<" ";
            if(b[i]==1)count++;
        }
        // t(count);
        j=k-1;
        ll ma=0;
        ll x,y;
        fon(i,0,n-k+1){
            if(ma<count){
                // tt(i,j);
                ma=count;
                x=count+1;
                y=i+1;
                // v.pb(mkp(x,y))
            }
            // cout<<count<<" ";
            if(b[i+1]==1)count--;
            if(b[j]==1)count++;
            j++;
        }
        // cout<<endl;
        tt(x,y);
    }

}


//@author :  |< U $ |-|
#include<cmath>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<deque>
#include<queue>
#include<algorithm>
#include<list>
#include<cstring>
#include<unordered_map>
#define ll long long
#define vi vector<long long>
#define pb push_back
#define pop pop_back
#define pi pair<long long ,long long>
#define vp vector<pair<long long,long long> >
#define mkp make_pair
#define in(i,n) for(i=0;i<n;i++)
#define fon(i,n,m) for(i=n;i<m;i++)
#define rfon(i,n,m) for(i=n;i>=m;i--)
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define jaldi ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define map map<long long,long long>
#define inm1(b)  memset(b,-1,sizeof(b))
#define in0(b) memset(b,0,sizeof(b))
#define ininf(b) memset(b,1000000001,sizeof(b))
#define MOD         1000000007
#define I 1000000000000000001
#define t(a) cout<<a<<" "<<endl
#define tt(a,b) cout<<a<<" "<<b<<endl
#define th(a,b,c) cout<<a<<" "<<b<<" "<<c<<endl
#define TakeInput freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
using namespace std;
ll gcd(ll a, ll b) {  if (a == 0)  return b; return gcd(b % a, a); }

int main(){
    jaldi
    #ifndef ONLINE_JUDGE
    TakeInput
    #endif

    ll i,j,k,n,m,t,q;

    cin>>t;

    while(t--){
        cin>>n>>k;
        ll a[n];
        in(i,n){
            cin>>a[i];
        }
        ll b[n];
        in0(b);
        ll f=1;
        fon(i,1,n-1){
            if(a[i-1]<a[i] && a[i]>a[i+1]){
                b[i]=1;
            }
        }
        // cout<<endl;
        fon(i,1,n){
            b[i]=b[i-1]+b[i];
            // cout<<b[i]<<" ";
        }
        // cout<<endl;
        ll ma=0;
        ll x=1,y=1;
        fon(i,0,n-k+1){
            ll c = b[i+k-1]-b[i];
            // t(c);
            if(b[i+k-2]!=b[i+k-1]){
                c--;
            }
            // t(c);
            if(ma<c){
                ma=c;
                // t(i);
                x=c+1;
                y=i+1;
            }
        }

        tt(x,y);

    }

}


#pragma GCC optimize(2)
#include<bits/stdc++.h>

using namespace std;
const int N = 2e5 + 10;
int n, k, t, a[N];
int sum[N];
bool st[N];

int main(){
    scanf("%d", &t);

    while (t -- ){
        memset(st, 0, sizeof st);
        memset(sum, 0, sizeof sum);

        scanf("%d%d", &n, &k);

        for (int i = 1; i <= n; i ++ ) {
            scanf("%d", &a[i]);
        }

        for (int i = 1; i <= n; i ++ ){
            if (a[i] > a[i - 1] && a[i] > a[i + 1]){
                st[i] = 1;
            }
        }

        for (int i = 1; i <= n; i ++ ) sum[i] = sum[i - 1] + st[i];

        int ans = 0, cnt = 0, l = 1;
        for (int i = 1; i <= n - k + 1 ; i ++ ){
            int j = i + k - 1;
            cnt = sum[j] - sum[i - 1];
            if (st[i]) cnt--;
            if (st[j]) cnt --;
            if (cnt > ans) {
                ans = cnt;
                l = i;
            }
        }

        printf("%d %d\n", ans + 1, l);
    }
}


#include<bits/stdc++.h>

using namespace std;
const int N = 2e5 + 10;
int n, k, t, a[N];
bool st[N];

int main(){
    scanf("%d", &t);
    vector<int> v;
    while (t -- ){
        scanf("%d%d", &n, &k);
        for (int i = 1; i <= n; i ++ ) {
            scanf("%d", &a[i]);
            st[i] = false;
        }
        v.clear();
        for (int i = 2; i < n; i ++ ){
            if (a[i] > a[i - 1] && a[i] > a[i + 1]){
                v.push_back(i);
                st[i] = true;
            }
        }

        int ans = 0, cnt = 0, l = 0;
        for (int i = 0, j = 1; i < v.size(); i ++ ){
            int a = v[i] + 1;
            cnt ++;

            while (a - j + 1 > k) {
                if (st[j]) cnt --;
                j ++;
            }
            if (st[j]) cnt --;

            if (cnt > ans) {
                ans = cnt;
                l = j;
            }
        }

        printf("%d %d\n", ans + 1, l);
    }
}


#include<bits/stdc++.h>

using namespace std;
const int N = 2e5 + 10;
int n, k, t, a[N];
bool st[N];

int main(){
    scanf("%d", &t);
    vector<int> v;
    while (t -- ){
        scanf("%d%d", &n, &k);
        for (int i = 1; i <= n; i ++ ) {
            scanf("%d", &a[i]);
            st[i] = false;
        }
        v.clear();
        for (int i = 2; i < n; i ++ ){
            if (a[i] > a[i - 1] && a[i] > a[i + 1]){
                v.push_back(i);
                st[i] = true;
            }
        }

        int ans = 0, cnt = 0, l = 0;
        for (int i = 0, j = 1; i < v.size(); i ++ ){
            int a = v[i] + 1;
            cnt ++;
            if (st[j]) cnt --;
            while (a - j + 1 > k) {
                if (st[j]) cnt --;
                j ++;
            }
            if (st[j]) cnt --;

            if (cnt > ans && a - j + 1 == k) {
                ans = cnt;
                l = j;
            }
        }

        printf("%d %d\n", ans + 1, l);
    }
}


#include<bits/stdc++.h>

using namespace std;
const int N = 2e5 + 10;
typedef long long LL;
LL n, k, t, a[N];
bool st[N];

int main(){
    scanf("%d", &t);

    while (t -- ){
        memset(st, false, sizeof st);
        scanf("%lld%lld", &n, &k);
        for (LL i = 1; i <= n; i ++ ) {
            scanf("%d", &a[i]);
        }
        vector<LL> v;
        for (LL i = 2; i < n; i ++ ){
            if (a[i] > a[i - 1] && a[i] > a[i + 1]){
                v.push_back(i);
                st[i] = true;
            }
        }

        LL ans = 0, cnt = 0, l = 0;
        for (LL i = 0, j = 1; i < v.size(); i ++ ){
            LL a = v[i] + 1;
            cnt ++;

            while (a - j + 1 > k) {
                if (st[j]) cnt --;
                j ++;
            }
            if (st[j]) cnt --;

            if (cnt > ans) {
                ans = cnt;
                l = j;
            }
        }

        printf("%lld %lld\n", ans + 1, l);
    }
}


#include<bits/stdc++.h>

using namespace std;
const int N = 2e5 + 10;
typedef long long LL;
LL n, k, t, a[N];
LL sum[N];
bool st[N];

int main(){
    scanf("%d", &t);

    while (t -- ){
        memset(st, 0, sizeof st);
        scanf("%lld%lld", &n, &k);
        for (LL i = 1; i <= n; i ++ ) {
            scanf("%d", &a[i]);
            sum[i] = 0;
        }

        for (LL i = 2; i < n; i ++ ){
            if (a[i] > a[i - 1] && a[i] > a[i + 1]){
                st[i] = 1;
            }
        }

        for (int i = 1; i <= n; i ++ ) sum[i] = sum[i - 1] + st[i];

        LL ans = 0, cnt = 0, l = 0;
        for (LL i = 1; i <= n - k + 1 ; i ++ ){
            LL j = i + k - 1;
            cnt = sum[j] - sum[i - 1];
            if (st[i]) cnt--;
            if (st[j]) cnt --;
            if (cnt > ans) {
                ans = cnt;
                l = i;
            }
        }

        printf("%lld %lld\n", ans + 1, l);
    }
}


#include<bits/stdc++.h>

using namespace std;
const int N = 2e5 + 10;
typedef long long LL;
LL n, k, t, a[N];
LL sum[N];
bool st[N];

int main(){
    scanf("%lld", &t);

    while (t -- ){
        memset(st, 0, sizeof st);
        scanf("%lld%lld", &n, &k);
        for (LL i = 1; i <= n; i ++ ) {
            scanf("%lld", &a[i]);
            sum[i] = 0;
        }

        for (LL i = 1; i <= n; i ++ ){
            if (a[i] > a[i - 1] && a[i] > a[i + 1]){
                st[i] = 1;
            }
        }

        for (LL i = 1; i <= n; i ++ ) sum[i] = sum[i - 1] + st[i];

        LL ans = 0, cnt = 0, l = 0;
        for (LL i = 1; i <= n - k + 1 ; i ++ ){
            LL j = i + k - 1;
            cnt = sum[j] - sum[i - 1];
            if (st[i]) cnt--;
            if (st[j]) cnt --;
            if (cnt > ans) {
                ans = cnt;
                l = i;
            }
        }

        printf("%lld %lld\n", ans + 1, l);
    }
}


#include<bits/stdc++.h>

using namespace std;
const int N = 2e5 + 10;
typedef long long LL;
LL n, k, t, a[N];
LL sum[N];
bool st[N];

int main(){
    scanf("%d", &t);

    while (t -- ){
        memset(st, 0, sizeof st);
        scanf("%lld%lld", &n, &k);
        for (LL i = 1; i <= n; i ++ ) {
            scanf("%d", &a[i]);
            sum[i] = 0;
        }

        for (LL i = 2; i < n; i ++ ){
            if (a[i] > a[i - 1] && a[i] > a[i + 1]){
                st[i] = 1;
            }
        }

        for (int i = 1; i <= n; i ++ ) sum[i] = sum[i - 1] + st[i];

        LL ans = 0, cnt = 0, l = 0;
        for (LL i = 1, j = 1; i <= n ; i ++ ){
            while (i - j + 1 > k) j ++;
            cnt = sum[i] - sum[j - 1];
            if (st[i]) cnt--;
            if (st[j]) cnt --;
            if (cnt > ans) {
                ans = cnt;
                l = j;
            }
        }

        printf("%lld %lld\n", ans + 1, l);
    }
}


#include<bits/stdc++.h>

using namespace std;
const int N = 2e5 + 10;
int n, k, t, a[N];
int sum[N];
bool st[N];

int main(){
    scanf("%d", &t);

    while (t -- ){
        memset(st, 0, sizeof st);
        memset(sum, 0, sizeof sum);
        scanf("%d%d", &n, &k);
        for (int i = 1; i <= n; i ++ ) {
            scanf("%d", &a[i]);
        }

        for (int i = 1; i <= n; i ++ ){
            if (a[i] > a[i - 1] && a[i] > a[i + 1]){
                st[i] = 1;
            }
        }

        for (int i = 1; i <= n; i ++ ) sum[i] = sum[i - 1] + st[i];

        int ans = 0, cnt = 0, l = 0;
        for (int i = 1; i <= n - k + 1 ; i ++ ){
            int j = i + k - 1;
            cnt = sum[j] - sum[i - 1];
            if (st[i]) cnt--;
            if (st[j]) cnt --;
            if (cnt > ans) {
                ans = cnt;
                l = i;
            }
        }

        printf("%d %d\n", ans + 1, l);
    }
}


#include<bits/stdc++.h>

using namespace std;
const int N = 2e5 + 10;
typedef long long LL;
LL n, k, t, a[N];
LL sum[N];
bool st[N];

int main(){
    scanf("%d", &t);

    while (t -- ){
        memset(st, 0, sizeof st);
        scanf("%lld%lld", &n, &k);
        for (LL i = 1; i <= n; i ++ ) {
            scanf("%d", &a[i]);
            sum[i] = 0;
        }

        for (LL i = 1; i <= n; i ++ ){
            if (a[i] > a[i - 1] && a[i] > a[i + 1]){
                st[i] = 1;
            }
        }

        for (int i = 1; i <= n; i ++ ) sum[i] = sum[i - 1] + st[i];

        LL ans = 0, cnt = 0, l = 0;
        for (LL i = 1; i <= n - k + 1 ; i ++ ){
            LL j = i + k - 1;
            cnt = sum[j] - sum[i - 1];
            if (st[i]) cnt--;
            if (st[j]) cnt --;
            if (cnt > ans) {
                ans = cnt;
                l = i;
            }
        }

        printf("%lld %lld\n", ans + 1, l);
    }
}


#pragma GCC optimize(2)
#include<bits/stdc++.h>

using namespace std;
const int N = 2e5 + 10;
int n, k, t, a[N];
bool st[N];

int main(){
    scanf("%d", &t);
    vector<int> v;
    while (t -- ){
        scanf("%d%d", &n, &k);
        for (int i = 1; i <= n; i ++ ) {
            scanf("%d", &a[i]);
            st[i] = false;
        }
        v.clear();
        for (int i = 2; i < n; i ++ ){
            if (a[i] > a[i - 1] && a[i] > a[i + 1]){
                v.push_back(i);
                st[i] = true;
            }
        }

        int ans = 0, cnt = 0, l = 1;
        for (int i = 0, j = 1; i < v.size(); i ++ ){
            int a = v[i] + 1;
            cnt ++;
            while (a - j + 1 > k) {
                if (st[j]) cnt --;
                j ++;
            }
            if (st[j]) cnt --;

            if (cnt > ans) {
                ans = cnt;
                l = j;
            }
        }

        printf("%d %d\n", ans + 1, l);
    }
}


#include <bits/stdc++.h>
#include <string.h>
#include <cstdio>
const int N=(int)1e9;
using namespace std;

int main()
{
    char cmd[10];
    bool flag=0;
    while(cin >> cmd)
    {
        flag=0;
        if(strcmp(cmd,"start"))
        {
            break;
        }
        int x = 2,y = 1,count = 1;
        printf("? %d %d\n",x,y);
        while(cin >> cmd)
        {
            if(cmd[0] =='y')
            {
                break;
            }
            if(count>=30)
            {
                break;
            }
            x = x*2;
            y = y*2;
            count++;
            printf("? %d %d\n", x, y);
        }
        int left = y,right = x;
        printf("? %d %d\n",(right+left)/2,left);
        while(cin >> cmd)
        {
            if(left >= N+1)
            {
                printf("! 1\n");
                flag = 1;
                break;
            }
            if(cmd[0] == 'y')
            {
                right = (right + left)/2;
            }else if(cmd[0] == 'x')
            {
                left = (right + left)/2;
            }else
            {
                return 0;
            }
            if(left >= right-1)
            {
                break;
            }
            printf("? %d %d\n",(right+left)/2,left);
        }
        if(flag)
        {
            continue;
        }
        printf("? %d %d\n",right,left);
        cin >> cmd;
        if(cmd[0] == 'y')
        {
            printf("! %d\n",right);
        }else if(cmd[0] == 'x')
        {
            printf("! %d\n",left);
        }else
        {
            return 0;
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#include <string.h>
#include <cstdio>
const int N=(int)1e9;
using namespace std;

int main()
{
    char cmd[10];
    bool flag=0;
    while(cin >> cmd)
    {
        if(strcmp(cmd,"start"))
        {
            break;
        }
        int x = 2,y = 1,count = 1;
        printf("? %d %d\n",x,y);
        while(cin >> cmd)
        {
            if(cmd[0] =='y')
            {
                break;
            }
            if(count>=30)
            {
                break;
            }
            x = x*2;
            y = y*2;
            count++;
            printf("? %d %d\n", x, y);
        }
        int left = y,right = x;
        printf("? %d %d\n",(right+left)/2,left);
        while(cin >> cmd)
        {
            if(left >= N+1)
            {
                printf("! 1\n");
                flag = 1;
                break;
            }
            if(cmd[0] == 'y')
            {
                right = (right + left)/2;
            }else if(cmd[0] == 'x')
            {
                left = (right + left)/2;
            }
            if(left >= right-1)
            {
                break;
            }
            printf("? %d %d\n",(right+left)/2,left);
        }
        if(flag)
        {
            continue;
        }
        printf("? %d %d\n",right,left);
        cin >> cmd;
        if(cmd[0] == 'y')
        {
            printf("! %d\n",right);
        }else if(cmd[0] == 'x')
        {
            printf("! %d\n",left);
        }
    }
    return 0;
}


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

int main()
{
    char cmd[10];
    while(cin >> cmd)
    {
        if(strcmp(cmd,"start"))
        {
            break;
        }
        int x = 4,y = 2;
        printf("? %d %d\n", x, y);
        while(cin >> cmd)
        {
            if(cmd[0] =='y')
            {
                break;
            }
            printf("? %d %d\n", x, y);
            x = x*2;
            y = y*2;
        }
        int left = y,right = x;
        printf("? %d %d\n",left,(right+left)/2);
        while(cin >> cmd)
        {
            if(cmd[0] == 'y')
            {
                right = (right + left)/2;
            }else if(cmd[0] == 'x')
            {
                left = (right + left)/2;
            }
            if(left >= right-1)
            {
                break;
            }
            printf("? %d %d\n",left,(right+left)/2);
        }
        printf("? %d %d",left,right);
        cin >> cmd;
        if(cmd[0] == 'x')
        {
            printf("! %d\n",left);
        }else if(cmd[0] == 'y')
        {
            printf("! %d\n",right);
        }
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define pb push_back
using namespace std;
string x;
char c;
ll l,r,mid,ans;
int main(){

	while(cin >> x){
		if(x == "end")return 0;
		ll pw = 1;
		for(int i=1; i<=30; i++){
			cout << "? " << pw << " " << 2 * pw << endl;
			cin >> c;
			if(c == 'x'){
				l = pw;
				r = 2 * pw;
				break;
			}
			pw *= 2;
		}
		while(r >= l){
			mid = (l + r) / 2;
			cout << mid << " " << 2 * mid << endl;
			cin >> c;
			if(c == 'x'){
				l = mid + 1;
			}
			else {
				r = mid - 1;
				ans = mid;
			}
		}
		cout << "! " << ans << endl;;
	}

	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define pb push_back
using namespace std;
string x;
char c;
ll l,r,mid,ans;
int main(){

	while(cin >> x){
		if(x == "end")return 0;
		ll pw = 1;
		for(int i=1; i<=30; i++){
			cout << "? " << pw << " " << 2 * pw << endl;
			cin >> c;
			if(c == 'x'){
				l = pw;
				r = 2 * pw;
				break;
			}
			pw *= 2;
		}
		r = min(r,1000000000LL);
		while(r >= l){
			mid = (l + r) / 2;
			cout <<"? "<<2 * mid << " " << mid << endl;
			cin >> c;
			if(c == 'y'){
				l = mid + 1;
			}
			else {
				r = mid - 1;
				ans = mid;
			}
		}
		cout << "! " << ans<< endl;
	}

	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define pb push_back
using namespace std;
string x;
char c;
ll l,r,mid,ans;
int main(){

	while(cin >> x){
		if(x == "end")return 0;
		ll pw = 1;
		for(int i=1; i<=30; i++){
			cout << "? " << pw << " " << 2 * pw << endl;
			cin >> c;
			if(c == 'x'){
				l = pw;
				r = 2 * pw;
				break;
			}
			pw *= 2;
		}
		while(r >= l){
			mid = (l + r) / 2;
			cout <<"? "<<2 * mid << " " << mid << endl;
			cin >> c;
			if(c == 'y'){
				l = mid + 1;
			}
			else {
				r = mid - 1;
				ans = mid;
			}
		}
		cout << "! " << ans<< endl;;
	}

	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define pb push_back
using namespace std;
string x;
char c;
ll l,r,mid,ans;
int main(){

	while(cin >> x){
		if(x == "end")return 0;
		ll pw = 1;
		for(int i=1; i<=30; i++){
			cout << "? " << pw << " " << 2 * pw << endl;
			cin >> c;
			if(c == 'x'){
				l = pw;
				r = 2 * pw;
				break;
			}
			pw *= 2;
		}
		while(r >= l){
			mid = (l + r) / 2;
			cout << mid << " " << 2 * mid << endl;
			cin >> c;
			if(c == 'x'){
				l = mid + 1;
				ans = mid;
			}
			else {
				r = mid - 1;
			}
		}
		cout << "! " << ans << endl;;
	}

	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define f first
#define s second
#define pb push_back
using namespace std;
string x;
char c;
ll l,r,mid,ans;
int main(){

	while(cin >> x){
		if(x == "end")return 0;
		ll pw = 1;
		for(int i=1; i<=30; i++){
			cout << "? " << pw << " " << 2 * pw << endl;
			cin >> c;
			if(c == 'x'){
				l = pw;
				r = 2 * pw;
				break;
			}
			pw *= 2;
		}
		while(r >= l){
			mid = (l + r) / 2;
			cout <<"? "<<2 * mid << " " << mid << endl;
			cin >> c;
			if(c == 'y'){
				l = mid + 1;
				ans = mid;
			}
			else {
				r = mid - 1;
			}
		}
		cout << "! " << ans + 1<< endl;;
	}

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define int long long
#define F(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define R(i,b,a) for(int i=(int)(b);i>=(int)(a);i--)
#define endl "\n"
#define ios ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define out(x) cout<<setprecision(15)<<x<<endl,exit(0)
#define pii pair<int,int>
#define pb push_back
#define all(v) v.begin(),v.end()
#define I first
#define S second
#define ld long double
ld pi=3.14159265359;

bool qry(int x){
	cout<<'?'<<" "<<x<<" "<<2*x<<endl;
	int res;
	cin>>res;
	return (res==x);
}

int32_t main(){
	while(1){
		string s;
		cin>>s;
		if(s=="end") exit(0);

		int cur=1,ans=1;
		F(i,1,30){
			if(qry(cur)){
				int l=cur+1,r=2*cur,mid;
				while(l<=r){
					mid=l+r>>1;
					//cout<<l<<" "<<r<<endl;
					cout<<"? "<<cur<<" "<<mid<<endl;
					int res;
					cin>>res;
					if(res==cur) r=mid-1;
					else l=mid+1;
				}
				ans=r+1;
				break;
			}
			cur*=2;
		}
		cout<<"! "<<ans<<endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define int long long
#define F(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define R(i,b,a) for(int i=(int)(b);i>=(int)(a);i--)
#define endl "\n"
#define ios ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define out(x) cout<<setprecision(15)<<x<<endl,exit(0)
#define pii pair<int,int>
#define pb push_back
#define all(v) v.begin(),v.end()
#define I first
#define S second
#define ld long double
ld pi=3.14159265359;

bool qry(int x,int y){
	cout<<'?'<<" "<<x<<" "<<y<<endl;
	char res;
	cin>>res;
	return (res=='x');
}

int32_t main(){
	while(1){
		string s;
		cin>>s;
		if(s=="end"){
			cout<<endl;
			exit(0);
		}

		int cur=1,ans=1;
		F(i,1,31){
			if(qry(cur/2,cur)){
				int l=cur/2+1,r=cur,mid;
				while(l<=r){
					mid=l+r>>1;
					if(qry(cur/2,mid)) r=mid-1;
					else l=mid+1;
				}
				ans=r+1;
				break;
			}
			cur*=2;
		}
		cout<<"! "<<ans<<endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define int long long
#define F(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define R(i,b,a) for(int i=(int)(b);i>=(int)(a);i--)
#define endl "\n"
#define ios ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define out(x) cout<<setprecision(15)<<x<<endl,exit(0)
#define pii pair<int,int>
#define pb push_back
#define all(v) v.begin(),v.end()
#define I first
#define S second
#define ld long double
ld pi=3.14159265359;

bool qry(int x,int y){
	cout<<'?'<<" "<<x<<" "<<y<<endl;
	char res;
	cin>>res;
	return (res=='x');
}

int32_t main(){
	while(1){
		string s;
		cin>>s;
		if(s=="end"){
			cout<<endl;
			exit(0);
		}

		int cur=1,ans=1;
		F(i,1,30){
			if(qry(cur/2,cur)){
				int l=cur/2+1,r=cur,mid;
				while(l<=r){
					mid=l+r>>1;
					if(qry(cur/2,mid)) r=mid-1;
					else l=mid+1;
				}
				ans=r+1;
				break;
			}
			cur*=2;
		}
		cout<<"! "<<ans<<endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define int long long
#define F(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define R(i,b,a) for(int i=(int)(b);i>=(int)(a);i--)
#define endl "\n"
#define ios ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define out(x) cout<<setprecision(15)<<x<<endl,exit(0)
#define pii pair<int,int>
#define pb push_back
#define all(v) v.begin(),v.end()
#define I first
#define S second
#define ld long double
ld pi=3.14159265359;

bool qry(int x,int y){
	cout<<'?'<<" "<<x<<" "<<y<<endl;
	char res;
	cin>>res;
	return (res=='x');
}

int32_t main(){
	while(1){
		string s;
		cin>>s;
		if(s=="end") exit(0);

		int cur=1,ans=1;
		F(i,1,30){
			if(qry(cur/2,cur)){
				int l=cur/2+1,r=cur,mid;
				while(l<=r){
					mid=l+r>>1;
					if(qry(cur/2,mid)) r=mid-1;
					else l=mid+1;
				}
				ans=r+1;
				break;
			}
			cur*=2;
		}
		cout<<"! "<<ans<<endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define int long long
#define F(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define R(i,b,a) for(int i=(int)(b);i>=(int)(a);i--)
#define endl "\n"
#define ios ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define out(x) cout<<setprecision(15)<<x<<endl,exit(0)
#define pii pair<int,int>
#define pb push_back
#define all(v) v.begin(),v.end()
#define I first
#define S second
#define ld long double
ld pi=3.14159265359;

bool qry(int x){
	cout<<'?'<<" "<<x<<" "<<2*x<<endl;
	char res;
	cin>>res;
	return (res=='x');
}

int32_t main(){
	while(1){
		string s;
		cin>>s;
		if(s=="end") exit(0);

		int cur=1,ans=1;
		F(i,1,30){
			if(qry(cur)){
				int l=cur+1,r=2*cur,mid;
				while(l<=r){
					mid=l+r>>1;
					cout<<"? "<<cur<<" "<<mid<<endl;
					char res;
					cin>>res;
					if(res=='x') r=mid-1;
					else l=mid+1;
				}
				ans=r+1;
				break;
			}
			cur*=2;
		}
		cout<<"! "<<ans<<endl;
	}
}


#include <bits/stdc++.h>
using namespace std;
#define int long long
#define F(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define R(i,b,a) for(int i=(int)(b);i>=(int)(a);i--)
#define endl "\n"
#define ios ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define out(x) cout<<setprecision(15)<<x<<endl,exit(0)
#define pii pair<int,int>
#define pb push_back
#define all(v) v.begin(),v.end()
#define I first
#define S second
#define ld long double
ld pi=3.14159265359;

bool qry(int x){
	cout<<'?'<<" "<<x<<" "<<2*x<<endl;
	char res;
	cin>>res;
	return (res=='x');
}

int32_t main(){
	while(1){
		string s;
		cin>>s;
		if(s=="end") exit(0);

		int cur=1,ans=1;
		F(i,1,30){
			if(qry(cur)){
				int l=cur+1,r=2*cur,mid;
				while(l<=r){
					mid=l+r>>1;
					cout<<"? "<<cur<<" "<<mid<<endl;
					char res;
					cin>>res;
					if(res=='x') l=mid-1;
					else r=mid+1;
				}
				ans=l+1;
				break;
			}
			cur*=2;
		}
		cout<<"! "<<ans<<endl;
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <memory.h>
#include <cstring>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <iterator>
#pragma comment(linker, "/STACK:667177216")
#define ll long long
#define ull unsigned long long
#define INF 1000000007;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define mp make_pair
#define vI vector<int>
#define vvI vector<vector<int>>
#define vLL vector<LL>
#define vS vector<string>
#define fori(i, n) for (int(i) = 0; (i) < n; (i)++)
#define forn(it, from, to) for (int(it) = from; (it) < to; (it)++)
#define forI(tmp) for (auto(it) = (tmp).begin(); (it) != (tmp).end(); (it)++)
#define PI 3.14159265356
#define LD long double
#define sc(a) scanf("%d", &(a))
#define scLL(a) scanf("%I64d", &(a))
#define mems(a, val) memset(a, val, sizeof(a))
#define sz(a) (int)(a).size()
typedef long long LL;
using namespace std;
const LL MOD = 1000000000 + 7;
const LL MAXN = 2 * 100000 + 100;

char ask(int x, int y) {
    cout<<"? "<<x<<" "<<y<<endl<<flush;
    cout.flush();
    string s;
    cin>>s;
    if (s[0] == 'e') while(true){};
    return s[0];
}

void play() {
    string buf;
    cin>>buf;
    if (buf == "end") return;
    if (buf == "mistake") return;

    int right = 1000000000;

    if (ask(0, 1) == 'x') {
        cout<<"! 1"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    if (ask(2, 1) == 'y') {
        cout<<"! 2"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    int tl = 2, tr = 4;

    while(true) {
        if (tl >= 500000000) break;
        char result = ask(tr, tl);
        if (result == 'x') {
            tl = tr;
            tr *= 2;
            continue;
        }else{
            break;
        }
    }

    // a > tl;
    // a <= tr;

    while(tl + 1 != tr && tl != tr) {
        int tm = (tl + tr) >> 1;
        if (ask(tm, tl) == 'x') {
            tl = tm;
        }else{
            tr = tm;
        }
    }

    cout<<"! "<<tr<<endl<<flush;
    cout.flush();

    play();
}

int main()
{
#ifdef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#else
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    play();

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <memory.h>
#include <cstring>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <iterator>
#pragma comment(linker, "/STACK:667177216")
#define ll long long
#define ull unsigned long long
#define INF 1000000007;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define mp make_pair
#define vI vector<int>
#define vvI vector<vector<int>>
#define vLL vector<LL>
#define vS vector<string>
#define fori(i, n) for (int(i) = 0; (i) < n; (i)++)
#define forn(it, from, to) for (int(it) = from; (it) < to; (it)++)
#define forI(tmp) for (auto(it) = (tmp).begin(); (it) != (tmp).end(); (it)++)
#define PI 3.14159265356
#define LD long double
#define sc(a) scanf("%d", &(a))
#define scLL(a) scanf("%I64d", &(a))
#define mems(a, val) memset(a, val, sizeof(a))
#define sz(a) (int)(a).size()
typedef long long LL;
using namespace std;
const LL MOD = 1000000000 + 7;
const LL MAXN = 2 * 100000 + 100;

char ask(int x, int y) {
    cout<<"? "<<x<<" "<<y<<endl<<flush;
    cout.flush();
    string s;
    cin>>s;
    if (s[0] == 'e') while(true){};
    return s[0];
}

void play() {
    string buf;
    cin>>buf;
    if (buf == "end") return;
    if (buf == "mistake") return;

    int right = 1000000000;

    if (ask(0, 1) == 'x') {
        cout<<"! 1"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    if (ask(2, 1) == 'y') {
        cout<<"! 2"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    int tl = 2, tr = 4;

    while(true) {
        if (tl >= 500000000) break;
        char result = ask(tr, tl);
        if (result == 'x') {
            tl = tr;
            tr *= 2;
            continue;
        }else{
            break;
        }
    }

    // a > tl;
    // a <= tr;

    while(tl + 1 != tr && tl != tr) {
        int tm = (tl + tr) >> 1;
        if (ask(tm, tl) == 'x') {
            tl = tm + 1;
        }else{
            tr = tm;
        }
    }

    if (tl == tr) {
        cout<<"! "<<tl<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    if (ask(tl, tr) == 'y') {
        cout<<"! "<<tl<<endl<<flush;
        cout.flush();
    }else{
        cout<<"! "<<tr<<endl<<flush;
        cout.flush();
    };

    play();
}

int main()
{
#ifdef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#else
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    play();

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <memory.h>
#include <cstring>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <iterator>
#pragma comment(linker, "/STACK:667177216")
#define ll long long
#define ull unsigned long long
#define INF 1000000007;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define mp make_pair
#define vI vector<int>
#define vvI vector<vector<int>>
#define vLL vector<LL>
#define vS vector<string>
#define fori(i, n) for (int(i) = 0; (i) < n; (i)++)
#define forn(it, from, to) for (int(it) = from; (it) < to; (it)++)
#define forI(tmp) for (auto(it) = (tmp).begin(); (it) != (tmp).end(); (it)++)
#define PI 3.14159265356
#define LD long double
#define sc(a) scanf("%d", &(a))
#define scLL(a) scanf("%I64d", &(a))
#define mems(a, val) memset(a, val, sizeof(a))
#define sz(a) (int)(a).size()
typedef long long LL;
using namespace std;
const LL MOD = 1000000000 + 7;
const LL MAXN = 2 * 100000 + 100;

char ask(int x, int y) {
    cout<<"? "<<x<<" "<<y<<endl<<flush;
    cout.flush();
    string s;
    cin>>s;
    if (s[0] == 'e') exit(-1);
    return s[0];
}

void play() {
    string buf;
    cin>>buf;
    if (buf == "end") return;
    if (buf == "mistake") return;

    int right = 1000000000;

    if (ask(0, 1) == 'x') {
        cout<<"! 1"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    if (ask(2, 1) == 'y') {
        cout<<"! 2"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    int tl = 2, tr = 4;

    while(true) {
        char result = ask(tr, tl);
        if (result == 'x') {
            tl = tr;
            tr *= 2;
            continue;
        }else{
            break;
        }
    }

    // a > tl;
    // a <= tr;

    while(tl + 1 != tr) {
        int tm = (tl + tr) >> 1;
        if (ask(tm, tl) == 'x') {
            tl = tm + 1;
        }else{
            tr = tm;
        }
    }

    if (ask(tl, tr) == 'y') {
        cout<<"! "<<tl<<endl<<flush;
        cout.flush();
    }else{
        cout<<"! "<<tr<<endl<<flush;
        cout.flush();
    };

    play();
}

int main()
{
#ifdef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#else
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    play();

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <memory.h>
#include <cstring>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <iterator>
#pragma comment(linker, "/STACK:667177216")
#define ll long long
#define ull unsigned long long
#define INF 1000000007;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define mp make_pair
#define vI vector<int>
#define vvI vector<vector<int>>
#define vLL vector<LL>
#define vS vector<string>
#define fori(i, n) for (int(i) = 0; (i) < n; (i)++)
#define forn(it, from, to) for (int(it) = from; (it) < to; (it)++)
#define forI(tmp) for (auto(it) = (tmp).begin(); (it) != (tmp).end(); (it)++)
#define PI 3.14159265356
#define LD long double
#define sc(a) scanf("%d", &(a))
#define scLL(a) scanf("%I64d", &(a))
#define mems(a, val) memset(a, val, sizeof(a))
#define sz(a) (int)(a).size()
typedef long long LL;
using namespace std;
const LL MOD = 1000000000 + 7;
const LL MAXN = 2 * 100000 + 100;

char ask(int x, int y) {
    cout<<"? "<<x<<" "<<y<<endl<<flush;
    cout.flush();
    string s;
    cin>>s;
    return s[0];
}

void play() {
    string buf;
    cin>>buf;
    if (buf == "end") return;

    if (ask(0, 1) == 'x') {
        cout<<"! 1"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    if (ask(2, 1) == 'y') {
        cout<<"! 2"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    int tl = 2, tr = 4;

    while(true) {
        if (tl >= 500000000) break;
        char result = ask(tr, tl);
        if (result == 'x') {
            tl = tr;
            tr *= 2;
            continue;
        }else{
            break;
        }
    }

    // a > tl;
    // a <= tr;

    while(tl + 1 != tr) {
        int tm = (tl + tr) >> 1;
        if (ask(tm, tl) == 'x') {
            tl = tm + 1;
        }else{
            tr = tm;
        }
    }

    if (ask(tl, tr) == 'y') {
        cout<<"! "<<tl<<endl<<flush;
        cout.flush();
    }else{
        cout<<"! "<<tr<<endl<<flush;
        cout.flush();
    };

    play();
}

int main()
{
#ifdef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#else
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    play();

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <memory.h>
#include <cstring>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <iterator>
#pragma comment(linker, "/STACK:667177216")
#define ll long long
#define ull unsigned long long
#define INF 1000000007;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define mp make_pair
#define vI vector<int>
#define vvI vector<vector<int>>
#define vLL vector<LL>
#define vS vector<string>
#define fori(i, n) for (int(i) = 0; (i) < n; (i)++)
#define forn(it, from, to) for (int(it) = from; (it) < to; (it)++)
#define forI(tmp) for (auto(it) = (tmp).begin(); (it) != (tmp).end(); (it)++)
#define PI 3.14159265356
#define LD long double
#define sc(a) scanf("%d", &(a))
#define scLL(a) scanf("%I64d", &(a))
#define mems(a, val) memset(a, val, sizeof(a))
#define sz(a) (int)(a).size()
typedef long long LL;
using namespace std;
const LL MOD = 1000000000 + 7;
const LL MAXN = 2 * 100000 + 100;

char ask(int x, int y) {
    cout<<"? "<<x<<" "<<y<<endl<<flush;
    cout.flush();
    string s;
    cin>>s;
    return s[0];
}

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

    string buf;
    cin>>buf;

    int right = 1000000000;

    if (ask(0, 1) == 'x') {
        cout<<"! 1"<<endl<<flush;
        cout.flush();    cin>>buf;
        return 0;
    }

    if (ask(2, 1) == 'y') {
        cout<<"! 2"<<endl<<flush;
        cout.flush();    cin>>buf;
        return 0;
    }

    int tl = 2, tr = 4;

    while(true) {
        char result = ask(tr, tl);
        if (result == 'x') {
            tl = tr;
            tr *= 2;
            continue;
        }else{
            break;
        }
    }

    // a > tl;
    // a <= tr;

    while(tl + 1 != tr) {
        int tm = (tl + tr) >> 1;
        if (ask(tm, tl) == 'x') {
            tl = tm + 1;
        }else{
            tr = tm;
        }
    }

    if (ask(tl, tr) == 'y') {
        cout<<"! "<<tl<<endl<<flush;
        cout.flush();
    }else{
        cout<<"! "<<tr<<endl<<flush;
        cout.flush();
    };

    cin>>buf;

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <memory.h>
#include <cstring>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <iterator>
#pragma comment(linker, "/STACK:667177216")
#define ll long long
#define ull unsigned long long
#define INF 1000000007;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define mp make_pair
#define vI vector<int>
#define vvI vector<vector<int>>
#define vLL vector<LL>
#define vS vector<string>
#define fori(i, n) for (int(i) = 0; (i) < n; (i)++)
#define forn(it, from, to) for (int(it) = from; (it) < to; (it)++)
#define forI(tmp) for (auto(it) = (tmp).begin(); (it) != (tmp).end(); (it)++)
#define PI 3.14159265356
#define LD long double
#define sc(a) scanf("%d", &(a))
#define scLL(a) scanf("%I64d", &(a))
#define mems(a, val) memset(a, val, sizeof(a))
#define sz(a) (int)(a).size()
typedef long long LL;
using namespace std;
const LL MOD = 1000000000 + 7;
const LL MAXN = 2 * 100000 + 100;

char ask(int x, int y) {
    cout<<"? "<<x<<" "<<y<<endl<<flush;
    cout.flush();
    string s;
    cin>>s;
    if (s[0] == 'e') exit(-1);
    return s[0];
}

void play() {
    string buf;
    cin>>buf;
    if (buf == "end") return;
    if (buf == "mistake") return;

    int right = 1000000000;

    if (ask(0, 1) == 'x') {
        cout<<"! 1"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    if (ask(2, 1) == 'y') {
        cout<<"! 2"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    int tl = 2, tr = 4;

    while(true) {
        char result = ask(tr, tl);
        if (result == 'x') {
            tl = tr;
            tr *= 2;
            continue;
        }else{
            break;
        }
    }

    // a > tl;
    // a <= tr;

    while(tl + 1 != tr && tl != tr) {
        int tm = (tl + tr) >> 1;
        if (ask(tm, tl) == 'x') {
            tl = tm + 1;
        }else{
            tr = tm;
        }
    }

    if (tl == tr) {
        cout<<"! "<<tl<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    if (ask(tl, tr) == 'y') {
        cout<<"! "<<tl<<endl<<flush;
        cout.flush();
    }else{
        cout<<"! "<<tr<<endl<<flush;
        cout.flush();
    };

    play();
}

int main()
{
#ifdef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#else
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    play();

    return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <queue>
#include <iomanip>
#include <bitset>
#include <memory.h>
#include <cstring>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <iterator>
#pragma comment(linker, "/STACK:667177216")
#define ll long long
#define ull unsigned long long
#define INF 1000000007;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define mp make_pair
#define vI vector<int>
#define vvI vector<vector<int>>
#define vLL vector<LL>
#define vS vector<string>
#define fori(i, n) for (int(i) = 0; (i) < n; (i)++)
#define forn(it, from, to) for (int(it) = from; (it) < to; (it)++)
#define forI(tmp) for (auto(it) = (tmp).begin(); (it) != (tmp).end(); (it)++)
#define PI 3.14159265356
#define LD long double
#define sc(a) scanf("%d", &(a))
#define scLL(a) scanf("%I64d", &(a))
#define mems(a, val) memset(a, val, sizeof(a))
#define sz(a) (int)(a).size()
typedef long long LL;
using namespace std;
const LL MOD = 1000000000 + 7;
const LL MAXN = 2 * 100000 + 100;

char ask(int x, int y) {
    cout<<"? "<<x<<" "<<y<<endl<<flush;
    cout.flush();
    string s;
    cin>>s;
    return s[0];
}

void play() {
    string buf;
    cin>>buf;
    if (buf == "end") return;

    int right = 1000000000;

    if (ask(0, 1) == 'x') {
        cout<<"! 1"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    if (ask(2, 1) == 'y') {
        cout<<"! 2"<<endl<<flush;
        cout.flush();
        play();
        return;
    }

    int tl = 2, tr = 4;

    while(true) {
        char result = ask(tr, tl);
        if (result == 'x') {
            tl = tr;
            tr *= 2;
            continue;
        }else{
            break;
        }
    }

    // a > tl;
    // a <= tr;

    while(tl + 1 != tr) {
        int tm = (tl + tr) >> 1;
        if (ask(tm, tl) == 'x') {
            tl = tm + 1;
        }else{
            tr = tm;
        }
    }

    if (ask(tl, tr) == 'y') {
        cout<<"! "<<tl<<endl<<flush;
        cout.flush();
    }else{
        cout<<"! "<<tr<<endl<<flush;
        cout.flush();
    };

    play();
}

int main()
{
#ifdef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#else
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    play();

    return 0;
}


#include <iostream>
#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pii std::pair<int,int>
#define psi std::pair<string,int>
#define pli std::pair<ll,int>
#define pll std::pair<ll,ll>
#define pci std::pair<char,int>
#define sll(x) scanf("%I64d",&x)
#define prll(x) printf("%I64d ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define pb push_back
#define vll std::vector<ll>
#define vi std::vector<int>
#define vvi std::vector<std::vector<int>>
#define vli std::vector<std::list<int>>
#define li std::list<int>
#define Endl printf("\n")
#define ma 1000000
#define mod 1000000007

using namespace std;
vector<ll> div(ll a){
    vector<ll> v;
    for(int i=1;i*i<=a;i++){
        if(a%i==0){
            v.push_back(i);v.push_back(a/i);
        }
    }
    sort(v.begin(),v.end());
    cout<<v[1]<<endl;
    return v;
}
int main()
{
   string s;cin>>s;
   while(s=="start"){
    ll d=1,f=1000000000;
    char c;
    ll rech;
    while(d<f-1){
        ll mid=(d+f)/2;
        cout<<"? "<<d<<" "<<f<<endl;
        cin>>c;
        if(c=='x')d=mid;
        if(c=='y') f=mid;
        else break;
    }
    cout<<"? "<<d<<" "<<f<<endl;
    cin>>c;
    if(c=='x') rech=f;
    if(c=='y') rech=d;
    else break;
    vector<ll> di=div(rech);
    int d1=0,f1=di.size()-1;
    while(d1<f1){
        d=d1;f=f1;
        while(d<f-1){
            ll mid=(d+f)/2;
            cout<<"? "<<di[f]<<" "<<di[d]<<endl;
            cin>>c;
            if(c=='x') {f=d;}
            if(c=='y') d=mid;
            else {d1=f1;break;}
        }
        if(d==f-1){
            cout<<"? "<<di[f]<<" "<<di[d]<<endl;
            cin>>c;
            if(c=='x') {f1=d;}
            if(c=='y'){
                d1=f;f1=f;
            }
            else d1=f1;
        }
        else{
            f1=f;
        }

    }

    cout<<"! "<<di[d1]<<endl;
    if(c=='e') break;
    cin>>s;
    }
    return 0;
}


#include <iostream>
#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pii std::pair<int,int>
#define psi std::pair<string,int>
#define pli std::pair<ll,int>
#define pll std::pair<ll,ll>
#define pci std::pair<char,int>
#define sll(x) scanf("%I64d",&x)
#define prll(x) printf("%I64d ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define pb push_back
#define vll std::vector<ll>
#define vi std::vector<int>
#define vvi std::vector<std::vector<int>>
#define vli std::vector<std::list<int>>
#define li std::list<int>
#define Endl printf("\n")
#define ma 1000000
#define mod 1000000007

using namespace std;
vector<ll> div(ll a){
    vector<ll> v;
    for(int i=1;i*i<=a;i++){
        if(a%i==0){
            v.push_back(i);v.push_back(a/i);
        }
    }
    sort(v.begin(),v.end());
    cout<<v[1]<<endl;
    return v;
}
int main()
{
   string s;cin>>s;
   while(s=="start"){
    ll d=1,f=1000000000;
    char c;
    ll rech;
    while(d<f-1){
        ll mid=(d+f)/2;
        cout<<"? "<<d<<" "<<f<<endl;
        cin>>c;
        if(c=='x')d=mid;
        if(c=='y') f=mid;
        if(c=='e') break;

    }
    cout<<"? "<<d<<" "<<f<<endl;
    cin>>c;
    if(c=='x') rech=f;
    if(c=='y') rech=d;
    vector<ll> di=div(rech);
    int d1=0,f1=di.size()-1;
    while(d1<f1){
        d=d1;f=f1;
        while(d<f-1){
            ll mid=(d+f)/2;
            cout<<"? "<<di[f]<<" "<<di[d]<<endl;
            cin>>c;
            if(c=='x') {f=d;}
            if(c=='y') d=mid;
            if(c=='e') break;

        }
        if(c=='e') break;
        if(d==f-1){
            cout<<"? "<<di[f]<<" "<<di[d]<<endl;
            cin>>c;
            if(c=='x') {f1=d;}
            if(c=='y'){
                d1=f;f1=f;
            }

        }
        else{
            f1=f;
        }

    }
    if(c=='e') break;
    cout<<"! "<<di[d1]<<endl;

    cin>>s;
    }
    return 0;
}


#include <iostream>
#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pii std::pair<int,int>
#define psi std::pair<string,int>
#define pli std::pair<ll,int>
#define pll std::pair<ll,ll>
#define pci std::pair<char,int>
#define sll(x) scanf("%I64d",&x)
#define prll(x) printf("%I64d ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define pb push_back
#define vll std::vector<ll>
#define vi std::vector<int>
#define vvi std::vector<std::vector<int>>
#define vli std::vector<std::list<int>>
#define li std::list<int>
#define Endl printf("\n")
#define ma 1000000
#define mod 1000000007

using namespace std;
vector<ll> div(ll a){
    vector<ll> v;
    for(int i=1;i*i<=a;i++){
        if(a%i==0){
            v.push_back(i);v.push_back(a/i);
        }
    }
    sort(v.begin(),v.end());

    return v;
}
int main()
{
   string s;cin>>s;
   while(s=="start"){
    ll d=1,f=1000000000;
    char c;
    ll rech;
    while(d<f-1){

        ll mid=(d+f)/2;
        cout<<"? "<<d<<" "<<f<<endl;
        cin>>c;
        if(c=='x')d=mid;
        else if(c=='y') f=mid;
   }
    cout<<"? "<<d<<" "<<f<<endl;
    cin>>c;
    if(c=='x') rech=f;
    else if(c=='y') rech=d;
    vector<ll> di=div(rech);
    for(int i=0;i<(int)di.size();i++){
        cout<<"? "<<rech<<" "<<di[i]<<endl;
        cin>>c;
        if(c=='x') {cout<<"! "<<di[i]<<endl;break;}
    }
    cin>>s;
    }
    return 0;
}


#include <iostream>
#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pii std::pair<int,int>
#define psi std::pair<string,int>
#define pli std::pair<ll,int>
#define pll std::pair<ll,ll>
#define pci std::pair<char,int>
#define sll(x) scanf("%I64d",&x)
#define prll(x) printf("%I64d ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define pb push_back
#define vll std::vector<ll>
#define vi std::vector<int>
#define vvi std::vector<std::vector<int>>
#define vli std::vector<std::list<int>>
#define li std::list<int>
#define Endl printf("\n")
#define ma 1000000
#define mod 1000000007

using namespace std;
vector<ll> div(ll a){
    vector<ll> v;
    for(int i=1;i*i<=a;i++){
        if(a%i==0){
            v.push_back(i);v.push_back(a/i);
        }
    }
    sort(v.begin(),v.end());

    return v;
}
int main()
{
   string s;cin>>s;
   while(s=="start"){
    ll d=0,f=1000000000;
    char c;
    ll rech;
    while(d<f-1){

        ll mid=(d+f)/2;
        cout<<"? "<<d<<" "<<f<<endl;
        cin>>c;
        if(c=='x')d=mid;
        else if(c=='y') f=mid;
   }
    cout<<"? "<<d<<" "<<f<<endl;
    cin>>c;
    if(c=='x') rech=f;
    else if(c=='y') rech=d;
    vector<ll> di=div(rech);
    for(int i=0;i<(int)di.size();i++){
        cout<<"? "<<rech<<" "<<di[i]<<endl;
        cin>>c;
        if(c=='x') {cout<<"! "<<di[i]<<endl;break;}
    }
    cin>>s;
    }
    return 0;
}


#include <iostream>
#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pii std::pair<int,int>
#define psi std::pair<string,int>
#define pli std::pair<ll,int>
#define pll std::pair<ll,ll>
#define pci std::pair<char,int>
#define sll(x) scanf("%I64d",&x)
#define prll(x) printf("%I64d ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define pb push_back
#define vll std::vector<ll>
#define vi std::vector<int>
#define vvi std::vector<std::vector<int>>
#define vli std::vector<std::list<int>>
#define li std::list<int>
#define Endl printf("\n")
#define ma 1000000
#define mod 1000000007

using namespace std;
vector<ll> div(ll a){
    vector<ll> v;
    for(int i=1;i*i<=a;i++){
        if(a%i==0){
            v.push_back(i);v.push_back(a/i);
        }
    }
    sort(v.begin(),v.end());
    cout<<v[1]<<endl;
    return v;
}
int main()
{
   string s;cin>>s;
   while(s=="start"){
    ll d=1,f=1000000000;
    char c;
    ll rech;
    while(d<f-1){
        ll mid=(d+f)/2;
        cout<<"? "<<d<<" "<<f<<endl;
        cin>>c;
        if(c=='x')d=mid;
        if(c=='y') f=mid;
        if(c=='e') break;

    }
    if(c=='e') break;
    cout<<"? "<<d<<" "<<f<<endl;
    cin>>c;

    if(c=='x') rech=f;
    if(c=='y') rech=d;

    vector<ll> di=div(rech);
    int d1=0,f1=di.size()-1;
    while(d1<f1){
        d=d1;f=f1;
        while(d<f-1){
            ll mid=(d+f)/2;
            cout<<"? "<<di[f]<<" "<<di[d]<<endl;
            cin>>c;
            if(c=='x') {f=d;}
            if(c=='y') d=mid;

        }
        if(d==f-1){
            cout<<"? "<<di[f]<<" "<<di[d]<<endl;
            cin>>c;
            if(c=='x') {f1=d;}
            if(c=='y'){
                d1=f;f1=f;
            }

        }
        else{
            f1=f;
        }

    }

    cout<<"! "<<di[d1]<<endl;

    cin>>s;
    }
    return 0;
}


#include <iostream>
#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pii std::pair<int,int>
#define psi std::pair<string,int>
#define pli std::pair<ll,int>
#define pll std::pair<ll,ll>
#define pci std::pair<char,int>
#define sll(x) scanf("%I64d",&x)
#define prll(x) printf("%I64d ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define pb push_back
#define vll std::vector<ll>
#define vi std::vector<int>
#define vvi std::vector<std::vector<int>>
#define vli std::vector<std::list<int>>
#define li std::list<int>
#define Endl printf("\n")
#define ma 1000000
#define mod 1000000007

using namespace std;
vector<ll> div(ll a){
    vector<ll> v;
    for(int i=1;i*i<=a;i++){
        if(a%i==0){
            v.push_back(i);v.push_back(a/i);
        }
    }
    sort(v.begin(),v.end());
    cout<<v[1]<<endl;
    return v;
}
int main()
{
   string s;cin>>s;
   while(s=="start"){
    ll d=1,f=1000000000;
    char c;
    ll rech;
    while(d<f-1){

        ll mid=(d+f)/2;
        cout<<"? "<<d<<" "<<f<<endl;
        cin>>c;
        if(c=='x')d=mid;
        else if(c=='y') f=mid;
        cout<<"hi"<<endl;break;

    }
    cout<<"? "<<d<<" "<<f<<endl;
    cin>>c;
    if(c=='x') rech=f;
    else if(c=='y') rech=d;
    else {cout<<c<<" "<<4<<endl;break;}
    vector<ll> di=div(rech);
    int d1=0,f1=di.size()-1;
    while(d1<f1){
        d=d1;f=f1;
        while(d<f-1){
            ll mid=(d+f)/2;
            cout<<"? "<<di[f]<<" "<<di[d]<<endl;
            cin>>c;
            if(c=='x') {f=d;}
            else if(c=='y') d=mid;
            else {cout<<c<<3<<endl;break;}

        }
        if(c!='x' && c!='y') break;
        if(d==f-1){
            cout<<"? "<<di[f]<<" "<<di[d]<<endl;
            cin>>c;
            if(c=='x') {f1=d;}
            else if(c=='y'){
                d1=f;f1=f;
            }
            else {cout<<c<<1<<endl;break;}

        }
        else{
            f1=f;
        }

    }
    if(c!='x' && c!='y') {cout<<c<<2<<endl;break;}
    cout<<"! "<<di[d1]<<endl;
    cin>>s;
    }
    return 0;
}