#include <bits/stdc++.h>

using namespace std;

int main(int argc, char const *argv[]) {
    long n, l, x, y, num; cin>>n>>l>>x>>y;
    long arr[n]; unordered_set<long> st;
    for(int i=0; i<n; i++){
        cin>>num; arr[i] = num;
        st.insert(num);
    }

    bool xposs = false, yposs = false;
    for(int i=0; i<n-1 and !xposs; i++){
        if(st.find(arr[i] + x) != st.end())
            xposs = true;
    }
    for(int i=0; i<n-1 and !yposs; i++){
        if(st.find(arr[i] + y) != st.end())
            yposs = true;
    }

    long mn = *min_element(arr, arr+n);
    if(xposs and yposs) cout<<0<<endl;
    else if(xposs) cout<<1<<endl<<mn+y<<endl;
    else if(yposs) cout<<1<<endl<<mn+x<<endl;
    else{
        unordered_set<long> pmx;
        for(int i=0; i<n; i++){
            if(arr[i]+x<=l) pmx.insert(arr[i]+x);
            if(arr[i]-x>=0) pmx.insert(arr[i]-x);
        }
        int oneval = -1;
        for(int i=0; i<n and oneval==-1; i++){
            if((arr[i]+y<=l) and pmx.find(arr[i]+y) != pmx.end())
                oneval = arr[i]+y;
            if((arr[i]-y>=0) and pmx.find(arr[i]-y) != pmx.end())
                oneval = arr[i]-y;
        }

        if(oneval != -1) cout<<1<<endl<<oneval<<endl;
        else cout<<2<<endl<<mn+x<<" "<<mn+y<<endl;
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main(int argc, char const *argv[]) {
    long n, l, x, y, num; cin>>n>>l>>x>>y;
    long arr[n]; unordered_set<long> st;
    for(int i=0; i<n; i++){
        cin>>num; arr[i] = num;
        st.insert(num);
    }

    bool xposs = false, yposs = false;
    for(int i=0; i<n-1 and !xposs; i++){
        if(st.find(arr[i] + x) != st.end())
            xposs = true;
    }
    for(int i=0; i<n-1 and !yposs; i++){
        if(st.find(arr[i] + y) != st.end())
            yposs = true;
    }

    long mn = *min_element(arr, arr+n);
    if(xposs and yposs) cout<<0<<endl;
    else if(xposs) cout<<1<<endl<<mn+y<<endl;
    else{
        unordered_set<long> pmx;
        for(int i=0; i<n; i++){
            if(arr[i]+x<=l) pmx.insert(arr[i]+x);
            if(arr[i]-x>=0) pmx.insert(arr[i]-x);
        }
        int oneval = -1;
        for(int i=0; i<n and oneval==-1; i++){
            if((arr[i]+y<=l) and pmx.find(arr[i]+y) != pmx.end())
                oneval = arr[i]+y;
            if((arr[i]-y>=0) and pmx.find(arr[i]-y) != pmx.end())
                oneval = arr[i]-y;
        }

        if(oneval != -1) cout<<1<<endl<<oneval<<endl;
        else cout<<2<<endl<<mn+x<<" "<<mn+y<<endl;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int a[100005];
set<int> pos;
int main(){
    int n, l, x, y;
    scanf("%d%d%d%d", &n, &l, &x, &y);
    for(int i=1;i<=n;i++) scanf("%d", &a[i]), pos.insert(a[i]);
    int cur = 0;
    for(int i=1;i<=n;i++){
        int l = a[i], r = a[i]-x;
        if(pos.find(r) != pos.end()) cur |= 1;
        l = a[i], r = a[i]+x;
        if(pos.find(r) != pos.end()) cur |= 1;

        l = a[i], r = a[i]-y;
        if(pos.find(r) != pos.end()) cur |= 2;
        l = a[i], r = a[i]+y;
        if(pos.find(r) != pos.end()) cur |= 2;
    }

    if(cur == 3) printf("0\n");
    else if(cur == 1) printf("1\n%d\n", y);
    else if(cur == 2) printf("1\n%d\n", x);
    else{
        int res = -1;
        for(int i=1;i<=n;i++){
            int r = a[i]-x;
            bool ok = 0;
            if(r >= 0 && r <= l){
                if(pos.find(r-y) != pos.end()) ok = 1;
                if(pos.find(r+y) != pos.end()) ok = 1;
            }
            if(ok) res = r;

            r = a[i]+x;
            ok = 0;
            if(r >= 0 && r <= l){
                if(pos.find(r-y) != pos.end()) ok = 1;
                if(pos.find(r+y) != pos.end()) ok = 1;
            }
            if(ok) res = r;

            r = a[i]-y;
            ok = 0;
            if(r >= 0 && r <= l){
                if(pos.find(r-x) != pos.end()) ok = 1;
                if(pos.find(r+x) != pos.end()) ok = 1;
            }
            if(ok) res = r;

            r = a[i]+y;
            ok = 0;
            if(r >= 0 && r <= l){
                if(pos.find(r-x) != pos.end()) ok = 1;
                if(pos.find(r+x) != pos.end()) ok = 1;
            }
            if(ok) res = r;
        }
        if(res != -1){
            printf("1\n%d\n", res);
            return 0;
        }
        printf("2\n%d %d\n", x, y);
    }
}


#include <bits/stdc++.h>
using namespace std;
int a[100005];
set<int> pos;
int main(){
    int n, l, x, y;
    scanf("%d%d%d%d", &n, &l, &x, &y);
    for(int i=1;i<=n;i++) scanf("%d", &a[i]), pos.insert(a[i]);
    int cur = 0;
    for(int i=1;i<=n;i++){
        int l = a[i], r = a[i]-x;
        if(pos.find(r) != pos.end()) cur |= 1;
        l = a[i], r = a[i]+x;
        if(pos.find(r) != pos.end()) cur |= 1;

        l = a[i], r = a[i]-y;
        if(pos.find(r) != pos.end()) cur |= 2;
        l = a[i], r = a[i]+y;
        if(pos.find(r) != pos.end()) cur |= 2;
    }

    if(cur == 3) printf("0\n");
    else if(cur == 1) printf("1\n%d\n", y);
    else if(cur == 2) printf("1\n%d\n", x);
    else{
        int res = -1;
        for(int i=1;i<=n;i++){
            int l = a[i], r = a[i]-x;
            bool ok = 0;
            if(r >= 0 && r <= l){
                if(pos.find(r-y) != pos.end()) ok = 1;
                if(pos.find(r+y) != pos.end()) ok = 1;
            }
            if(ok) res = r;

            l = a[i], r = a[i]+x;
            ok = 0;
            if(r >= 0 && r <= l){
                if(pos.find(r-y) != pos.end()) ok = 1;
                if(pos.find(r+y) != pos.end()) ok = 1;
            }
            if(ok) res = r;

            l = a[i], r = a[i]-y;
            ok = 0;
            if(r >= 0 && r <= l){
                if(pos.find(r-x) != pos.end()) ok = 1;
                if(pos.find(r+x) != pos.end()) ok = 1;
            }
            if(ok) res = r;

            l = a[i], r = a[i]+y;
            ok = 0;
            if(r >= 0 && r <= l){
                if(pos.find(r-x) != pos.end()) ok = 1;
                if(pos.find(r+x) != pos.end()) ok = 1;
            }
            if(ok) res = r;
        }
        if(res != -1){
            printf("1\n%d\n", res);
            return 0;
        }
        printf("2\n%d %d\n", x, y);
    }
}


#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stdio.h>
#include <vector>
#include <queue>
#include <set>
#include <stack>
using namespace std;
#define fru(j,n) for(int j=0;j<(n);j++)
#define tr(it,v) for(typeof(v.begin()) it=v.begin();it!=v.end();it++)
#define x first
#define y second
#define pb push_back
#define mp make_pair
typedef pair<int,int> pii;
typedef long long ll;
typedef double D;
typedef vector<int> vi;
const int inf=1000000009;
const int maxj=1000006;
int n,v[maxj];
pii find_first(int x){
	int li=0;
	fru(ri,n){
		while(li<n && v[li]+x<v[ri]) li++;
		if(v[li]+x==v[ri]) return pii(v[li],v[ri]);
	}
	return pii(-1,-1);
}
pii find_last(int x){
	int ri=n-1;
	for(int li=n-1;li>=0;li--){
		while(ri>=0 && v[li]+x<v[ri]) ri++;
		if(v[li]+x==v[ri]) return pii(v[li],v[ri]);
	}
	return pii(-1,-1);
}

void solve()
{
	int l,x,y;
	scanf("%d%d%d%d",&n,&l,&x,&y);
	fru(i,n) scanf("%d",&v[i]);
	bool ox=find_first(x)!=pii(-1,-1);
	bool oy=find_first(y)!=pii(-1,-1);
	if(ox && oy){
		puts("0");
		puts("");
		return;
	}
	if(ox||oy){
		puts("1");
		if(!ox) cout<<x<<endl;
		if(!oy) cout<<y<<endl;
		return;
	}
	pii ss=find_first(y-x);
	if(ss!=pii(-1,-1) && ss.x+y<=1){
		puts("1");
		cout<<ss.x+y<<endl;
		return;
	}
	ss=find_last(y-x);
	if(ss!=pii(-1,-1) && ss.y-x>=0){
		puts("1");
		cout<<ss.y-x<<endl;
		return;
	}
	puts("2");
	cout<<x<<" "<<y<<endl;
}
int main()
{
	solve();
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stdio.h>
#include <vector>
#include <queue>
#include <set>
#include <stack>
using namespace std;
#define fru(j,n) for(int j=0;j<(n);j++)
#define tr(it,v) for(typeof(v.begin()) it=v.begin();it!=v.end();it++)
#define x first
#define y second
#define pb push_back
#define mp make_pair
typedef pair<int,int> pii;
typedef long long ll;
typedef double D;
typedef vector<int> vi;
const int inf=1000000009;
const int maxj=1000006;
int n,v[maxj];
pii find_first(int x){
	int li=0;
	fru(ri,n){
		while(li<n && v[li]+x<v[ri]) li++;
		if(v[li]+x==v[ri]) return pii(v[li],v[ri]);
	}
	return pii(-1,-1);
}
pii find_last(int x){
	int ri=n-1;
	for(int li=n-1;li>=0;li--){
		while(ri>=0 && v[li]+x<v[ri]) ri++;
		if(v[li]+x==v[ri]) return pii(v[li],v[ri]);
	}
	return pii(-1,-1);
}

void solve()
{
	int l,x,y;
	scanf("%d%d%d%d",&n,&l,&x,&y);
	fru(i,n) scanf("%d",&v[i]);
	bool ox=find_first(x)!=pii(-1,-1);
	bool oy=find_first(y)!=pii(-1,-1);
	if(ox && oy){
		puts("0");
		puts("");
		return;
	}
	if(ox||oy){
		puts("1");
		if(!ox) cout<<x<<endl;
		if(!oy) cout<<y<<endl;
		return;
	}
	pii ss=find_first(x+y);
	if(ss!=pii(-1,-1) && ss.x+y<=1){
		puts("1");
		cout<<ss.x+y<<endl;
		return;
	}
	ss=find_last(y-x);
	if(ss!=pii(-1,-1) && ss.x-x>=0){
		puts("1");
		cout<<ss.x-x<<endl;
		return;
	}
	puts("2");
	cout<<x<<" "<<y<<endl;
}
int main()
{
	solve();
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stdio.h>
#include <vector>
#include <queue>
#include <set>
#include <stack>
using namespace std;
#define fru(j,n) for(int j=0;j<(n);j++)
#define tr(it,v) for(typeof(v.begin()) it=v.begin();it!=v.end();it++)
#define x first
#define y second
#define pb push_back
#define mp make_pair
typedef pair<int,int> pii;
typedef long long ll;
typedef double D;
typedef vector<int> vi;
const int inf=1000000009;
const int maxj=1000006;
int n,v[maxj];
pii find_first(int x){
	int li=0;
	fru(ri,n){
		while(li<n && v[li]+x<v[ri]) li++;
		if(v[li]+x==v[ri]) return pii(v[li],v[ri]);
	}
	return pii(-1,-1);
}
pii find_last(int x){
	int ri=n-1;
	for(int li=n-1;li>=0;li--){
		while(ri>=0 && v[li]+x<v[ri]) ri++;
		if(v[li]+x==v[ri]) return pii(v[li],v[ri]);
	}
	return pii(-1,-1);
}

void solve()
{
	int l,x,y;
	scanf("%d%d%d%d",&n,&l,&x,&y);
	fru(i,n) scanf("%d",&v[i]);
	bool ox=find_first(x)!=pii(-1,-1);
	bool oy=find_first(y)!=pii(-1,-1);
	if(ox && oy){
		puts("0");
		puts("");
		return;
	}
	if(ox||oy){
		puts("1");
		if(!ox) cout<<x<<endl;
		if(!oy) cout<<y<<endl;
		return;
	}
	pii ss=find_first(y-x);
	if(ss!=pii(-1,-1) && ss.x+y<=1){
		puts("1");
		cout<<ss.x+y<<endl;
		return;
	}
	ss=find_last(y-x);
	if(ss!=pii(-1,-1) && ss.x-x>=0){
		puts("1");
		cout<<ss.x-x<<endl;
		return;
	}
	puts("2");
	cout<<x<<" "<<y<<endl;
}
int main()
{
	solve();
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stdio.h>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <stack>
using namespace std;
const int maxn=100005;
int n,l,x,y,a[maxn],res;
bool xok,yok;
map <int,int> mp;
void check(int d,int t)
{
	if(d<0 ||d>l) return;
	if(mp[d+t]||mp[d-t]){
		cout<<1<<"\n"<<d<<"\n";
		exit(0);
	}
}
int main()
{
	cin>>n>>l>>x>>y;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		mp[a[i]]=1;
	}
	for(int i=0;i<n;i++)
	{
		xok|=mp[a[i]-x];
		xok|=mp[a[i]+x];
		yok|=mp[a[i]-y];
		yok|=mp[a[i]+y];
	}
	if(xok&&yok)
	{
		cout<<"0"<<"\n";
		return 0;
	}
	else if(xok)
	{
		cout<<1<<"\n"<<y<<"\n";
	}
	else if(yok)
	{
		cout<<1<<"\n"<<x<<"\n";
	}
	else{
		for(int i=0;i<n;i++)
		{
			check(a[i]-x,y);
			check(a[i]+x,y);
			check(a[i]-y,x);
			check(a[i]+y,x);
		}
	cout<<2<<"\n"<<x<<"\n"<<y<<"\n";
	}
	return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <string>
#include <vector>
#include <map>

#define f first
#define s second
#define ll long long
#define mp make_pair
#define ld long double
#define INF (int)(1e9 + 7)
#define pb push_back
#define EPS 1e-6

using namespace std;

int n, m, z, x, ans, o, y, l, r, a[500000];
bool was1, was2;
map <int, bool> ma, ma2;

int main()
{
    cin >> n >> z >> x >> y;

    for (int i = 1; i <= n; i++)
        cin >> a[i];

    l = 1;
    r = 2;
    was1 = false;
    while (r <= n)
    {
        if (a[r] - a[l] > x)
            l++;
        else if (a[r] - a[l] == x)
        {
            was1 = true;
            break;
        }
        else r++;
    }
    if (was1 == false)
        ans++;

    l = 1;
    r = 2;
    was2 = false;
    while (r <= n)
    {
        if (a[r] - a[l] > y)
            l++;
        else if (a[r] - a[l] == y)
        {
            was2 = true;
            break;
        }

        else r++;
    }
    if (was2 == false)
        ans++;

    if (ans == 2)
    {

        for (int i = 1; i <= n; i++)
        {
            if (a[i] + x <= a[n])
                ma[a[i] + x] = true;
            if (a[i] - x >= a[0])
                ma[a[i] - x] = true;
        }
        for (int i = 1; i <= n; i++)
            if (ma[a[i] + y] == true)
            {
                cout << 1 << endl;
                cout << a[i] + y << endl;
                return 0;
            }
            else
            if (ma[a[i] - y] == true)
            {
                cout << 1 << endl;
                cout << a[i] - y << endl;
                return 0;
            }

    }

    cout << ans << endl;

    if (was1 == false)
        cout << x << ' ';
    if (was2 == false)
        cout << y << ' ';
    cout << endl;

    return 0;
}


#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <string>
#include <vector>
#include <map>

#define f first
#define s second
#define ll long long
#define mp make_pair
#define ld long double
#define INF (int)(1e9 + 7)
#define pb push_back
#define EPS 1e-6

using namespace std;

int n, m, z, x, ans, o, y, l, r, a[500000];
bool was1, was2;
map <int, bool> ma, ma2;

int main()
{
    cin >> n >> z >> x >> y;

    for (int i = 1; i <= n; i++)
        cin >> a[i];

    l = 1;
    r = 2;
    was1 = false;
    while (r <= n)
    {
        if (a[r] - a[l] > x)
            l++;
        else if (a[r] - a[l] == x)
        {
            was1 = true;
            break;
        }
        else r++;
    }
    if (was1 == false)
        ans++;

    l = 1;
    r = 2;
    was2 = false;
    while (r <= n)
    {
        if (a[r] - a[l] > y)
            l++;
        else if (a[r] - a[l] == y)
        {
            was2 = true;
            break;
        }

        else r++;
    }
    if (was2 == false)
        ans++;

    if (ans == 2)
    {

        for (int i = 1; i <= n; i++)
            if (a[i] + x <= a[n])
                ma[a[i] + x] = true;
            else if (a[i] - x >= a[0])
                ma[a[i] - x] = true;

        for (int i = 1; i <= n; i++)
            if (ma[a[i] + y] == true)
            {
                cout << 1 << endl;
                cout << a[i] + y << endl;
                return 0;
            }
            else
            if (ma[a[i] - y] == true)
            {
                cout << 1 << endl;
                cout << a[i] - y << endl;
                return 0;
            }

    }

    cout << ans << endl;

    if (was1 == false)
        cout << x << ' ';
    if (was2 == false)
        cout << y << ' ';
    cout << endl;

    return 0;
}


#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#define sqr(x) (x)*(x)
using namespace std;
int n,m,x,y,i,j,num[100005];
pair<int,int> findfi(int x)
{
	int l=1,r=1;
	for (r=1;r<=n;r++)
	{
		while (num[l]+x<num[r]&&l<n) l++;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
pair<int,int> findls(int x)
{
	int l=n,r=n;
	for (l=n;l;l--)
	{
		while (num[l]+x<num[r]&&r>1) r--;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
bool in(long long x)
{
	return (x>-1&&x<=m);
}
int main()
{
	ios::sync_with_stdio(0);
	cin>>n>>m>>x>>y;
	for (i=1;i<=n;i++) cin>>num[i];
	if (findfi(x)!=pair<int,int>{-1,-1})
	{
		if (findfi(y)!=pair<int,int>{-1,-1})
		{
			cout<<0;
			return 0;
		}
		cout<<1<<endl<<y;
		return 0;
	}
	if (findfi(y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<x;
		return 0;
	}
	if (findfi(x+y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<findfi(x+y).first+x;
		return 0;
	}
	//if (x<y) swap(x,y);
	if (findls(y-x)!=pair<int,int>{-1,-1}&&findfi(y-x).first-x<=m)
	{
		cout<<1<<endl<<findls(y-x).first-x;
		return 0;
	}
	if (findfi(y-x)!=pair<int,int>{-1,-1}&&findls(y-x).first+y>=0)
	{
		cout<<1<<endl<<findfi(y-x).first+y;
		return 0;
	}
	cout<<2<<endl<<x<<' '<<y;
	return 0;
}


#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#define sqr(x) (x)*(x)
using namespace std;
int n,m,x,y,i,j,num[100005];
pair<int,int> findfi(int x)
{
	int l=1,r=1;
	for (r=1;r<=n;r++)
	{
		while (num[l]+x<num[r]&&l<n) l++;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
pair<int,int> findls(int x)
{
	int l=n,r=n;
	for (l=n;l;l--)
	{
		while (num[l]+x<num[r]&&r>1) r--;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
bool in(long long x)
{
	return (x>-1&&x<=m);
}
int main()
{
	ios::sync_with_stdio(0);
	cin>>n>>m>>x>>y;
	for (i=1;i<=n;i++) cin>>num[i];
	if (findfi(x)!=pair<int,int>{-1,-1})
	{
		if (findfi(y)!=pair<int,int>{-1,-1})
		{
			cout<<0;
			return 0;
		}
		cout<<1<<endl<<y;
		return 0;
	}
	if (findfi(y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<x;
		return 0;
	}
	if (findfi(x+y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<findfi(x+y).first+x;
		return 0;
	}
	if (findfi(y-x)!=pair<int,int>{-1,-1}&&in(findfi(y-x).first+x))
	{
		cout<<1<<endl<<findfi(y-x).first+x;
		return 0;
	}
	if (findls(y-x)!=pair<int,int>{-1,-1}&&in(findls(y-x).first-y))
	{
		cout<<1<<endl<<findls(y-x).second-y;
		return 0;
	}
	cout<<2<<endl<<x<<' '<<y;
	return 0;
}


#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#define sqr(x) (x)*(x)
using namespace std;
int n,m,x,y,i,j,num[100005];
pair<int,int> findfi(int x)
{
	int l=1,r=1;
	for (r=1;r<=n;r++)
	{
		while (num[l]+x<num[r]&&l<=n) l++;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
pair<int,int> findls(int x)
{
	int l=n,r=n;
	for (l=n;l;l--)
	{
		while (num[l]+x<num[r]&&r>=1) r--;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
bool in(long long x)
{
	return (x>-1&&x<=m);
}
int main()
{
	ios::sync_with_stdio(0);
	cin>>n>>m>>x>>y;
	for (i=1;i<=n;i++) cin>>num[i];
	if (findfi(x)!=pair<int,int>{-1,-1})
	{
		if (findfi(y)!=pair<int,int>{-1,-1})
		{
			cout<<0;
			return 0;
		}
		cout<<1<<endl<<y;
		return 0;
	}
	if (findfi(y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<x;
		return 0;
	}
	if (findfi(x+y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<findfi(x+y).first+x;
		return 0;
	}
	//if (x<y) swap(x,y);
	if (findfi(y-x)!=pair<int,int>{-1,-1}&&findfi(y-x).first+y<=m)
	{
		cout<<1<<endl<<findfi(y-x).first+y;
		return 0;
	}
	if (findls(y-x)!=pair<int,int>{-1,-1}&&findls(y-x).first-x>=0)
	{
		cout<<1<<endl<<findls(y-x).first-x;
		return 0;
	}
	cout<<2<<endl<<x<<' '<<y;
	return 0;
}


#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#include<map>
#define sqr(x) (x)*(x)
using namespace std;
map<long long,int> mp;
long long n,m,i,j,x,y,num[100005];
bool in(long long x)
{
	return (x>-1&&x<=m);
}
int main()
{
	ios::sync_with_stdio(0);
	cin>>n>>m>>x>>y;
	for (i=1;i<=n;i++)
	{
		cin>>num[i];
		mp[num[i]]=1;
	}
	bool okx=0,oky=0;
	for (i=1;i<=n;i++)
	{
		if (mp[num[i]+x]||mp[num[i]-x]) okx=1;
		if (mp[num[i]+y]||mp[num[i]-y]) oky=1;
	}
	if (okx)
	{
		if (oky)
		{
			cout<<0;
			return 0;
		}
		cout<<1<<endl<<y;
		return 0;
	}
	if (oky)
	{
		cout<<1<<endl<<x;
		return 0;
	}
	for (i=1;i<=n;i++)
	{
		if (in(num[i]-x)&&(mp[num[i]-x-y]||mp[num[i]-x+y]))
		{
			cout<<1<<endl<<num[i]-x;
			return 0;
		}
		if (in(num[i]+x)&&(mp[num[i]+x-y]||mp[num[i]+x+y]))
		{
			cout<<1<<endl<<num[i]+x;
			return 0;
		}
		if (in(num[i]-y)&&(mp[num[i]-x-y]||mp[num[i]+x-y]))
		{
			cout<<1<<endl<<num[i]-y;
			return 0;
		}
		if (in(num[i]+y)&&(mp[num[i]-x+y]||mp[num[i]+x+y]))
		{
			cout<<1<<endl<<num[i]+y;
			return 0;
		}
	}
	cout<<2<<endl<<x<<' '<<y<<endl;
	return 0;
}


#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#include<map>
#define sqr(x) (x)*(x)
using namespace std;
map<long long,int> mp;
long long n,m,i,j,x,y,num[100005];
int main()
{
	ios::sync_with_stdio(0);
	cin>>n>>m>>x>>y;
	for (i=1;i<=n;i++)
	{
		cin>>num[i];
		mp[num[i]]=1;
	}
	bool okx=0,oky=0;
	for (i=1;i<=n;i++)
	{
		if (mp[num[i]+x]||mp[num[i]-x]) okx=1;
		if (mp[num[i]+y]||mp[num[i]-y]) oky=1;
	}
	if (okx)
	{
		if (oky)
		{
			cout<<0;
			return 0;
		}
		cout<<1<<endl<<y;
		return 0;
	}
	if (oky)
	{
		cout<<1<<endl<<x;
		return 0;
	}
	for (i=1;i<=n;i++)
	{
		if (mp[num[i]-x-y]||mp[num[i]-x+y])
		{
			cout<<1<<endl<<num[i]-x;
			return 0;
		}
		if (mp[num[i]+x-y]||mp[num[i]+x+y])
		{
			cout<<1<<endl<<num[i]+x;
			return 0;
		}
		if (mp[num[i]-x-y]||mp[num[i]+x-y])
		{
			cout<<1<<endl<<num[i]-y;
			return 0;
		}
		if (mp[num[i]-x+y]||mp[num[i]+x+y])
		{
			cout<<1<<endl<<num[i]+y;
			return 0;
		}
	}
	cout<<2<<endl<<x<<' '<<y<<endl;
	return 0;
}


#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#define sqr(x) (x)*(x)
using namespace std;
int n,m,x,y,i,j,num[100005];
pair<int,int> findfi(int x)
{
	int l=1,r=1;
	for (r=1;r<=n;r++)
	{
		while (num[l]+x<num[r]&&l<n) l++;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
pair<int,int> findls(int x)
{
	int l=n,r=n;
	for (l=n;l;l--)
	{
		while (num[l]+x<num[r]&&r>1) r--;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
bool in(long long x)
{
	return (x>-1&&x<=m);
}
int main()
{
	ios::sync_with_stdio(0);
	cin>>n>>m>>x>>y;
	for (i=1;i<=n;i++) cin>>num[i];
	if (findfi(x)!=pair<int,int>{-1,-1})
	{
		if (findfi(y)!=pair<int,int>{-1,-1})
		{
			cout<<0;
			return 0;
		}
		cout<<1<<endl<<y;
		return 0;
	}
	if (findfi(y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<x;
		return 0;
	}
	if (findfi(x+y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<findfi(x+y).first+x;
		return 0;
	}
	//if (x<y) swap(x,y);
	if (findls(y-x)!=pair<int,int>{-1,-1}&&in(findfi(y-x).first-x))
	{
		cout<<1<<endl<<findls(y-x).first-x;
		return 0;
	}
	if (findfi(y-x)!=pair<int,int>{-1,-1}&&in(findls(y-x).first+y))
	{
		cout<<1<<endl<<findfi(y-x).first+y;
		return 0;
	}
	cout<<2<<endl<<x<<' '<<y;
	return 0;
}


#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#define sqr(x) (x)*(x)
using namespace std;
int n,m,x,y,i,j,num[100005];
pair<int,int> findfi(int x)
{
	int l=1,r=1;
	for (r=1;r<=n;r++)
	{
		while (num[l]+x<num[r]&&l<n) l++;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
pair<int,int> findls(int x)
{
	int l=n,r=n;
	for (l=n;l;l--)
	{
		while (num[l]+x<num[r]&&r>1) r--;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
bool in(long long x)
{
	return (x>-1&&x<=m);
}
int main()
{
	ios::sync_with_stdio(0);
	cin>>n>>m>>x>>y;
	for (i=1;i<=n;i++) cin>>num[i];
	if (findfi(x)!=pair<int,int>{-1,-1})
	{
		if (findfi(y)!=pair<int,int>{-1,-1})
		{
			cout<<0;
			return 0;
		}
		cout<<1<<endl<<y;
		return 0;
	}
	if (findfi(y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<x;
		return 0;
	}
	if (findfi(x+y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<findfi(x+y).first+x;
		return 0;
	}
	if (findfi(y-x)!=pair<int,int>{-1,-1}&&in(findfi(y-x).first-x))
	{
		cout<<1<<endl<<findfi(y-x).first-x;
		return 0;
	}
	if (findls(y-x)!=pair<int,int>{-1,-1}&&in(findls(y-x).second+y))
	{
		cout<<1<<endl<<findls(y-x).second+y;
		return 0;
	}
	cout<<2<<endl<<x<<' '<<y;
	return 0;
}


#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#define sqr(x) (x)*(x)
using namespace std;
int n,m,x,y,i,j,num[100005];
pair<int,int> findfi(int x)
{
	int l=1,r=1;
	for (r=1;r<=n;r++)
	{
		while (num[l]+x<num[r]&&l<n) l++;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
pair<int,int> findls(int x)
{
	int l=n,r=n;
	for (l=n;l;l--)
	{
		while (num[l]+x<num[r]&&r>1) r--;
		if (num[l]+x==num[r]) return {num[l],num[r]};
	}
	return {-1,-1};
}
bool in(long long x)
{
	return (x>-1&&x<=m);
}
int main()
{
	ios::sync_with_stdio(0);
	cin>>n>>m>>x>>y;
	for (i=1;i<=n;i++) cin>>num[i];
	if (findfi(x)!=pair<int,int>{-1,-1})
	{
		if (findfi(y)!=pair<int,int>{-1,-1})
		{
			cout<<0;
			return 0;
		}
		cout<<1<<endl<<y;
		return 0;
	}
	if (findfi(y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<x;
		return 0;
	}
	if (findfi(x+y)!=pair<int,int>{-1,-1})
	{
		cout<<1<<endl<<findfi(x+y).first+x;
		return 0;
	}
	//if (x<y) swap(x,y);
	if (findls(y-x)!=pair<int,int>{-1,-1}&&in(findfi(y-x).first-x))
	{
		cout<<1<<endl<<findls(y-x).first-x;
		return 0;
	}
	if (findfi(y-x)!=pair<int,int>{-1,-1}&&in(findls(y-x).first+y))
	{
		cout<<1<<endl<<findfi(y-x).second+y;
		return 0;
	}
	cout<<2<<endl<<x<<' '<<y;
	return 0;
}


#include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define mp make_pair
#define up_b upper_bound
#define low_b lower_bound
#define sz(x) (int)x.size()
#define all(v) v.begin(),v.end()
#define boost ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<int,ll> pil;
typedef pair<ll,int> pli;
typedef pair<ll,ll> pll;

const ll INF=1e18;
const int inf = 2e9;
const ll mod = 1e9+7;
const int N=1e5+5;
const int dx[4]={0,0,1,-1};
const int dy[4]={1,-1,0,0};
const int M=1e4+5;

int a[N];

int main(){
	int n,l,x,y;
	cin>>n>>l>>x>>y;
	int w=0,d=0;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	for(int i=1;i<=n;i++){
		int pos1=low_b(a+1,a+1+n,a[i]+x)-a;
		if(a[i]+x==a[pos1])w=1;
		int pos2=low_b(a+1,a+1+n,a[i]+y)-a;
		if(a[i]+y==a[pos2])d=1;
	}
	if(w&&d){
		cout<<"0";
		return 0;
	}
	if(w&&!d){
		cout<<"1\n"<<y;
		return 0;
	}
	if(!w&&d){
		cout<<"1\n"<<x;
		return 0;
	}
	if(!w&&!d){
		vector<int>b,g;
		for(int i=1;i<=n;i++){
			b.pb(a[i]-y);
			b.pb(a[i]+y);
			g.pb(a[i]-x);
			g.pb(a[i]+x);
		}
		sort(all(g));
		for(int i=0;i<sz(b);i++){
			int pos=low_b(all(g),b[i])-g.begin();
			if(g[pos]==b[i]){
				cout<<"1\n";
				cout<<b[i];
				return 0;
			}
		}
		cout<<"2\n"<<x<<" "<<y;
		return 0;
	}
}


#include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define mp make_pair
#define up_b upper_bound
#define low_b lower_bound
#define sz(x) (int)x.size()
#define all(v) v.begin(),v.end()
#define boost ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<int,ll> pil;
typedef pair<ll,int> pli;
typedef pair<ll,ll> pll;

const ll INF=1e18;
const int inf = 2e9;
const ll mod = 1e9+7;
const int N=1e5+5;
const int dx[4]={0,0,1,-1};
const int dy[4]={1,-1,0,0};
const int M=1e4+5;

int a[N];

int main(){
	int n,l,x,y;
	cin>>n>>l>>x>>y;
	int w=0,d=0;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	for(int i=1;i<=n;i++){
		int pos1=low_b(a+1,a+1+n,a[i]+x)-a;
		if(a[i]+x==a[pos1])w=1;
		int pos2=low_b(a+1,a+1+n,a[i]+y)-a;
		if(a[i]+y==a[pos2])d=1;
	}
	if(w&&d){
		cout<<"0";
		return 0;
	}
	if(w&&!d){
		cout<<"1\n"<<y;
		return 0;
	}
	if(!w&&d){
		cout<<"1\n"<<x;
		return 0;
	}
	if(!w&&!d){
		vector<int>b,g;
		for(int i=1;i<=n;i++){
			if(a[i]>=y)b.pb(a[i]-y);
			if(a[i]+y<=l)b.pb(a[i]+y);
			if(a[i]>=x)g.pb(a[i]-x);
			if(a[i]+x<=l)g.pb(a[i]+x);
		}
		sort(all(g));
		sort(all(b));
		for(int i=0;i<sz(b);i++){
			int pos=low_b(all(g),b[i])-g.begin();
			if(g[pos]==b[i]){
				cout<<"1\n";
				cout<<b[i];
				return 0;
			}
		}
		cout<<"2\n"<<x<<" "<<y;
		return 0;
	}
}


#include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define mp make_pair
#define up_b upper_bound
#define low_b lower_bound
#define sz(x) (int)x.size()
#define all(v) v.begin(),v.end()
#define boost ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<int,ll> pil;
typedef pair<ll,int> pli;
typedef pair<ll,ll> pll;

const ll INF=1e18;
const int inf = 2e9;
const ll mod = 1e9+7;
const int N=1e5+5;
const int dx[4]={0,0,1,-1};
const int dy[4]={1,-1,0,0};
const int M=1e4+5;

int a[N];

int main(){
	int n,l,x,y;
	cin>>n>>l>>x>>y;
	int w=0,d=0;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	for(int i=1;i<=n;i++){
		int pos1=low_b(a+1,a+1+n,a[i]+x)-a;
		if(a[i]+x==a[pos1])w=1;
		int pos2=low_b(a+1,a+1+n,a[i]+y)-a;
		if(a[i]+y==a[pos2])d=1;
	}
	if(w&&d){
		cout<<"0";
		return 0;
	}
	if(w&&!d){
		cout<<"1\n"<<y;
		return 0;
	}
	if(!w&&d){
		cout<<"1\n"<<x;
		return 0;
	}
	if(!w&&!d){
		vector<int>b,g;
		for(int i=1;i<=n;i++){
			b.pb(a[i]-y);
			b.pb(a[i]+y);
			g.pb(a[i]-x);
			g.pb(a[i]+x);
		}
		for(int i=0;i<sz(b);i++){
			int pos=low_b(all(g),b[i])-g.begin();
			if(g[pos]==b[i]){
				cout<<"1\n";
				cout<<b[i];
				return 0;
			}
		}
		cout<<"2\n"<<x<<" "<<y;
		return 0;
	}
}


#include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define mp make_pair
#define up_b upper_bound
#define low_b lower_bound
#define sz(x) (int)x.size()
#define all(v) v.begin(),v.end()
#define boost ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<int,ll> pil;
typedef pair<ll,int> pli;
typedef pair<ll,ll> pll;

const ll INF=1e18;
const int inf = 2e9;
const ll mod = 1e9+7;
const int N=1e5+5;
const int dx[4]={0,0,1,-1};
const int dy[4]={1,-1,0,0};
const int M=1e4+5;

int a[N];

int main(){
	int n,l,x,y;
	cin>>n>>l>>x>>y;
	int w=0,d=0;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	for(int i=1;i<=n;i++){
		int pos1=low_b(a+1,a+1+n,a[i]+x)-a;
		if(a[i]+x==a[pos1])w=1;
		int pos2=low_b(a+1,a+1+n,a[i]+y)-a;
		if(a[i]+y==a[pos2])d=1;
	}
	if(w&&d){
		cout<<"0";
		return 0;
	}
	if(w&&!d){
		cout<<"1\n"<<y;
		return 0;
	}
	if(!w&&d){
		cout<<"1\n"<<x;
		return 0;
	}
	if(!w&&!d){
		vector<int>b,g;
		for(int i=1;i<=n;i++){
			b.pb(a[i]-y);
			g.pb(a[i]-x);
		}
		for(int i=0;i<sz(b);i++){
			int pos=low_b(all(g),b[i])-g.begin();
			if(g[pos]==b[i]){
				cout<<"1\n";
				cout<<b[i];
				return 0;
			}
		}
		cout<<"2\n"<<x<<" "<<y;
		return 0;
	}
}


#include <bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define mp make_pair
#define up_b upper_bound
#define low_b lower_bound
#define sz(x) (int)x.size()
#define all(v) v.begin(),v.end()
#define boost ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<int,ll> pil;
typedef pair<ll,int> pli;
typedef pair<ll,ll> pll;

const ll INF=1e18;
const int inf = 2e9;
const ll mod = 1e9+7;
const int N=1e5+5;
const int dx[4]={0,0,1,-1};
const int dy[4]={1,-1,0,0};
const int M=1e4+5;

int a[N];

int main(){
	int n,l,x,y;
	cin>>n>>l>>x>>y;
	int w=0,d=0;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	for(int i=1;i<=n;i++){
		int pos1=low_b(a+1,a+1+n,a[i]+x)-a;
		if(a[i]+x==a[pos1])w=1;
		int pos2=low_b(a+1,a+1+n,a[i]+y)-a;
		if(a[i]+y==a[pos2])d=1;
	}
	if(w&&d){
		cout<<"0";
		return 0;
	}
	if(w&&!d){
		cout<<"1\n"<<y;
		return 0;
	}
	if(!w&&d){
		cout<<"1\n"<<x;
		return 0;
	}
	if(!w&&!d){
		vector<int>b,g;
		for(int i=1;i<=n;i++){
			if(a[i]>=y)b.pb(a[i]-y);
			if(a[i]+y<=l)b.pb(a[i]+y);
			if(a[i]>=x)g.pb(a[i]-x);
			if(a[i]+x<=l)g.pb(a[i]+x);
		}
		sort(all(g));
		for(int i=0;i<sz(b);i++){
			int pos=low_b(all(g),b[i])-g.begin();
			if(g[pos]==b[i]){
				cout<<"1\n";
				cout<<b[i];
				return 0;
			}
		}
		cout<<"2\n"<<x<<" "<<y;
		return 0;
	}
}


#include<bits/stdc++.h>
#include<vector>
#include<iostream>
#include<sstream>
#include<fstream>
#include<list>
#include<deque>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cctype>
#include<cmath>
#include<ctime>
#include<iomanip>
using namespace std;
/*freopen{"input.txt","r",stdin};
freopen{"output.txt","w",stdout};*/
#define mp make_pair
#define pb push_back
const int INF=1000*1000*1000;
const int maxn=2e5;
typedef long long ll;
typedef long double ld;
typedef pair<int,int>PII;
//priority_queue <int,vector<int>,greater<int> > q1;  //��С����
//priority_queue <int,vector<int>,less<int> >q2;  //�Ӵ�С

int n,m,x,y;
int a[maxn],l[maxn],r[maxn];
int ans=0,cnd=0,cndd=0,xx=0,yy=0;
int main(){
	//ios_base::sync_with_stdio(0);
    //cin.tie(0);
    //cout.tie(0);
	cin>>n>>m>>x>>y;
	for(int i=0;i<n;i++) cin>>a[i];
	sort(a,a+n);
	for(int i=0;i<n;i++){
		int tmp1=a[i]+x,tmp2=a[i]-x;
		if(binary_search(a+i,a+n,tmp1)){
			xx=1;
			l[cnd++]=tmp1;
		}
		if(binary_search(a,a+i,tmp2)){
			xx=1;
			l[cnd++]=tmp2;
		}
	}
	for(int i=0;i<n;i++){
		int tmp1=a[i]+y,tmp2=a[i]-y;
		if(binary_search(a+i,a+n,tmp1)){
			yy=1;
			r[cnd++]=tmp1;
		}
		if(binary_search(a,a+i,tmp2)){
			yy=1;
		    r[cnd++]=tmp2;
		}
	}
	if(xx&&yy){
		cout<<0;
	}
	else if(xx&&!yy) {
		cout<<1<<endl;
		cout<<y;
	}
	else if(!xx&&yy) {
		cout<<1<<endl;
		cout<<x;
	}
	else{
		int f=0,fans;
		for(int i=0;i<cnd;i++){
			for(int j=0;j<cndd;j++){
				if(l[i]==r[j]){
					f=1;
					fans=l[i];
					break;
				}
			}
		}
		if(f){
			cout<<1<<endl;
			cout<<fans;
		}
		else{
			cout<<2<<endl;
			cout<<x<<' '<<y;
		}

	}

	return 0;
}


#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<set>
#include<queue>
#include<map>
#define pa pair<int,int>
#define inf 1000000000
#define ll long long
using namespace std;
int read()
{
    int x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
    return x*f;
}
int t1,t2;
int n,l,x,y;
int a[100005];
map<int,int> b;
int main()
{
    n=read();l=read();x=read();y=read();
    for(int i=1;i<=n;i++)a[i]=read(),b[a[i]]=1;
    for(int i=1;i<=n;i++)
    {
        if(b[a[i]-x])t1=1;
        if(b[a[i]-y])t2=1;
    }
    if(t1&&t2){puts("0");return 0;}   //���ҵ�
    if(t1){printf("1\n%d\n",y);return 0;}  //�ҵ�1��
    if(t2){printf("1\n%d\n",x);return 0;}  //�ҵ�1��
    for(int i=1;i<=n;i++)
    {
        if(b[a[i]-x-y])
        {printf("1\n%d\n",a[i]-x);return 0;}  //�ж��ܷ����һ����������������
        if(b[a[i]-(y-x)]&&a[i]+x<=l)
        {printf("1\n%d\n",a[i]+x);return 0;}
        if(b[a[i]+(y-x)]&&a[i]-x>=0)
        {printf("1\n%d\n",a[i]-x);return 0;}
    }
    printf("2\n%d %d\n",x,y);  //������е�1��
    return 0;
}


#include<bits/stdc++.h>
#include<vector>
#include<iostream>
#include<sstream>
#include<fstream>
#include<list>
#include<deque>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cctype>
#include<cmath>
#include<ctime>
#include<iomanip>
using namespace std;
/*freopen{"input.txt","r",stdin};
freopen{"output.txt","w",stdout};*/
#define mp make_pair
#define pb push_back
const int INF=1000*1000*1000;
const int maxn=2e5;
typedef long long ll;
typedef long double ld;
typedef pair<int,int>PII;
//priority_queue <int,vector<int>,greater<int> > q1;  //��С����
//priority_queue <int,vector<int>,less<int> >q2;  //�Ӵ�С

int n,m,x,y;
map<int,int>b;
int a[maxn];

int main(){
	//ios_base::sync_with_stdio(0);
    //cin.tie(0);
    //cout.tie(0);
	cin>>n>>m>>x>>y;
	int qx,qy;
	for(int i=0;i<n;i++){
		cin>>a[i];
		b[a[i]]=1;
	}
	for(int i=0;i<n;i++){
		if(b[a[i]-x]) qx=1;
		if(b[a[i]-y]) qy=1;
	}
	if(qx&&qy){
		cout<<0<<endl;
	}
	else if(qx&&!qy){
		cout<<1<<endl;
		cout<<y<<endl;
	}
	else if(!qx&&qy){
		cout<<1<<endl;
		cout<<x<<endl;
	}
	else{
		for(int i=1;i<=n;i++)
    {
        if(b[a[i]-x-y])
        {printf("1\n%d\n",a[i]-x);return 0;}
        if(b[a[i]-(y-x)]&&a[i]+x<=m)
        {printf("1\n%d\n",a[i]+x);return 0;}
        if(b[a[i]+(y-x)]&&a[i]-x>=0)
        {printf("1\n%d\n",a[i]-x);return 0;}
    }
		cout<<2<<endl;
		cout<<x<<' '<<y;
	}

	return 0;
}


#include<bits/stdc++.h>
#include<vector>
#include<iostream>
#include<sstream>
#include<fstream>
#include<list>
#include<deque>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cctype>
#include<cmath>
#include<ctime>
#include<iomanip>
using namespace std;
/*freopen{"input.txt","r",stdin};
freopen{"output.txt","w",stdout};*/
#define mp make_pair
#define pb push_back
const int INF=1000*1000*1000;
const int maxn=2e5;
typedef long long ll;
typedef long double ld;
typedef pair<int,int>PII;
//priority_queue <int,vector<int>,greater<int> > q1;  //��С����
//priority_queue <int,vector<int>,less<int> >q2;  //�Ӵ�С

int n,l,x,y;
int a[maxn];
int ans=2;
int aa[2];
int xx=0,yy=0;
int main(){
	//ios_base::sync_with_stdio(0);
    //cin.tie(0);
    //cout.tie(0);
	cin>>n>>l>>x>>y;
	for(int i=0;i<n;i++) cin>>a[i];
	sort(a,a+n);
	for(int i=0;i<n;i++){
		int tmp1=a[i]+x,tmp2=a[i]-x;

		if(binary_search(a+i,a+n,tmp1)||binary_search(a,a+i,tmp2)){
			ans--;
			xx=1;
			break;
		}

	}
	for(int i=0;i<n;i++){
		int tmp1=a[i]+y,tmp2=a[i]-y;

		if(binary_search(a+i,a+n,tmp1)||binary_search(a,a+i,tmp2)){
			ans--;
			yy=1;
			break;
		}

	}
	cout<<ans<<endl;
	if(!xx) cout<<x<<' ';
	if(!yy) cout<<y<<' ';

	return 0;
}


#include <bits/stdc++.h>
//:)

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define form(i,a,b) for (int i=a;i>=b;i--)
#define forp(i,a,n) for (int i=a;i<n;i++)
#define forn(i,n) for (int i=0;i<n;i++)
#define fast cin.tie(0);cout.tie(0);std::ios_base::sync_with_stdio(0);
#define str string
#define pb push_back
#define checker cout<<"HERE"<<endl;
#define sz size
#define fr freopen("pails.in","r",stdin);freopen("pails.txt","w",stdout);
#define f first
#define s second
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;

typedef long long ll;
typedef long double ld;

const ll t_max=int(1e9)+7;
const ll MAXX=ll(1e18);
const int INF=int(2e9);

void read(int a[],int n) {forp(i,0,n) cin>>a[i];}

ll binpow (ll a, ll n, ll k)
{
    ll res = 1;
    while (n)
        if (n & 1)
        {
            res *= a;
            res%=k;
            n--;
        }
        else
        {
            a *= a;
            a%=k;
            n >>= 1;
        }
    return res;
}

int main()
{
int n,l,x,y,ans,pos,num=-1;
bool a=0,b=0;
cin>>n>>l>>x>>y;
int mas[n];
read(mas,n);
set<int> s;
forn(i,n){
if (s.count(mas[i]-x)!=0) a=1;
if (s.count(mas[i]-y)!=0) b=1;
s.insert(mas[i]);
}
ans=2-a-b;
if (ans==2){
    forn(i,n){
    pos=mas[i]+x;
    if (pos<=l){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]-x;
    if (pos>=0){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]+y;
    if (pos<=l){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
    pos=mas[i]-y;
    if (pos>=0){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
  }
}
if(num!=-1) cout<<1<<'\n'<<num;
else{
    cout<<ans<<'\n';
    if(!a) cout<<x<<' ';
    if(!b) cout<<y<<' ';
}
}


#include <bits/stdc++.h>
//:)

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define form(i,a,b) for (int i=a;i>=b;i--)
#define forp(i,a,n) for (int i=a;i<n;i++)
#define forn(i,n) for (int i=0;i<n;i++)
#define fast cin.tie(0);cout.tie(0);std::ios_base::sync_with_stdio(0);
#define str string
#define pb push_back
#define checker cout<<"HERE"<<endl;
#define sz size
#define fr freopen("pails.in","r",stdin);freopen("pails.txt","w",stdout);
#define f first
#define s second
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;

typedef long long ll;
typedef long double ld;

const ll t_max=int(1e9)+7;
const ll MAXX=ll(1e18);
const int INF=int(2e9);

void read(int a[],int n) {forp(i,0,n) cin>>a[i];}

ll binpow (ll a, ll n, ll k)
{
    ll res = 1;
    while (n)
        if (n & 1)
        {
            res *= a;
            res%=k;
            n--;
        }
        else
        {
            a *= a;
            a%=k;
            n >>= 1;
        }
    return res;
}

int main()
{
int n,l,x,y;
bool a=0,b=0;
cin>>n>>l>>x>>y;
int mas[n];
read(mas,n);
set<int> s;
forp(i,0,n){
if (s.count(mas[i]-x)==1) a=1;
if (s.count(mas[i]-y)==1) b=1;
s.insert(mas[i]);
}
cout<<2-a-b<<'\n';
if (!a) cout<<x<<' ';
if (!b) cout<<y<<' ';
forn(i,1000000) cout<<'\n';
}


#include <bits/stdc++.h>
//:)

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define form(i,a,b) for (int i=a;i>=b;i--)
#define forp(i,a,n) for (int i=a;i<n;i++)
#define forn(i,n) for (int i=0;i<n;i++)
#define fast cin.tie(0);cout.tie(0);std::ios_base::sync_with_stdio(0);
#define str string
#define pb push_back
#define checker cout<<"HERE"<<endl;
#define sz size
#define fr freopen("pails.in","r",stdin);freopen("pails.txt","w",stdout);
#define f first
#define s second
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;

typedef long long ll;
typedef long double ld;

const ll t_max=int(1e9)+7;
const ll MAXX=ll(1e18);
const int INF=int(2e9);

void read(int a[],int n) {forp(i,0,n) cin>>a[i];}

ll binpow (ll a, ll n, ll k)
{
    ll res = 1;
    while (n)
        if (n & 1)
        {
            res *= a;
            res%=k;
            n--;
        }
        else
        {
            a *= a;
            a%=k;
            n >>= 1;
        }
    return res;
}

int main()
{
//fast
int n,l,x,y,ans,pos,num=-1;
bool a=0,b=0;
cin>>n>>l>>x>>y;
int mas[n];
read(mas,n);
set<int> s;
forn(i,n){
if (s.count(mas[i]-x)!=0) a=1;
if (s.count(mas[i]-y)!=0) b=1;
s.insert(mas[i]);
}
ans=2-a-b;
if (ans==2){
    forn(i,n){
    pos=mas[i]+x;
    if (pos<=l){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]-x;
    if (pos>=0){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]+y;
    if (pos<=l){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
    pos=mas[i]-y;
    if (pos>=0){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
  }
}
if(num!=-1) cout<<1<<'\n'<<num;
else{
    cout<<ans<<'\n';
    if(!a) cout<<x<<' ';
    if(!b) cout<<y<<' ';
}
forn(i,1e6) cout<<endl;
}


#include <bits/stdc++.h>
//:)

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define form(i,a,b) for (int i=a;i>=b;i--)
#define forp(i,a,n) for (int i=a;i<n;i++)
#define forn(i,n) for (int i=0;i<n;i++)
#define fast cin.tie(0);cout.tie(0);std::ios_base::sync_with_stdio(0);
#define str string
#define pb push_back
#define checker cout<<"HERE"<<endl;
#define sz size
#define fr freopen("pails.in","r",stdin);freopen("pails.txt","w",stdout);
#define f first
#define s second
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;

typedef long long ll;
typedef long double ld;

const ll t_max=int(1e9)+7;
const ll MAXX=ll(1e18);
const int INF=int(2e9);

void read(int a[],int n) {forp(i,0,n) cin>>a[i];}

ll binpow (ll a, ll n, ll k)
{
    ll res = 1;
    while (n)
        if (n & 1)
        {
            res *= a;
            res%=k;
            n--;
        }
        else
        {
            a *= a;
            a%=k;
            n >>= 1;
        }
    return res;
}

int main()
{
fast
int n,l,x,y,ans,pos,num=-1;
bool a=0,b=0;
cin>>n>>l>>x>>y;
int mas[n];
read(mas,n);
set<int> s;
forn(i,n){
if (s.count(mas[i]-x)!=0) a=1;
if (s.count(mas[i]-y)!=0) b=1;
s.insert(mas[i]);
}
ans=2-a-b;
if (ans==2){
    forn(i,n){
    pos=mas[i]+x;
    if (pos<=l){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]-x;
    if (pos>=0){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]+y;
    if (pos<=l){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
    pos=mas[i]-y;
    if (pos>=0){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
  }
}
if(num!=-1) cout<<1<<'\n'<<num;
else{
    cout<<ans<<'\n';
    if(!a) cout<<x<<' ';
    if(!b) cout<<y<<' ';
}
forn(i,1e6) cout<<endl;
}


#include <bits/stdc++.h>
//:)

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define form(i,a,b) for (int i=a;i>=b;i--)
#define forp(i,a,n) for (int i=a;i<n;i++)
#define forn(i,n) for (int i=0;i<n;i++)
#define fast cin.tie(0);cout.tie(0);std::ios_base::sync_with_stdio(0);
#define str string
#define pb push_back
#define checker cout<<"HERE"<<endl;
#define sz size
#define fr freopen("pails.in","r",stdin);freopen("pails.txt","w",stdout);
#define f first
#define s second
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;

typedef long long ll;
typedef long double ld;

const ll t_max=int(1e9)+7;
const ll MAXX=ll(1e18);
const int INF=int(2e9);

void read(int a[],int n) {forp(i,0,n) cin>>a[i];}

ll binpow (ll a, ll n, ll k)
{
    ll res = 1;
    while (n)
        if (n & 1)
        {
            res *= a;
            res%=k;
            n--;
        }
        else
        {
            a *= a;
            a%=k;
            n >>= 1;
        }
    return res;
}

int main()
{
int n,l,x,y,ans,pos,num=-1;
bool a=0,b=0;
cin>>n>>l>>x>>y;
int mas[n];
read(mas,n);
set<int> s;
forn(i,n){
if (s.count(mas[i]-x)!=0) a=1;
if (s.count(mas[i]-y)!=0) b=1;
s.insert(mas[i]);
}
ans=2-a-b;
if (ans==2){
    forn(i,n){
    pos=mas[i]+x;
    if (pos<=l){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]+y;
    if (pos<=l){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
  }
}
if(num!=-1) cout<<1<<'\n'<<num;
else{
    cout<<ans<<'\n';
    if(!a) cout<<x<<' ';
    if(!b) cout<<y<<' ';
}
forn(i,1e6) cout<<'\n';
}


#include <bits/stdc++.h>
//:)

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define form(i,a,b) for (int i=a;i>=b;i--)
#define forp(i,a,n) for (int i=a;i<n;i++)
#define forn(i,n) for (int i=0;i<n;i++)
#define fast cin.tie(0);cout.tie(0);std::ios_base::sync_with_stdio(0);
#define str string
#define pb push_back
#define checker cout<<"HERE"<<endl;
#define sz size
#define fr freopen("pails.in","r",stdin);freopen("pails.txt","w",stdout);
#define f first
#define s second
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;

typedef long long ll;
typedef long double ld;

const ll t_max=int(1e9)+7;
const ll MAXX=ll(1e18);
const int INF=int(2e9);

void read(int a[],int n) {forp(i,0,n) cin>>a[i];}

ll binpow (ll a, ll n, ll k)
{
    ll res = 1;
    while (n)
        if (n & 1)
        {
            res *= a;
            res%=k;
            n--;
        }
        else
        {
            a *= a;
            a%=k;
            n >>= 1;
        }
    return res;
}

int main()
{
int n,l,x,y;
bool a=0,b=0;
cin>>n>>l>>x>>y;
int mas[n];
read(mas,n);
set<int> s;
forn(i,n){
if (s.count(mas[i]-x)!=0) a=1;
if (s.count(mas[i]-y)!=0) b=1;
s.insert(mas[i]);
}
if (2-a-b!=2){
cout<<2-a-b<<'\n';
if (!a) cout<<x<<' ';
if (!b) cout<<y<<' ';
}
else{
int ind1=-1,ind2=-1;
forn(i,n){
if (s.count(mas[i]+y-x)==1&&mas[i]+y<=l){
    ind1=mas[i]+y;
    break;
}
if (s.count(mas[i]+x-y)==1&&mas[i]+x<=l){
    ind2=mas[i]+x;
    break;
}
}
if(ind1==-1&&ind2==-1) cout<<2<<'\n'<<x<<' '<<y;
if(ind1!=-1) cout<<1<<'\n'<<ind1;
if(ind2!=-1) cout<<1<<'\n'<<ind2;
}
//forn(i,1000000) cout<<endl;
}


#include <bits/stdc++.h>
//:)

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define form(i,a,b) for (int i=a;i>=b;i--)
#define forp(i,a,n) for (int i=a;i<n;i++)
#define forn(i,n) for (int i=0;i<n;i++)
#define fast cin.tie(0);cout.tie(0);std::ios_base::sync_with_stdio(0);
#define str string
#define pb push_back
#define checker cout<<"HERE"<<endl;
#define sz size
#define fr freopen("pails.in","r",stdin);freopen("pails.txt","w",stdout);
#define f first
#define s second
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define endl '\n'

typedef long long ll;
typedef long double ld;

const ll t_max=int(1e9)+7;
const ll MAXX=ll(1e18);
const int INF=int(2e9);

void read(int a[],int n) {forp(i,0,n) cin>>a[i];}

ll binpow (ll a, ll n, ll k)
{
    ll res = 1;
    while (n)
        if (n & 1)
        {
            res *= a;
            res%=k;
            n--;
        }
        else
        {
            a *= a;
            a%=k;
            n >>= 1;
        }
    return res;
}

int main()
{
int n,l,x,y,ans,pos,num=-1;
bool a=0,b=0;
cin>>n>>l>>x>>y;
int mas[n];
read(mas,n);
set<int> s;
forn(i,n){
if (s.count(mas[i]-x)!=0) a=1;
if (s.count(mas[i]-y)!=0) b=1;
s.insert(mas[i]);
}
ans=2-a-b;
if (ans==2){
    forn(i,n){
    pos=mas[i]+x;
    if (pos<=l){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]-x;
    if (pos>=0){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]+y;
    if (pos<=l){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
    pos=mas[i]-y;
    if (pos>=0){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
  }
}
if(num!=-1) cout<<1<<'\n'<<num;
else{
    cout<<ans<<'\n';
    if(!a) cout<<x<<' ';
    if(!b) cout<<y<<' ';
}
forn(i,1e6) cout<<endl;
}


#include <bits/stdc++.h>
//:)

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define form(i,a,b) for (int i=a;i>=b;i--)
#define forp(i,a,n) for (int i=a;i<n;i++)
#define forn(i,n) for (int i=0;i<n;i++)
#define fast cin.tie(0);cout.tie(0);std::ios_base::sync_with_stdio(0);
#define str string
#define pb push_back
#define checker cout<<"HERE"<<endl;
#define sz size
#define fr freopen("pails.in","r",stdin);freopen("pails.txt","w",stdout);
#define f first
#define s second
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;

typedef long long ll;
typedef long double ld;

const ll t_max=int(1e9)+7;
const ll MAXX=ll(1e18);
const int INF=int(2e9);

void read(int a[],int n) {forp(i,0,n) cin>>a[i];}

ll binpow (ll a, ll n, ll k)
{
    ll res = 1;
    while (n)
        if (n & 1)
        {
            res *= a;
            res%=k;
            n--;
        }
        else
        {
            a *= a;
            a%=k;
            n >>= 1;
        }
    return res;
}

int main()
{
int n,l,x,y,ans,pos,num=-1;
bool a=0,b=0;
cin>>n>>l>>x>>y;
int mas[n];
read(mas,n);
set<int> s;
forn(i,n){
if (s.count(mas[i]-x)!=0) a=1;
if (s.count(mas[i]-y)!=0) b=1;
s.insert(mas[i]);
}
ans=2-a-b;
if (ans==2){
    forn(i,n){
    pos=mas[i]+x;
    if (pos<=l){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]-x;
    if (pos>=0){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]+y;
    if (pos<=l){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
    pos=mas[i]-y;
    if (pos>=0){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
  }
}
if(num!=-1) cout<<1<<'\n'<<num;
else{
    cout<<ans<<'\n';
    if(!a) cout<<x<<' ';
    if(!b) cout<<y<<' ';
}
forn(i,1e6) cout<<'\n';
}


#include <bits/stdc++.h>
//:)

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define form(i,a,b) for (int i=a;i>=b;i--)
#define forp(i,a,n) for (int i=a;i<n;i++)
#define forn(i,n) for (int i=0;i<n;i++)
#define fast cin.tie(0);cout.tie(0);std::ios_base::sync_with_stdio(0);
#define str string
#define pb push_back
#define checker cout<<"HERE"<<endl;
#define sz size
#define fr freopen("pails.in","r",stdin);freopen("pails.txt","w",stdout);
#define f first
#define s second
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define endl '\n'

typedef long long ll;
typedef long double ld;

const ll t_max=int(1e9)+7;
const ll MAXX=ll(1e18);
const int INF=int(2e9);

void read(int a[],int n) {forp(i,0,n) cin>>a[i];}

ll binpow (ll a, ll n, ll k)
{
    ll res = 1;
    while (n)
        if (n & 1)
        {
            res *= a;
            res%=k;
            n--;
        }
        else
        {
            a *= a;
            a%=k;
            n >>= 1;
        }
    return res;
}

int main()
{
fast
int n,l,x,y,ans,pos,num=-1;
bool a=0,b=0;
cin>>n>>l>>x>>y;
int mas[n];
read(mas,n);
set<int> s;
forn(i,n){
if (s.count(mas[i]-x)!=0) a=1;
if (s.count(mas[i]-y)!=0) b=1;
s.insert(mas[i]);
}
ans=2-a-b;
if (ans==2){
    forn(i,n){
    pos=mas[i]+x;
    if (pos<=l){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]-x;
    if (pos>=0){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]+y;
    if (pos<=l){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
    pos=mas[i]-y;
    if (pos>=0){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
  }
}
if(num!=-1) cout<<1<<'\n'<<num;
else{
    cout<<ans<<'\n';
    if(!a) cout<<x<<' ';
    if(!b) cout<<y<<' ';
}
}


#include <bits/stdc++.h>
//:)

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define form(i,a,b) for (int i=a;i>=b;i--)
#define forp(i,a,n) for (int i=a;i<n;i++)
#define forn(i,n) for (int i=0;i<n;i++)
#define fast cin.tie(0);cout.tie(0);std::ios_base::sync_with_stdio(0);
#define str string
#define pb push_back
#define checker cout<<"HERE"<<endl;
#define sz size
#define fr freopen("pails.in","r",stdin);freopen("pails.txt","w",stdout);
#define f first
#define s second
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;

typedef long long ll;
typedef long double ld;

const ll t_max=int(1e9)+7;
const ll MAXX=ll(1e18);
const int INF=int(2e9);

void read(int a[],int n) {forp(i,0,n) cin>>a[i];}

ll binpow (ll a, ll n, ll k)
{
    ll res = 1;
    while (n)
        if (n & 1)
        {
            res *= a;
            res%=k;
            n--;
        }
        else
        {
            a *= a;
            a%=k;
            n >>= 1;
        }
    return res;
}

int main()
{
fast
int n,l,x,y,ans,pos,num=-1;
bool a=0,b=0;
cin>>n>>l>>x>>y;
int mas[n];
read(mas,n);
set<int> s;
forn(i,n){
if (s.count(mas[i]-x)!=0) a=1;
if (s.count(mas[i]-y)!=0) b=1;
s.insert(mas[i]);
}
ans=2-a-b;
if (ans==2){
    forn(i,n){
    pos=mas[i]+x;
    if (pos<=l){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]-x;
    if (pos>=0){
        if((s.count(pos-y)!=0&&pos-y>=0)||(s.count(pos+y)!=0&&pos+y<=l)){num=pos;break;}
    }
    pos=mas[i]+y;
    if (pos<=l){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
    pos=mas[i]-y;
    if (pos>=0){
        if((s.count(pos-x)!=0&&pos-x>=0)||(s.count(pos+x)!=0&&pos+x<=l)){num=pos;break;}
    }
  }
}
if(num!=-1) cout<<1<<'\n'<<num;
else{
    cout<<ans<<'\n';
    if(!a) cout<<x<<' ';
    if(!b) cout<<y<<' ';
}
forn(i,1e6) cout<<'\n';
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ff first
#define se second
#define pb push_back
#define nn 200100
#define mt make_tuple
#define mp make_pair
#define ll long long int
#define db double
#define ld long double
#define inf 1000000000000000000ll
#define logn 20
#define mod 1000000007ll
#define mod1 mod
#define mod2 100000009ll
#define sqr(a) a*1ll*a
#define nullp mp(-1,-1)
#define set0(a) memset(a,0,sizeof a)
#define setm1(a) memset(a,-1,sizeof a)
#define cmp 1e-16
#define endl '\n'

using namespace std;
using namespace __gnu_pbds;

typedef pair<int,int> pii;
typedef pair<ll,int> pli;
typedef pair<int,ll> pil;
typedef pair<ll,ll> pll;
typedef pair<long double,long double> pdd;
template<class T>
using max_pq = priority_queue<T>;
template<class T>
using min_pq = priority_queue<T,vector<T>,greater<T>>;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update> OST;

template<class T> T gcd(T a,T b){return (b==0)?a:gcd(b,a%b);}
ll pow(ll a,ll p,ll m=mod)
{ll res=1;while(p>0){if(p&1)res=(res*a)%m;a=(a*a)%m;p>>=1;}
return res;}

const ld pi=3.141592653589793238462643383;

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

    int n,l,x,y,a;
    cin>>n>>l>>x>>y;
    int h = (y-x);
    int xhai = 0,yhai = 0,hhai = 0;
    map<int,bool> yehai;
    for (int i = 0; i < n; ++i)
    {
    	cin>>a;
    	if(a-x>=0 && yehai[a-x]==1)
    		xhai = a;
    	if(a-y>=0 && yehai[a-y]==1)
    		yhai = a;
    	if(a-h>=0 && yehai[a-h]==1)
    		hhai = a;
    	yehai[a] = 1;
    }

    if(xhai&&yhai)
    	cout<<0<<endl;
    else if(xhai)
    {
    	cout<<1<<endl;
    	cout<<y<<endl;
    }
    else if(yhai)
    {
    	cout<<1<<endl;
    	cout<<x<<endl;
    }
    else if(hhai)
    {
    	cout<<1<<endl;
    	cout<<hhai-y<<endl;
    }
    else
    {
    	cout<<2<<endl;
    	cout<<x<<" "<<y<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ff first
#define se second
#define pb push_back
#define nn 200100
#define mt make_tuple
#define mp make_pair
#define ll long long int
#define db double
#define ld long double
#define inf 1000000000000000000ll
#define logn 20
#define mod 1000000007ll
#define mod1 mod
#define mod2 100000009ll
#define sqr(a) a*1ll*a
#define nullp mp(-1,-1)
#define set0(a) memset(a,0,sizeof a)
#define setm1(a) memset(a,-1,sizeof a)
#define cmp 1e-16
#define endl '\n'

using namespace std;
using namespace __gnu_pbds;

typedef pair<int,int> pii;
typedef pair<ll,int> pli;
typedef pair<int,ll> pil;
typedef pair<ll,ll> pll;
typedef pair<long double,long double> pdd;
template<class T>
using max_pq = priority_queue<T>;
template<class T>
using min_pq = priority_queue<T,vector<T>,greater<T>>;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update> OST;

template<class T> T gcd(T a,T b){return (b==0)?a:gcd(b,a%b);}
ll pow(ll a,ll p,ll m=mod)
{ll res=1;while(p>0){if(p&1)res=(res*a)%m;a=(a*a)%m;p>>=1;}
return res;}

const ld pi=3.141592653589793238462643383;

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

    int n,l,x,y,a;
    cin>>n>>l>>x>>y;
    int h = (y-x),g = (x+y);
    int ghai = 0,xhai = 0,yhai = 0,hhai = 0;
    map<int,bool> yehai;
    for (int i = 0; i < n; ++i)
    {
    	cin>>a;
    	if(a-x>=0 && yehai[a-x]==1)
    		xhai = a;
    	if(a-y>=0 && yehai[a-y]==1)
    		yhai = a;
    	if(a-y>=0 && yehai[a-h]==1)
    		hhai = a;
    	if(a-g>=0 &&yehai[a-g]==1)
    		ghai = a;
    	yehai[a] = 1;
    }

    if(xhai&&yhai)
    	cout<<0<<endl;
    else if(xhai)
    {
    	cout<<1<<endl;
    	cout<<y<<endl;
    }
    else if(yhai)
    {
    	cout<<1<<endl;
    	cout<<x<<endl;
    }
    else if(hhai)
    {
    	cout<<1<<endl;
    	cout<<hhai-y<<endl;
    }
    else if(ghai)
    {
    	cout<<1<<endl;
    	cout<<ghai-y<<endl;
    }
    else
    {
    	cout<<2<<endl;
    	cout<<x<<" "<<y<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ff first
#define se second
#define pb push_back
#define nn 200100
#define mt make_tuple
#define mp make_pair
#define ll long long int
#define db double
#define ld long double
#define inf 1000000000000000000ll
#define logn 20
#define mod 1000000007ll
#define mod1 mod
#define mod2 100000009ll
#define sqr(a) a*1ll*a
#define nullp mp(-1,-1)
#define set0(a) memset(a,0,sizeof a)
#define setm1(a) memset(a,-1,sizeof a)
#define cmp 1e-16
#define endl '\n'

using namespace std;
using namespace __gnu_pbds;

typedef pair<int,int> pii;
typedef pair<ll,int> pli;
typedef pair<int,ll> pil;
typedef pair<ll,ll> pll;
typedef pair<long double,long double> pdd;
template<class T>
using max_pq = priority_queue<T>;
template<class T>
using min_pq = priority_queue<T,vector<T>,greater<T>>;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update> OST;

template<class T> T gcd(T a,T b){return (b==0)?a:gcd(b,a%b);}
ll pow(ll a,ll p,ll m=mod)
{ll res=1;while(p>0){if(p&1)res=(res*a)%m;a=(a*a)%m;p>>=1;}
return res;}

const ld pi=3.141592653589793238462643383;

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

    int n,l,x,y,a;
    cin>>n>>l>>x>>y;
    int h = (y-x),g = (x+y);
    int ghai = 0,xhai = 0,yhai = 0,hhai = 0;
    map<int,bool> yehai;
    for (int i = 0; i < n; ++i)
    {
    	cin>>a;
    	if(a-x>=0 && yehai[a-x]==1)
    		xhai = a;
    	if(a-y>=0 && yehai[a-y]==1)
    		yhai = a;
    	if(a-y>=0 && yehai[a-h]==1)
    		hhai = a;
    	if(a-h>=0 && yehai[a-h]==1&&a-h+y<=l)
    		hhai = a-h+2*y;
    	if(a-g>=0 &&yehai[a-g]==1)
    		ghai = a;
    	yehai[a] = 1;
    }

    if(xhai&&yhai)
    	cout<<0<<endl;
    else if(xhai)
    {
    	cout<<1<<endl;
    	cout<<y<<endl;
    }
    else if(yhai)
    {
    	cout<<1<<endl;
    	cout<<x<<endl;
    }
    else if(hhai)
    {
    	cout<<1<<endl;
    	cout<<hhai-y<<endl;
    }
    else if(ghai)
    {
    	cout<<1<<endl;
    	cout<<ghai-y<<endl;
    }
    else
    {
    	cout<<2<<endl;
    	cout<<x<<" "<<y<<endl;
    }
    return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ff first
#define se second
#define pb push_back
#define nn 200100
#define mt make_tuple
#define mp make_pair
#define ll long long int
#define db double
#define ld long double
#define inf 1000000000000000000ll
#define logn 20
#define mod 1000000007ll
#define mod1 mod
#define mod2 100000009ll
#define sqr(a) a*1ll*a
#define nullp mp(-1,-1)
#define set0(a) memset(a,0,sizeof a)
#define setm1(a) memset(a,-1,sizeof a)
#define cmp 1e-16
#define endl '\n'

using namespace std;
using namespace __gnu_pbds;

typedef pair<int,int> pii;
typedef pair<ll,int> pli;
typedef pair<int,ll> pil;
typedef pair<ll,ll> pll;
typedef pair<long double,long double> pdd;
template<class T>
using max_pq = priority_queue<T>;
template<class T>
using min_pq = priority_queue<T,vector<T>,greater<T>>;
typedef tree<int, null_type, less<int>, rb_tree_tag,
tree_order_statistics_node_update> OST;

template<class T> T gcd(T a,T b){return (b==0)?a:gcd(b,a%b);}
ll pow(ll a,ll p,ll m=mod)
{ll res=1;while(p>0){if(p&1)res=(res*a)%m;a=(a*a)%m;p>>=1;}
return res;}

const ld pi=3.141592653589793238462643383;

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

    int n,l,x,y,a;
    cin>>n>>l>>x>>y;
    int h = (y-x);
    int xhai = 0,yhai = 0,hhai = 0;
    map<int,bool> yehai;
    for (int i = 0; i < n; ++i)
    {
    	cin>>a;
    	if(a-x>=0 && yehai[a-x]==1)
    		xhai = a;
    	if(a-y>=0 && yehai[a-y]==1)
    		yhai = a;
    	if(a-y>=0 && yehai[a-h]==1)
    		hhai = a;
    	yehai[a] = 1;
    }

    if(xhai&&yhai)
    	cout<<0<<endl;
    else if(xhai)
    {
    	cout<<1<<endl;
    	cout<<y<<endl;
    }
    else if(yhai)
    {
    	cout<<1<<endl;
    	cout<<x<<endl;
    }
    else if(hhai)
    {
    	cout<<1<<endl;
    	cout<<hhai-y<<endl;
    }
    else
    {
    	cout<<2<<endl;
    	cout<<x<<" "<<y<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
map<int, int> mp;
int a[10010];
int main() {
    int n, m, x, y, t1 = 0, t2 = 0;
    cin>>n>>m>>x>>y;
    for (int i = 1; i <= n; i++) {
        cin>>a[i];
        if (mp[a[i] - x] && !t1)
            t1 = 1;
        if (mp[a[i] - y] && !t2)
            t2 = 1;
        mp[a[i]] = 1;
    }
    if (t1 && t2)
        return puts("0"), 0;
    int ans = 2 - t1 - t2;
    int d1[3], d2[3];
    for (int i = 1; i <= n; i++) {
        int v = a[i] + x, res = 0;
        if (v > m)
            continue;
        int ok = 1;
        if (!t1) {
            d1[res++] = v;
            if (mp[v - y] || mp[v + y])
                ok = 0;
        }
        if (ok && !t2)
            d1[res++] = y;
        if (res <= ans)
            ans = res, d2[0] =d1[0], d2[1] = d1[1];
    }
    cout<<ans<<endl;
    for (int i = 0; i < ans; i++)
        cout<<d2[i]<<" ";
}


#include <bits/stdc++.h>
using ll = long long;
#define int ll
#define x first
#define y second
#define all(x) x.begin(), x.end()
#define mp make_pair
#define mt make_tuple
using namespace std;

void umin(int &a, int b) {
	a = min(a, b);
}
void umax(int &a, int b) {
	a = max(a, b);
}

int n, k;

bool query(int l, int r) {
	cout << l << " " << r << endl;
	string s;
	cin >> s;
    if (l == r && s == "Yes") {
        exit(0);
    }
	return s == "Yes";
}

signed main() {
#ifdef LC
    assert(freopen("input.txt", "r", stdin));
#endif // LC
    ios::sync_with_stdio(0);
    cin.tie(0);
	cin >> n >> k;
	mt19937 rnd(time(0));
	int l = 1, r = n;
	while (1) {
		while (r - l > 5 * k) {
			int m = (l + r) / 2;
			if (query(l, m)) {
				l = max(l, k + 1) - k;
				r = min(m, n - k) + k;
			} else {
				l = max(m + 1, k + 1) - k;
				r = min(r, n - k) + k;
			}
		}
		int i = l + rnd() % (r - l + 1);
		query(i, i);
        l = max(l, k + 1) - k;
        r = min(r, n - k) + k;
	}
    return 0;
}


#include <bits/stdc++.h>
using ll = long long;
#define int ll
#define x first
#define y second
#define all(x) x.begin(), x.end()
#define mp make_pair
#define mt make_tuple
using namespace std;

void umin(int &a, int b) {
	a = min(a, b);
}
void umax(int &a, int b) {
	a = max(a, b);
}

int n, k;

bool query(int l, int r) {
	cout << l << " " << r << endl;
	string s;
	cin >> s;
	return s == "Yes";
}

signed main() {
#ifdef LC
    assert(freopen("input.txt", "r", stdin));
#endif // LC
    ios::sync_with_stdio(0);
    cin.tie(0);
	cin >> n >> k;
	mt19937 rnd;
	int l = 1, r = n;
	while (1) {
		while (r - l > 5 * k) {
			int m = (l + r) / 2;
			if (query(l, m)) {
				l = max(l, k + 1) - k;
				r = min(m, n - k) + k;
			} else {
				l = max(m, k + 1) - k;
				r = min(r, n - k) + k;
			}
		}
		int i = l + rnd() % (r - l + 1);
		if (query(i, i)) {
			return 0;
		} else {
			l = max(l, k + 1) - k;
			r = min(r, n - k) + k;
		}
	}
    return 0;
}


#include <bits/stdc++.h>
using ll = long long;
#define int ll
#define x first
#define y second
#define all(x) x.begin(), x.end()
#define mp make_pair
#define mt make_tuple
using namespace std;

void umin(int &a, int b) {
	a = min(a, b);
}
void umax(int &a, int b) {
	a = max(a, b);
}

int n, k;

bool query(int l, int r) {
	cout << l << " " << r << endl;
	string s;
	cin >> s;
	return s == "Yes";
}

signed main() {
#ifdef LC
    assert(freopen("input.txt", "r", stdin));
#endif // LC
    ios::sync_with_stdio(0);
    cin.tie(0);
	cin >> n >> k;
	mt19937 rnd;
	int l = 1, r = n;
	while (1) {
		while (r - l + 1 > 5 * k) {
			int m = (l + r) / 2;
			if (query(l, m)) {
				l = max(l, k + 1) - k;
				r = min(m, n - k) + k;
			} else {
				l = max(m, k + 1) - k;
				r = min(r, n - k) + k;
			}
		}
		int i = l + rnd() % (r - l + 1);
		if (query(i, i)) {
			return 0;
		} else {
			l = max(l, k + 1) - k;
			r = min(r, n - k) + k;
		}
	}
    return 0;
}


#include <bits/stdc++.h>
using ll = long long;
#define int ll
#define x first
#define y second
#define all(x) x.begin(), x.end()
#define mp make_pair
#define mt make_tuple
using namespace std;

void umin(int &a, int b) {
	a = min(a, b);
}
void umax(int &a, int b) {
	a = max(a, b);
}

int n, k;

bool query(int l, int r) {
	cout << l << " " << r << endl;
	string s;
	cin >> s;
    if (l == r && s == "Yes") {
        exit(0);
    }
	return s == "Yes";
}

signed main() {
#ifdef LC
    assert(freopen("input.txt", "r", stdin));
#endif // LC
    ios::sync_with_stdio(0);
    cin.tie(0);
	cin >> n >> k;
	mt19937 rnd;
	int l = 1, r = n;
	while (1) {
		while (r - l > 5 * k) {
			int m = (l + r) / 2;
			if (query(l, m)) {
				l = max(l, k + 1) - k;
				r = min(m, n - k) + k;
			} else {
				l = max(m + 1, k + 1) - k;
				r = min(r, n - k) + k;
			}
		}
		int i = l + rnd() % (r - l + 1);
		query(i, i);
        l = max(l, k + 1) - k;
        r = min(r, n - k) + k;
	}
    return 0;
}


#include <bits/stdc++.h>
using ll = long long;
#define int ll
#define x first
#define y second
#define all(x) x.begin(), x.end()
#define mp make_pair
#define mt make_tuple
using namespace std;

void umin(int &a, int b) {
	a = min(a, b);
}
void umax(int &a, int b) {
	a = max(a, b);
}

int n, k;

bool query(int l, int r) {
	cout << l << " " << r << endl;
	string s;
	cin >> s;
	return s == "Yes";
}

signed main() {
#ifdef LC
    assert(freopen("input.txt", "r", stdin));
#endif // LC
    ios::sync_with_stdio(0);
    cin.tie(0);
	cin >> n >> k;
	mt19937 rnd;
	int l = 1, r = n;
	while (1) {
		while (r - l > 5 * k) {
			int m = (l + r) / 2;
			if (query(l, m)) {
				l = max(l, k + 1) - k;
				r = min(m, n - k) + k;
			} else {
				l = max(m + 1, k + 1) - k;
				r = min(r, n - k) + k;
			}
		}
		int i = l + rnd() % (r - l + 1);
		if (query(i, i)) {
			return 0;
		} else {
			l = max(l, k + 1) - k;
			r = min(r, n - k) + k;
		}
	}
    return 0;
}


#include <bits/stdc++.h>
using ll = long long;
#define int ll
#define x first
#define y second
#define all(x) x.begin(), x.end()
#define mp make_pair
#define mt make_tuple
using namespace std;

void umin(int &a, int b) {
	a = min(a, b);
}
void umax(int &a, int b) {
	a = max(a, b);
}

int n, k;

bool query(int l, int r) {
	cout << l << " " << r << endl;
	string s;
	cin >> s;
	return s == "Yes";
}

signed main() {
#ifdef LC
    assert(freopen("input.txt", "r", stdin));
#endif // LC
    ios::sync_with_stdio(0);
    cin.tie(0);
	cin >> n >> k;
	mt19937 rnd;
	int l = 1, r = n;
	while (1) {
		while (r - l + 1 >= 5 * k) {
			int m = (l + r) / 2;
			if (query(l, m)) {
				l = max(l, k + 1) - k;
				r = min(m, n - k) + k;
			} else {
				l = max(m, k + 1) - k;
				r = min(r, n - k) + k;
			}
		}
		l = r = l + rnd() % (r - l + 1);
		if (query(l, r)) {
			return 0;
		} else {
			l = max(l, k + 1) - k;
			r = min(r, n - k) + k;
		}
	}
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define all(v) (v).begin(), (v).end()
#define sz(v) (int)(v).size()

typedef long long ll;
typedef pair<int, int> pii;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

ll n;
int k;

char res[10];

bool ask(ll l, ll r) {
    printf("%lld %lld\n", l, r);
    fflush(stdout);
    scanf("%s", res);
    return res[0] == 'Y';
}

void getsmall(ll sl, ll sr, ll & l, ll & r) {
    while(sr - sl > 2 * k) {
        ll sm = (sl + sr) / 2;
        if (ask(sl, sm)) {
            sl = sl - k;
            sr = sm + k;
        } else {
            sl = sm - k;
            sr = sr + k;
        }
        sl = max(1LL, sl);
        sr = min(n, sr);
    }
    l = sl;
    r = sr;
}

int main()
{

#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
#endif

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

    ll sl = 1, sr = n;

    while(true) {
        ll l, r;
        getsmall(sl, sr, l, r);
        ll x = l + rng() % (r - l + 1);
        if (ask(x, x))
            return 0;
        sl = max(1LL, l - k);
        sr = min(n, l + k);
    }

}


#include <bits/stdc++.h>

using namespace std;

#define all(v) (v).begin(), (v).end()
#define sz(v) (int)(v).size()

typedef long long ll;
typedef pair<int, int> pii;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

ll n;
int k;

char res[10];
int Q = 4500;

bool ask(ll l, ll r) {
    --Q;
    if (Q == 0) {
        printf("1 1\n");
        return 0;
    }
    printf("%lld %lld\n", l, r);
    fflush(stdout);
    scanf("%s", res);
    return res[0] == 'Y';
}

void getsmall(ll sl, ll sr, ll & l, ll & r) {
    while(sr - sl > 100) {
        ll sm = (sl + sr) / 2;
        if (ask(sl, sm)) {
            sl = sl - k;
            sr = sm + k;
        } else {
            sl = sm - k;
            sr = sr + k;
        }
        sl = max(1LL, sl);
        sr = min(n, sr);
    }
    l = sl;
    r = sr;
}

int main()
{

#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
#endif

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

    ll sl = 1, sr = n;

    while(true) {
        ll l, r;
        getsmall(sl, sr, l, r);
        ll x = l + rng() % (r - l + 1);
        if (ask(x, x))
            return 0;
        sl = max(1LL, l - k);
        sr = min(n, r + k);
    }

}


#include <bits/stdc++.h>

using namespace std;

#define all(v) (v).begin(), (v).end()
#define sz(v) (int)(v).size()

typedef long long ll;
typedef pair<int, int> pii;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

ll n;
int k;

char res[10];
int Q = 4500;

bool ask(ll l, ll r) {
    --Q;
    if (Q == 0) {
        printf("1 1\n");
        return 0;
    }
    printf("%lld %lld\n", l, r);
    fflush(stdout);
    scanf("%s", res);
    return res[0] == 'Y';
}

void getsmall(ll sl, ll sr, ll & l, ll & r) {
    while(sr - sl > 100) {
        ll sm = (sl + sr) / 2;
        if (ask(sl, sm)) {
            sl = sl - k;
            sr = sm + k;
        } else {
            sl = sm - k;
            sr = sr + k;
        }
        sl = max(1LL, sl);
        sr = min(n, sr);
    }
    l = sl;
    r = sr;
}

int main()
{

#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
#endif

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

    ll sl = 1, sr = n;

    while(true) {
        ll l, r;
        getsmall(sl, sr, l, r);
        ll x = l + rng() % (r - l + 1);
        if (ask(x, x))
            return 0;
        sl = max(1LL, l - k);
        sr = min(n, l + k);
    }

}


#include <bits/stdc++.h>

using namespace std;

#define all(v) (v).begin(), (v).end()
#define sz(v) (int)(v).size()

typedef long long ll;
typedef pair<int, int> pii;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

ll n;
int k;

char res[10];
int Q = 4500;

bool ask(ll l, ll r) {
    --Q;
    if (Q == 0) {
        printf("1 1\n");
        return 0;
    }
    printf("%lld %lld\n", l, r);
    fflush(stdout);
    scanf("%s", res);
    return res[0] == 'Y';
}

void getsmall(ll sl, ll sr, ll & l, ll & r) {
    while(sr - sl > 2 * k + 1) {
        ll sm = (sl + sr) / 2;
        if (ask(sl, sm)) {
            sl = sl - k;
            sr = sm + k;
        } else {
            sl = sm - k;
            sr = sr + k;
        }
        sl = max(1LL, sl);
        sr = min(n, sr);
    }
    l = sl;
    r = sr;
}

int main()
{

#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
#endif

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

    ll sl = 1, sr = n;

    while(true) {
        ll l, r;
        getsmall(sl, sr, l, r);
        printf("hui\n");
        ll x = l + rng() % (r - l + 1);
        if (ask(x, x))
            return 0;
        sl = max(1LL, l - k);
        sr = min(n, l + k);
    }

}


#include <bits/stdc++.h>

using namespace std;

#define all(v) (v).begin(), (v).end()
#define sz(v) (int)(v).size()

typedef long long ll;
typedef pair<int, int> pii;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

ll n;
int k;

char res[10];

bool ask(ll l, ll r) {
    printf("%lld %lld\n", l, r);
    fflush(stdout);
    scanf("%s", res);
    return res[0] == 'Y';
}

void getsmall(ll sl, ll sr, ll & l, ll & r) {
    while(sr - sl > 2 * k) {
        ll sm = (sl + sr) / 2;
        if (ask(sl, sm)) {
            sl = sl - k;
            sr = sm + k;
        } else {
            sl = sm - k;
            sr = sm + k;
        }
        sl = max(1LL, sl);
        sr = min(n, sr);
    }
    l = sl;
    r = sr;
}

int main()
{

#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
#endif

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

    ll sl = 1, sr = n;

    while(true) {
        ll l, r;
        getsmall(sl, sr, l, r);
        ll x = l + rng() % (r - l + 1);
        if (ask(x, x))
            return 0;
        sl = max(1LL, sl - k);
        sr = min(n, sr + k);
    }

}


#include <bits/stdc++.h>

using namespace std;

#define all(v) (v).begin(), (v).end()
#define sz(v) (int)(v).size()

typedef long long ll;
typedef pair<int, int> pii;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

ll n;
int k;

char res[10];

bool ask(ll l, ll r) {
    printf("%lld %lld\n", l, r);
    fflush(stdout);
    scanf("%s", res);
    return res[0] == 'Y';
}

void getsmall(ll sl, ll sr, ll & l, ll & r) {
    while(sr - sl > 2 * k + 1) {
        ll sm = (sl + sr) / 2;
        if (ask(sl, sm)) {
            sl = sl - k;
            sr = sm + k;
        } else {
            sl = sm - k;
            sr = sr + k;
        }
        sl = max(1LL, sl);
        sr = min(n, sr);
    }
    l = sl;
    r = sr;
}

int main()
{

#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
#endif

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

    ll sl = 1, sr = n;

    while(true) {
        ll l, r;
        getsmall(sl, sr, l, r);
        ll x = l + rng() % (r - l + 1);
        if (ask(x, x))
            return 0;
        sl = max(1LL, l - k);
        sr = min(n, l + k);
    }

}


#include <bits/stdc++.h>

using namespace std;

#define all(v) (v).begin(), (v).end()
#define sz(v) (int)(v).size()

typedef long long ll;
typedef pair<int, int> pii;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

ll n;
int k;

char res[10];

bool ask(ll l, ll r) {
    printf("%lld %lld\n", l, r);
    fflush(stdout);
    scanf("%s", res);
    return res[0] == 'Y';
}

void getsmall(ll sl, ll sr, ll & l, ll & r) {
    while(sr - sl > k + 2) {
        ll sm = (sl + sr) / 2;
        if (ask(sl, sm)) {
            sm = min(n, sm + k - 1);
        } else {
            sl = max(1LL, sm - k + 1);
        }
    }
    l = sl;
    r = sr;
}

int main()
{

#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
#endif

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

    ll sl = 1, sr = n;

    while(true) {
        ll l, r;
        getsmall(sl, sr, l, r);
        ll x = l + rng() % (r - l + 1);
        if (ask(x, x))
            return 0;
        sl = max(1LL, sl - k);
        sr = min(n, sr + k);
    }

}


#include <bits/stdc++.h>

using namespace std;

#define all(v) (v).begin(), (v).end()
#define sz(v) (int)(v).size()

typedef long long ll;
typedef pair<int, int> pii;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

ll n;
int k;

char res[10];
int Q = 4500;

bool ask(ll l, ll r) {
    --Q;
    if (Q == 0) {
        printf("1 1\n");
        return 0;
    }
    printf("%lld %lld\n", l, r);
    fflush(stdout);
    scanf("%s", res);
    return res[0] == 'Y';
}

void getsmall(ll sl, ll sr, ll & l, ll & r) {
    while(sr - sl > 4 * k + 5) {
        ll sm = (sl + sr) / 2;
        if (ask(sl, sm)) {
            sl = sl - k;
            sr = sm + k;
        } else {
            sl = sm - k;
            sr = sr + k;
        }
        sl = max(1LL, sl);
        sr = min(n, sr);
    }
    l = sl;
    r = sr;
}

int main()
{

#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
#endif

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

    ll sl = 1, sr = n;

    while(true) {
        ll l, r;
        getsmall(sl, sr, l, r);
        ll x = l + rng() % (r - l + 1);
        if (ask(x, x))
            return 0;
        sl = max(1LL, l - k);
        sr = min(n, r + k);
    }

}


#include <bits/stdc++.h>

using namespace std;

#define all(v) (v).begin(), (v).end()
#define sz(v) (int)(v).size()

typedef long long ll;
typedef pair<int, int> pii;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

ll n;
int k;

char res[10];
int Q = 4500;

bool ask(ll l, ll r) {
    --Q;
    if (Q == 0) {
        printf("1 1\n");
        return 0;
    }
    printf("%lld %lld\n", l, r);
    fflush(stdout);
    scanf("%s", res);
    return res[0] == 'Y';
}

void getsmall(ll sl, ll sr, ll & l, ll & r) {
    while(sr - sl > 2 * k + 1) {
        ll sm = (sl + sr) / 2;
        if (ask(sl, sm)) {
            sl = sl - k;
            sr = sm + k;
        } else {
            sl = sm - k;
            sr = sr + k;
        }
        sl = max(1LL, sl);
        sr = min(n, sr);
    }
    l = sl;
    r = sr;
}

int main()
{

#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
#endif

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

    ll sl = 1, sr = n;

    while(true) {
        ll l, r;
        getsmall(sl, sr, l, r);
        if (n > 20)
            printf("hui\n");
        ll x = l + rng() % (r - l + 1);
        if (ask(x, x))
            return 0;
        sl = max(1LL, l - k);
        sr = min(n, l + k);
    }

}


#include <bits/stdc++.h>

using namespace std;

#define all(v) (v).begin(), (v).end()
#define sz(v) (int)(v).size()

typedef long long ll;
typedef pair<int, int> pii;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

ll n;
int k;

char res[10];
int Q = 4500;

bool ask(ll l, ll r) {
    --Q;
    if (Q == 0) {
        printf("1 1\n");
        return 0;
    }
    printf("%lld %lld\n", l, r);
    fflush(stdout);
    scanf("%s", res);
    return res[0] == 'Y';
}

void getsmall(ll sl, ll sr, ll & l, ll & r) {
    while(sr - sl > 30) {
        ll sm = (sl + sr) / 2;
        if (ask(sl, sm)) {
            sl = sl - k;
            sr = sm + k;
        } else {
            sl = sm - k;
            sr = sr + k;
        }
        sl = max(1LL, sl);
        sr = min(n, sr);
    }
    l = sl;
    r = sr;
}

int main()
{

#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
#endif

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

    ll sl = 1, sr = n;

    while(true) {
        ll l, r;
        getsmall(sl, sr, l, r);
        ll x = l + rng() % (r - l + 1);
        if (ask(x, x))
            return 0;
        sl = max(1LL, l - k);
        sr = min(n, l + k);
    }

}


#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <map>
#include <math.h>
#include <random>
using namespace std;
typedef long long int ll;

random_device rnd;
mt19937 mt(rnd());

bool query(ll l,ll r){
	cout << l << " " << r << endl;
	string s; cin >> s;
	if(s=="Yes"){
		if(l==r){
			exit(0);
		}
		else{
			return true;
		}
	}
	else{
		return false;
	}
}

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	ll n; int k; cin >> n >> k;
	ll le=1,ri=n;
	while(1){
		while(ri-le>45){
			ll mid=(le+ri)/2;
			if(query(mid,ri)){
				le=mid;
			}
			else{
				ri=mid-1;
			}
			le=max(1LL,le-k);
			ri=min(n,ri+k);
		}
		ll p=mt();
		if(p<0)p=-p;
		ll q=le+p%(ri-le+1);
		query(q,q);
		le=max(1LL,le-k);
		ri=min(n,ri+k);
	}
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <map>
#include <math.h>
#include <random>
using namespace std;
typedef long long int ll;

random_device rnd;
mt19937 mt(rnd());

bool query(ll l,ll r){
	cout << l << " " << r << endl;
	string s; cin >> s;
	if(s=="Yes"){
		if(l==r){
			exit(0);
		}
		else{
			return true;
		}
	}
	else{
		return false;
	}
}

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	ll n; int k; cin >> n >> k;
	ll le=1,ri=n;
	while(1){
		while(ri-le>50){
			ll mid=(le+ri)/2;
			if(query(mid,ri)){
				le=max(1LL,mid-k);
			}
			else{
				ri=min(n,mid+k);
			}
		}
		ll p=mt();
		if(p<0)p=-p;
		ll q=le+p%(ri-le+1);
		query(q,q);
		le=max(1LL,le-k);
		ri=min(n,ri+k);
	}
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <map>
#include <math.h>
#include <random>
using namespace std;
typedef long long int ll;

random_device rnd;
mt19937 mt(rnd());

bool query(ll l,ll r){
	cout << l << " " << r << endl;
	string s; cin >> s;
	if(s=="Yes"){
		if(l==r){
			exit(0);
		}
		else{
			return true;
		}
	}
	else{
		return false;
	}
}

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	ll n; int k; cin >> n >> k;
	ll le=1,ri=n;
	while(1){
		while(ri-le>50){
			ll mid=(le+ri)/2;
			if(query(mid,ri)){
				le=max(1LL,mid-10);
			}
			else{
				ri=min(n,mid+10);
			}
		}
		ll p=mt();
		if(p<0)p=-p;
		ll q=le+p%(ri-le+1);
		query(q,q);
	}
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <map>
#include <math.h>
#include <random>
using namespace std;
typedef long long int ll;

random_device rnd;
mt19937 mt(rnd());

bool query(ll l,ll r){
	cout << l << " " << r << endl;
	string s; cin >> s;
	if(s=="Yes"){
		if(l==r){
			exit(0);
		}
		else{
			return true;
		}
	}
	else{
		return false;
	}
}

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	ll n; int k; cin >> n >> k;
	ll le=1,ri=n;
	while(1){
		while(ri-le>50){
			ll mid=(le+ri)/2;
			if(query(mid,ri)){
				le=max(1LL,mid-k);
			}
			else{
				ri=min(n,mid+k);
			}
		}
		ll p=mt();
		if(p<0)p=-p;
		ll q=le+p%(ri-le+1);
		query(q,q);
		le=max(1LL,mid-k);
		ri=min(n,mid+k);
	}
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <map>
#include <math.h>
#include <random>
using namespace std;
typedef long long int ll;

random_device rnd;
mt19937 mt(rnd());

bool query(ll l,ll r){
	cout << l << " " << r << endl;
	string s; cin >> s;
	if(s=="Yes"){
		if(l==r){
			exit(0);
		}
		else{
			return true;
		}
	}
	else{
		return false;
	}
}

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	ll n; int k; cin >> n >> k;
	ll le=1,ri=n;
	while(1){
		while(ri-le>40){
			ll mid=(le+ri)/2;
			if(query(mid,ri)){
				le=max(1LL,mid-10);
			}
			else{
				ri=min(n,mid+10);
			}
		}
		ll p=mt();
		if(p<0)p=-p;
		ll q=le+p%(ri-le+1);
		query(q,q);
	}
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <map>
#include <math.h>
#include <random>
using namespace std;
typedef long long int ll;

random_device rnd;
mt19937 mt(rnd());

bool query(ll l,ll r){
	cout << l << " " << r << endl;
	string s; cin >> s;
	if(s=="Yes"){
		if(l==r){
			exit(0);
		}
		else{
			return true;
		}
	}
	else{
		return false;
	}
}

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	ll n; int k; cin >> n >> k;
	ll le=1,ri=n;
	while(1){
		while(ri-le>44){
			ll mid=(le+ri)/2;
			if(query(mid,ri)){
				le=max(1LL,mid-k);
			}
			else{
				ri=min(n,mid+k);
			}
		}
		ll p=mt();
		if(p<0)p=-p;
		ll q=le+p%(ri-le+1);
		query(q,q);
		le=max(1LL,le-k);
		ri=min(n,ri+k);
	}
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const int N = 1e6+50;
const int M = 1e6;
const ll oo = 1e18;
const int mod = 1e9+7;

int ask(ll l,ll r){
	cout << l << ' ' << r << endl;
	fflush(stdout);
	string res;
	cin>>res;
	return res == "Yes";
}

int main(){
	#ifndef ONLINE_JUDGE
		// freopen("input.txt","r",stdin);
	#endif
	srand(time(0));
	ll n,k;
	cin>>n>>k;
	ll md,lo=1,hi=n;
	while(1){
		ll md = (lo+hi+1)/2;
		if(hi - lo <= max(4*k,0ll)){
			ll q = lo + (rand()%(hi-lo+1));
			if(ask(q,q))break;
			else{
				lo = max(1ll,lo-k);
				hi = min(n,hi+k);
			}
			continue;
		}
		if(ask(lo,md)){
			lo = max(1ll,lo-k);
			hi = min(n,md+k);
		}else{
			lo = max(1ll,md-k);
			hi = min(n,hi+k);
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const int N = 1e6+50;
const int M = 1e6;
const ll oo = 1e18;
const int mod = 1e9+7;

int ask(int l,int r){
	cout << l << ' ' << r << endl;
	fflush(stdout);
	string res;
	cin>>res;
	return res == "Yes";
}

int main(){
	#ifndef ONLINE_JUDGE
		// freopen("input.txt","r",stdin);
	#endif
	srand(time(0));
	ll n,k;
	cin>>n>>k;
	ll md,lo=1,hi=n;
	while(1){
		ll md = (lo+hi)/2;
		if(hi - lo <= 4*k){
			ll q = rand()%lo + lo;
			if(ask(q,q))break;
			else{
				lo = max(1ll,lo-k);
				hi = min(n,hi+k);
			}
			continue;
		}
		if(ask(lo,md)){
			lo = max(1ll,lo-k);
			hi = min(n,md+k);
		}else{
			lo = max(1ll,md-k);
			hi = min(n,hi+k);
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const int N = 1e6+50;
const int M = 1e6;
const ll oo = 1e18;
const int mod = 1e9+7;

int ask(int l,int r){
	cout << l << ' ' << r << endl;
	fflush(stdout);
	string res;
	cin>>res;
	return res == "Yes";
}

int main(){
	#ifndef ONLINE_JUDGE
		// freopen("input.txt","r",stdin);
	#endif
	srand(time(0));
	ll n,k;
	cin>>n>>k;
	ll md,lo=1,hi=n;
	while(1){
		ll md = (lo+hi)/2;
		if(hi - lo <= 4*k){
			ll q = lo + rand()%(hi-lo);
			if(ask(q,q))break;
			else{
				lo = max(1ll,lo-k);
				hi = min(n,hi+k);
			}
			continue;
		}
		if(ask(lo,md)){
			lo = max(1ll,lo-k);
			hi = min(n,md+k);
		}else{
			lo = max(1ll,md-k);
			hi = min(n,hi+k);
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const int N = 1e6+50;
const int M = 1e6;
const ll oo = 1e18;
const int mod = 1e9+7;

int ask(int l,int r){
	cout << l << ' ' << r << endl;
	fflush(stdout);
	string res;
	cin>>res;
	return res == "Yes";
}

int main(){
	#ifndef ONLINE_JUDGE
		// freopen("input.txt","r",stdin);
	#endif
	srand(time(0));
	ll n,k;
	cin>>n>>k;
	ll md,lo=1,hi=n;
	while(1){
		ll md = (lo+hi)/2;
		if(hi - lo <= 4*k){
			ll q = lo + (rand()%(hi-lo+1));
			if(ask(q,q))break;
			else{
				lo = max(1ll,lo-k);
				hi = min(n,hi+k);
			}
			continue;
		}
		if(ask(lo,md)){
			lo = max(1ll,lo-k);
			hi = min(n,md+k);
		}else{
			lo = max(1ll,md-k);
			hi = min(n,hi+k);
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const int N = 1e6+50;
const int M = 1e6;
const ll oo = 1e18;
const int mod = 1e9+7;

int ask(ll l,ll r){
	cout << l << ' ' << r << endl;
	fflush(stdout);
	string res;
	cin>>res;
	return res == "Yes";
}

int main(){
	#ifndef ONLINE_JUDGE
		// freopen("input.txt","r",stdin);
	#endif
	srand(time(0));
	ll n,k;
	cin>>n>>k;
	ll md,lo=1,hi=n;
	while(1){
		ll md = (lo+hi)/2;
		if(hi - lo <= max(4*k,2ll)){
			ll q = lo + (rand()%(hi-lo+1));
			if(ask(q,q))break;
			else{
				lo = max(1ll,lo-k);
				hi = min(n,hi+k);
			}
			continue;
		}
		if(ask(lo,md)){
			lo = max(1ll,lo-k);
			hi = min(n,md+k);
		}else{
			lo = max(1ll,md-k);
			hi = min(n,hi+k);
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const int N = 1e6+50;
const int M = 1e6;
const ll oo = 1e18;
const int mod = 1e9+7;

int ask(ll l,ll r){
	cout << l << ' ' << r << endl;
	fflush(stdout);
	string res;
	cin>>res;
	return res == "Yes";
}

int main(){
	#ifndef ONLINE_JUDGE
		// freopen("input.txt","r",stdin);
	#endif
	srand(time(0));
	ll n,k;
	cin>>n>>k;
	ll md,lo=1,hi=n;
	while(1){
		ll md = (lo+hi+1)/2;
		if(hi - lo <= max(4*k,2ll)){
			ll q = lo + (rand()%(hi-lo+1));
			if(ask(q,q))break;
			else{
				lo = max(1ll,lo-k);
				hi = min(n,hi+k);
			}
			continue;
		}
		if(ask(lo,md)){
			lo = max(1ll,lo-k);
			hi = min(n,md+k);
		}else{
			lo = max(1ll,md-k);
			hi = min(n,hi+k);
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const int N = 1e6+50;
const int M = 1e6;
const ll oo = 1e18;
const int mod = 1e9+7;

int ask(int l,int r){
	cout << l << ' ' << r << endl;
	fflush(stdout);
	string res;
	cin>>res;
	return res == "Yes";
}

int main(){
	#ifndef ONLINE_JUDGE
		// freopen("input.txt","r",stdin);
	#endif
	srand(time(0));
	ll n,k;
	cin>>n>>k;
	ll md,lo=1,hi=n;
	while(1){
		ll md = (lo+hi)/2;
		if(hi - lo <= 4*k){
			ll q = lo + (rand()%(hi-lo+1)) - 1;
			if(ask(q,q))break;
			else{
				lo = max(1ll,lo-k);
				hi = min(n,hi+k);
			}
			continue;
		}
		if(ask(lo,md)){
			lo = max(1ll,lo-k);
			hi = min(n,md+k);
		}else{
			lo = max(1ll,md-k);
			hi = min(n,hi+k);
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const int N = 1e6+50;
const int M = 1e6;
const ll oo = 1e18;
const int mod = 1e9+7;

int ask(int l,int r){
	cout << l << ' ' << r << endl;
	fflush(stdout);
	string res;
	cin>>res;
	return res == "Yes";
}

int main(){
	#ifndef ONLINE_JUDGE
		// freopen("input.txt","r",stdin);
	#endif
	srand(time(0));
	ll n,k;
	cin>>n>>k;
	ll md,lo=1,hi=n;
	while(1){
		ll md = (lo+hi)/2;
		if(hi - lo <= max(4*k,2ll)){
			ll q = lo + (rand()%(hi-lo+1));
			if(ask(q,q))break;
			else{
				lo = max(1ll,lo-k);
				hi = min(n,hi+k);
			}
			continue;
		}
		if(ask(lo,md)){
			lo = max(1ll,lo-2*k);
			hi = min(n,md+2*k);
		}else{
			lo = max(1ll,md-2*k);
			hi = min(n,hi+2*k);
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const int N = 1e6+50;
const int M = 1e6;
const ll oo = 1e18;
const int mod = 1e9+7;

int ask(int l,int r){
	cout << l << ' ' << r << endl;
	fflush(stdout);
	string res;
	cin>>res;
	return res == "Yes";
}

int main(){
	#ifndef ONLINE_JUDGE
		// freopen("input.txt","r",stdin);
	#endif
	srand(time(0));
	ll n,k;
	cin>>n>>k;
	ll md,lo=1,hi=n;
	while(1){
		ll md = (lo+hi)/2;
		if(hi - lo <= max(4*k,2ll)){
			ll q = lo + (rand()%(hi-lo+1));
			if(ask(q,q))break;
			else{
				lo = max(1ll,lo-k);
				hi = min(n,hi+k);
			}
			continue;
		}
		if(ask(lo,md)){
			lo = max(1ll,lo-k-1);
			hi = min(n,md+k+1);
		}else{
			lo = max(1ll,md-k-1);
			hi = min(n,hi+k+1);
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const int N = 1e6+50;
const int M = 1e6;
const ll oo = 1e18;
const int mod = 1e9+7;

int ask(int l,int r){
	cout << l << ' ' << r << endl;
	fflush(stdout);
	string res;
	cin>>res;
	return res == "Yes";
}

int main(){
	#ifndef ONLINE_JUDGE
		// freopen("input.txt","r",stdin);
	#endif
	srand(time(0));
	ll n,k;
	cin>>n>>k;
	ll md,lo=1,hi=n;
	while(1){
		ll md = (lo+hi)/2;
		if(hi - lo <= max(4*k,2ll)){
			ll q = lo + (rand()%(hi-lo+1));
			if(ask(q,q))break;
			else{
				lo = max(1ll,lo-k);
				hi = min(n,hi+k);
			}
			continue;
		}
		if(ask(lo,md)){
			lo = max(1ll,lo-k);
			hi = min(n,md+k);
		}else{
			lo = max(1ll,md-k);
			hi = min(n,hi+k);
		}
	}
}


#include <bits/stdc++.h>

#define ll long long
#define ld long double
#define vll vector <ll>
#define vvll vector <vll>
#define pll pair <ll, ll>

#define rep(i, a, b) for(ll i = a; i < b; i++)
#define per(i, a, b) for(ll i = a - 1; i >= b; --i)

#define endl "\n"
#define pb push_back
#define pf push_front

#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()

#define sorta(v) sort(all(v))
#define sortd(v) sort(rall(v))

#define ios ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;
char ans[10];

bool check(long long l,long long r){
	cout << l << " " << r << endl;
    cout.flush();
	cin >> ans;
	return ans[0] == 'Y';
}

int main() {
    srand(time(0));

    ll n, k;
    cin >> n >> k;

    ll l = 1, r = n;

    while(true) {
        l = max(1LL, l - k);
        r = min(n, r + k);
        if(r - l + 1 <= 4 * k) {
            ll cur = rand() % (r - l + 1) + l;
            assert(cur <= r);
            if(check(cur, cur)) return 0;
            continue;
        }

        ll m = (l + r) / 2;

        if(check(l, m)) {
            r = m;
        } else {
            l = m + 1;
        }
    }

    return 0;
}


#include <bits/stdc++.h>

#define ll long long
#define ld long double
#define vll vector <ll>
#define vvll vector <vll>
#define pll pair <ll, ll>

#define rep(i, a, b) for(ll i = a; i < b; i++)
#define per(i, a, b) for(ll i = a - 1; i >= b; --i)

#define endl "\n"
#define pb push_back
#define pf push_front

#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()

#define sorta(v) sort(all(v))
#define sortd(v) sort(rall(v))

#define ios ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;
char ans[10];

bool check(long long l,long long r){
	cout << l << " " << r << endl;
    cout.flush();
	cin >> ans;
	return ans[0] == 'Y';
}

int main() {
    srand(time(0));

    ll n, k;
    cin >> n >> k;

    ll l = 1, r = n;
    ll fk = 4 * k;
    while(true) {
        l = max(1LL, l - k);
        r = min(n, r + k);
        if(r - l + 1 <= fk + 5) {
            ll cur = rand() % (r - l + 1) + l;
            assert(cur <= r);
            if(check(cur, cur)) return 0;
            continue;
        }

        ll m = l+r>>1;

        if(check(l, m)) {
            r = m;
        } else {
            l = m + 1;
        }
    }

    return 0;
}


#include <bits/stdc++.h>

#define ll long long
#define ld long double
#define vll vector <ll>
#define vvll vector <vll>
#define pll pair <ll, ll>

#define rep(i, a, b) for(ll i = a; i < b; i++)
#define per(i, a, b) for(ll i = a - 1; i >= b; --i)

#define endl "\n"
#define pb push_back
#define pf push_front

#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()

#define sorta(v) sort(all(v))
#define sortd(v) sort(rall(v))

#define ios ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;

map<ll, ll> mp;

char ans[10];

int main() {

    ll n, k;
    cin >> n >> k;

    ll l = 1, r = n;
    srand(time(0));

    while(true) {
        if(r - l + 1 <= 4 * k) {
            ll cur = rand() % (r - l + 1) + l;
            assert(cur <= r);
            printf("%lld%lld\n", cur, cur);
            cout.flush();
            scanf("%s", ans);
            if(ans == "Bad") return 0;
            if(ans == "Yes") return 0;
            else {
                l = max(1LL, l - k);
                r = min(n, r + k);
            }
        }

        ll m = (l + r) / 2;

        printf("%lld%lld\n", &l, &m);
        cout.flush();
        scanf("%s", ans);
        if(ans == "Bad") return 0;
        if(ans == "Yes") {
            l = max(l - k, 1LL);
            r = min(m + k, n);
        } else {
            l = max(m + 1 - k, 1LL);
            r = min(r + k, n);
        }
    }

    return 0;
}


#include <bits/stdc++.h>

#define ll long long
#define ld long double
#define vll vector <ll>
#define vvll vector <vll>
#define pll pair <ll, ll>

#define rep(i, a, b) for(ll i = a; i < b; i++)
#define per(i, a, b) for(ll i = a - 1; i >= b; --i)

#define endl "\n"
#define pb push_back
#define pf push_front

#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()

#define sorta(v) sort(all(v))
#define sortd(v) sort(rall(v))

#define ios ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;
char ans[10];

bool check(long long l,long long r){
	cout << l << " " << r << endl;
    cout.flush();
	cin >> ans;
	return ans[0] == 'Y';
}

int main() {
    srand(time(0));

    ll n, k;
    cin >> n >> k;

    ll l = 1, r = n;
    ll fk = 4 * k;
    while(true) {
        l = max(1LL, l - k);
        r = min(n, r + k);
        if(r - l + 1 <= f) {
            ll cur = rand() % (r - l + 1) + l;
            assert(cur <= r);
            if(check(cur, cur)) return 0;
            continue;
        }

        ll m = l+r>>1;

        if(check(l, m)) {
            r = m;
        } else {
            l = m + 1;
        }
    }

    return 0;
}