/***from dust i have come, dust i will be***/

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <functional>
#include <cmath>
#include <limits>
#include <list>
#include <memory>
#include <stack>
#include <iterator>
#include <queue>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cstring>
using namespace std;

typedef long long int ll;
typedef unsigned long long int ull;

#define dbg printf("in\n")
#define nl printf("\n");
#define N 210101
#define inf 1e9

#define sf(n) scanf("%d", &n)
#define sff(n,m) scanf("%d%d",&n,&m)
#define sfl(n) scanf("%I64d", &n)
#define sffl(n,m) scanf("%I64d%I64d",&n,&m)

#define pf(n) printf("%d",n)
#define pff(n,m) printf("%d %d",n,m)
#define pffl(n,m) printf("%I64d %I64d",n,m)
#define pfl(n) printf("%I64d",n)
#define pfs(s) printf("%s",s)

#define pb push_back
#define pp pair<int, int>

using namespace std;

int main()
{
    freopen("in.txt", "r", stdin);

    int i, j, k;
    int n, m, t;
    pp s;

    sf(n), sff(s.first, s.second);
    vector<pair<int,int>> a(n);

    for(i = 0; i < n; i++)
        sff(a[i].first, a[i].second);

    map<char, int> mp;

    for(i = 0; i < n; i++)
    {
        // may go left
        if(a[i].first > s.first)
            mp['R']++;
        else if(a[i].first < s.first)
            mp['L']++;

        if(a[i].second > s.second)
            mp['U']++;
        else if(a[i].second < s.second)
            mp['D']++;
    }

    int mx = 0;
    pp ans;

    // R
    if(s.first + 1 >=0 && s.second >= 0 && mx < mp['R'])
        ans = {s.first + 1, s.second}, mx = mp['R'];

    // L
    if(s.first - 1 >=0 && s.second >= 0 && mx < mp['L'])
        ans = {s.first - 1, s.second}, mx = mp['L'];

    // U
    if(s.first >=0 && s.second + 1>= 0 && mx < mp['U'])
        ans = {s.first, s.second + 1}, mx = mp['U'];

    // D
    if(s.first >=0 && s.second - 1>= 0 && mx < mp['D'])
        ans = {s.first, s.second - 1}, mx = mp['D'];

    pf(mx), nl;
    if(mx)
        pff(ans.first, ans.second);

    return 0;
}
/*
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <functional>
#include <cmath>
#include <limits>
#include <list>
#include <memory>
#include <stack>
#include <iterator>
#include <queue>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cstring>
using namespace std;

#pragma GCC optimize("Ofast")
#define ll long long
#define ld long double
#define ull unsigned long long
#define V vector
#define pp pair<ll,ll>
#define pi 4*atan(1)
#define inf 1000000000000
#define max2(a,b) ((a<b)?b:a)
#define max3(a,b,c) max2(max2(a,b),c)
#define min2(a,b) ((a>b)?b:a)
#define min3(a,b,c) min2(min2(a,b),c)
#define what_is(x) cerr << #x << " is " << x << endl;
#define PS push_back
#define IT(x) begin(x),end(x)
const int mod = 1e9 + 7;

void D(V<int> a) {
	for (int i : a)
		cout << i << " ";
	cout << endl;
}

void solve() {
	int n;
	pair<int, int> s;

	cin >> n >> s.first >> s.second;
	V<pair<int, int>> a(n);

	for (auto i : a) {
		cin >> i.first >> i.second;
	}

	map<char, int> m;

	for (int i = 0; i < n; i++) {
		if (a[i].first > s.first) {
			m['R']++;
		}
		else if (a[i].first < s.first){
			m['L']++;
		}
		if (a[i].second > s.second) {
			m['U']++;
		}
		else if (a[i].second < s.second){
			m['D']++;
		}
	}

	int mx = 0;
	pair<int, int> ans;
	if (s.first + 1 >= 0 && s.second >= 0 && mx < m['R']) {
		ans = { s.first + 1, s.second }, mx = m['R'];
	}
	if (s.first - 1 >= 0 && s.second >= 0 && mx < m['L']) {
		ans = { s.first - 1, s.second }, mx = m['L'];
	}

	if (s.first >= 0 && s.second + 1 >= 0 && mx < m['U']) {
		ans = { s.first, s.second + 1 }, mx = m['U'];
	}

	if (s.first >= 0 && s.second - 1 >= 0 && mx < m['D']) {
		ans = { s.first, s.second - 1 }, mx = m['D'];
	}

	cout << mx << endl;
	if (mx) {
		cout << ans.first << " " << ans.second << endl;
	}

}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	//int t; cin >> t;
	//while (t--)
		solve();
	return 0;
}

/**/


#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <functional>
#include <cmath>
#include <limits>
#include <list>
#include <memory>
#include <stack>
#include <iterator>
#include <queue>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cstring>
using namespace std;

#pragma GCC optimize("Ofast")
#define ll long long
#define ld long double
#define ull unsigned long long
#define V vector
#define pp pair<ll,ll>
#define pi 4*atan(1)
#define inf 1000000000000
#define max2(a,b) ((a<b)?b:a)
#define max3(a,b,c) max2(max2(a,b),c)
#define min2(a,b) ((a>b)?b:a)
#define min3(a,b,c) min2(min2(a,b),c)
#define what_is(x) cerr << #x << " is " << x << endl;
#define PS push_back
#define IT(x) begin(x),end(x)
const int mod = 1e9 + 7;

void D(V<int> a) {
	for (int i : a)
		cout << i << " ";
	cout << endl;
}

void solve() {
	int n;
	pair<int, int> s;
	cin >> n >> s.first >> s.second;
	V<pair<int, int>> a(n);

	for (int i = 0; i < n; i++) {
		int x, y;
		cin >> x >> y;
		a[i].first = x;
		a[i].second = y;
	}

	map<char, int> m;

	for (int i = 0; i < n; i++) {
		if (a[i].first > s.first) {
			m['R']++;
		}
		else if (a[i].first < s.first){
			m['L']++;
		}
		if (a[i].second > s.second) {
			m['U']++;
		}
		else if (a[i].second < s.second){
			m['D']++;
		}
	}

	int mx = 0;
	pair<int, int> ans;
	if (s.first + 1 >= 0 && s.second >= 0 && mx < m['R']) {
		ans = { s.first + 1, s.second }, mx = m['R'];
	}
	if (s.first - 1 >= 0 && s.second >= 0 && mx < m['L']) {
		ans = { s.first - 1, s.second }, mx = m['L'];
	}

	if (s.first >= 0 && s.second + 1 >= 0 && mx < m['U']) {
		ans = { s.first, s.second + 1 }, mx = m['U'];
	}

	if (s.first >= 0 && s.second - 1 >= 0 && mx < m['D']) {
		ans = { s.first, s.second - 1 }, mx = m['D'];
	}

	cout << mx << endl;
	if (mx) {
		cout << ans.first << " " << ans.second << endl;
	}

}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	//int t; cin >> t;
	//while (t--)
		solve();
	return 0;
}

/**/


/***from dust i have come, dust i will be***/

#include<bits/stdc++.h>

typedef long long int ll;
typedef unsigned long long int ull;

#define dbg printf("in\n")
#define nl printf("\n");
#define N 210101
#define inf 1e9

#define sf(n) scanf("%d", &n)
#define sff(n,m) scanf("%d%d",&n,&m)
#define sfl(n) scanf("%I64d", &n)
#define sffl(n,m) scanf("%I64d%I64d",&n,&m)

#define pf(n) printf("%d",n)
#define pff(n,m) printf("%d %d",n,m)
#define pffl(n,m) printf("%I64d %I64d",n,m)
#define pfl(n) printf("%I64d",n)
#define pfs(s) printf("%s",s)

#define pb push_back
#define pp pair<int, int>

using namespace std;

int main()
{
    freopen("in.txt", "r", stdin);

    int i, j, k;
    int n, m, t;
    pp s;

    sf(n), sff(s.first, s.second);
    pp a[n];

    for(i = 0; i < n; i++)
        sff(a[i].first, a[i].second);

    map<char, int> mp;

    for(i = 0; i < n; i++)
    {
        // may go left
        if(a[i].first > s.first)
            mp['R']++;
        else if(a[i].first < s.first)
            mp['L']++;

        if(a[i].second > s.second)
            mp['U']++;
        else if(a[i].second < s.second)
            mp['D']++;
    }

    int mx = 0;
    pp ans;

    // R
    if(s.first + 1 >=0 && s.second >= 0 && mx < mp['R'])
        ans = {s.first + 1, s.second}, mx = mp['R'];

    // L
    if(s.first - 1 >=0 && s.second >= 0 && mx < mp['L'])
        ans = {s.first - 1, s.second}, mx = mp['L'];

    // U
    if(s.first >=0 && s.second + 1>= 0 && mx < mp['U'])
        ans = {s.first, s.second + 1}, mx = mp['U'];

    // D
    if(s.first >=0 && s.second - 1>= 0 && mx < mp['D'])
        ans = {s.first, s.second - 1}, mx = mp['D'];

    pf(mx), nl;
    if(mx)
        pff(ans.first, ans.second);

    return 0;
}

/*
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <functional>
#include <cmath>
#include <limits>
#include <list>
#include <memory>
#include <stack>
#include <iterator>
#include <queue>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cstring>
using namespace std;

#pragma GCC optimize("Ofast")
#define ll long long
#define ld long double
#define ull unsigned long long
#define V vector
#define pp pair<ll,ll>
#define pi 4*atan(1)
#define inf 1000000000000
#define max2(a,b) ((a<b)?b:a)
#define max3(a,b,c) max2(max2(a,b),c)
#define min2(a,b) ((a>b)?b:a)
#define min3(a,b,c) min2(min2(a,b),c)
#define what_is(x) cerr << #x << " is " << x << endl;
#define PS push_back
#define IT(x) begin(x),end(x)
const int mod = 1e9 + 7;

void D(V<int> a) {
	for (int i : a)
		cout << i << " ";
	cout << endl;
}

void solve() {
	int n;
	pair<int, int> s;

	cin >> n >> s.first >> s.second;
	V<pair<int, int>> a(n);

	for (auto i : a) {
		cin >> i.first >> i.second;
	}

	map<char, int> m;

	for (int i = 0; i < n; i++) {
		if (a[i].first > s.first) {
			m['R']++;
		}
		else if (a[i].first < s.first){
			m['L']++;
		}
		if (a[i].second > s.second) {
			m['U']++;
		}
		else if (a[i].second < s.second){
			m['D']++;
		}
	}

	int mx = 0;
	pair<int, int> ans;
	if (s.first + 1 >= 0 && s.second >= 0 && mx < m['R']) {
		ans = { s.first + 1, s.second }, mx = m['R'];
	}
	if (s.first - 1 >= 0 && s.second >= 0 && mx < m['L']) {
		ans = { s.first - 1, s.second }, mx = m['L'];
	}

	if (s.first >= 0 && s.second + 1 >= 0 && mx < m['U']) {
		ans = { s.first, s.second + 1 }, mx = m['U'];
	}

	if (s.first >= 0 && s.second - 1 >= 0 && mx < m['D']) {
		ans = { s.first, s.second - 1 }, mx = m['D'];
	}

	cout << mx << endl;
	if (mx) {
		cout << ans.first << " " << ans.second << endl;
	}

}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	//int t; cin >> t;
	//while (t--)
		solve();
	return 0;
}

/**/


/***from dust i have come, dust i will be***/

#include<bits/stdc++.h>

typedef long long int ll;
typedef unsigned long long int ull;

#define dbg printf("in\n")
#define nl printf("\n");
#define N 210101
#define inf 1e9

#define sf(n) scanf("%d", &n)
#define sff(n,m) scanf("%d%d",&n,&m)
#define sfl(n) scanf("%I64d", &n)
#define sffl(n,m) scanf("%I64d%I64d",&n,&m)

#define pf(n) printf("%d",n)
#define pff(n,m) printf("%d %d",n,m)
#define pffl(n,m) printf("%I64d %I64d",n,m)
#define pfl(n) printf("%I64d",n)
#define pfs(s) printf("%s",s)

#define pb push_back
#define pp pair<int, int>

using namespace std;

int main()
{
    freopen("in.txt", "r", stdin);

    int i, j, k;
    int n, m, t;
    pp s;

    sf(n), sff(s.first, s.second);
    vector<pair<int,int>> a(n);

    for(i = 0; i < n; i++)
        sff(a[i].first, a[i].second);

    map<char, int> mp;

    for(i = 0; i < n; i++)
    {
        // may go left
        if(a[i].first > s.first)
            mp['R']++;
        else if(a[i].first < s.first)
            mp['L']++;

        if(a[i].second > s.second)
            mp['U']++;
        else if(a[i].second < s.second)
            mp['D']++;
    }

    int mx = 0;
    pp ans;

    // R
    if(s.first + 1 >=0 && s.second >= 0 && mx < mp['R'])
        ans = {s.first + 1, s.second}, mx = mp['R'];

    // L
    if(s.first - 1 >=0 && s.second >= 0 && mx < mp['L'])
        ans = {s.first - 1, s.second}, mx = mp['L'];

    // U
    if(s.first >=0 && s.second + 1>= 0 && mx < mp['U'])
        ans = {s.first, s.second + 1}, mx = mp['U'];

    // D
    if(s.first >=0 && s.second - 1>= 0 && mx < mp['D'])
        ans = {s.first, s.second - 1}, mx = mp['D'];

    pf(mx), nl;
    if(mx)
        pff(ans.first, ans.second);

    return 0;
}
/*
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <functional>
#include <cmath>
#include <limits>
#include <list>
#include <memory>
#include <stack>
#include <iterator>
#include <queue>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cstring>
using namespace std;

#pragma GCC optimize("Ofast")
#define ll long long
#define ld long double
#define ull unsigned long long
#define V vector
#define pp pair<ll,ll>
#define pi 4*atan(1)
#define inf 1000000000000
#define max2(a,b) ((a<b)?b:a)
#define max3(a,b,c) max2(max2(a,b),c)
#define min2(a,b) ((a>b)?b:a)
#define min3(a,b,c) min2(min2(a,b),c)
#define what_is(x) cerr << #x << " is " << x << endl;
#define PS push_back
#define IT(x) begin(x),end(x)
const int mod = 1e9 + 7;

void D(V<int> a) {
	for (int i : a)
		cout << i << " ";
	cout << endl;
}

void solve() {
	int n;
	pair<int, int> s;

	cin >> n >> s.first >> s.second;
	V<pair<int, int>> a(n);

	for (auto i : a) {
		cin >> i.first >> i.second;
	}

	map<char, int> m;

	for (int i = 0; i < n; i++) {
		if (a[i].first > s.first) {
			m['R']++;
		}
		else if (a[i].first < s.first){
			m['L']++;
		}
		if (a[i].second > s.second) {
			m['U']++;
		}
		else if (a[i].second < s.second){
			m['D']++;
		}
	}

	int mx = 0;
	pair<int, int> ans;
	if (s.first + 1 >= 0 && s.second >= 0 && mx < m['R']) {
		ans = { s.first + 1, s.second }, mx = m['R'];
	}
	if (s.first - 1 >= 0 && s.second >= 0 && mx < m['L']) {
		ans = { s.first - 1, s.second }, mx = m['L'];
	}

	if (s.first >= 0 && s.second + 1 >= 0 && mx < m['U']) {
		ans = { s.first, s.second + 1 }, mx = m['U'];
	}

	if (s.first >= 0 && s.second - 1 >= 0 && mx < m['D']) {
		ans = { s.first, s.second - 1 }, mx = m['D'];
	}

	cout << mx << endl;
	if (mx) {
		cout << ans.first << " " << ans.second << endl;
	}

}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	//int t; cin >> t;
	//while (t--)
		solve();
	return 0;
}

/**/


#include<bits/stdc++.h>

using namespace std;

#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

/// Typedef
typedef long long ll;

#define sc1(a) scanf("%lld",&a)
#define sc2(a,b) scanf("%lld %lld",&a,&b)

#define pf1(a) printf("%lld\n",a)
#define pf2(a,b) printf("%lld %lld\n",a,b)

#define vpnt(ans) for(ll i = 0; i < ans.size(); i++) cout << ans[i] << (i + 1 < ans.size() ? ' ' : '\n');
#define apnt(arr, num) for(ll i = 0; i < num; i++) cout << arr[i] << (i + 1 < num ? ' ' : '\n');

#define mx 200005
#define mod 1000000007
#define PI acos(-1.0)
#define eps 1e-7

#define size1 200005

#define no cout << "NO" << endl
#define yes cout << "YES" << endl
#define mem(name, value) memset(name, value, sizeof(name))

#define pb push_back
#define ff first
#define ss second
#define mp make_pair
#define case cout << "Case " << t++ << ": ";

typedef vector <ll> vll;
typedef set <ll> sll;
typedef queue <ll> qll;
typedef map <ll, ll> mll;
typedef pair <ll, ll> pll;
typedef vector <pair <ll , ll> > vpll;

ll xx[size1], yy[size1];
vll vc, temp;

void calDis(ll sx, ll sy, ll num)
{
    for (ll i = 0; i < num; ++i) {
        ll x = abs(sx - xx[i]);
        ll y = abs(sy - yy[i]);
        vc.push_back(x + y);
    }
}

void tempCalDis(ll sx, ll sy, ll num)
{
    temp.clear();
    for (ll i = 0; i < num; ++i) {
        ll x = abs(sx - xx[i]);
        ll y = abs(sy - yy[i]);
        temp.push_back(x + y);
    }
}

int main() {

    //freopen("/opt/Coding/clion code/input.txt", "r", stdin);

    ll n, m, tc, num, t = 1;
    ll sx, sy;

    sc1(num);
    sc2(sx, sy);

    for (ll i = 0; i < num; ++i) {
        sc2(xx[i], yy[i]);
    }

    calDis(sx, sy, num);

    ll cnt = 0, ans = 0, ax, ay;
    tempCalDis(sx, sy + 1, num);
    cnt = 0;
    for (ll i = 0; i < temp.size(); ++i) {
        if(temp[i] <= vc[i]) cnt++;
    }
    if(cnt > ans){
        ax = sx;
        ay = sy + 1;
        ans = cnt;
    }

    tempCalDis(sx, sy - 1, num);
    cnt = 0;
    for (ll i = 0; i < temp.size(); ++i) {
        if(temp[i] <= vc[i]) cnt++;
    }
    if(cnt > ans){
        ax = sx;
        ay = sy - 1;
        ans = cnt;
    }

    tempCalDis(sx + 1, sy, num);
    cnt = 0;
    for (ll i = 0; i < temp.size(); ++i) {
        if(temp[i] <= vc[i]) cnt++;
    }
    if(cnt > ans){
        ax = sx + 1;
        ay = sy;
        ans = cnt;
    }

    tempCalDis(sx - 1, sy, num);
    cnt = 0;
    for (ll i = 0; i < temp.size(); ++i) {
        if(temp[i] <= vc[i]) cnt++;
    }
    if(cnt > ans){
        ax = sx - 1;
        ay = sy;
        ans = cnt;
    }

    cout << ans << endl;
    cout << ax << " " << ay << endl;
}


#include <bits/stdc++.h>

#define ll              long long
#define LMx             LONG_MAX
#define LMn             LONG_MIN
#define endl            '\n'
#define cd              cout << '\n';
#define ys              cout << "YES"; return;
#define no              cout << "NO"; return;
#define pii             pair<int,int>
#define IOS             ios::sync_with_stdio(0);
#define vi              vector<int>
#define vll             vector<long long>
#define vpii            vector<pair<int,int>>
#define vpll            vector<pair<long long, long long>>
#define pb              push_back
#define in              insert
#define mp              make_pair
#define all(a)          a.begin(),a.end()
#define rall(a)         a.rbegin(),a.rend()
#define fr              first
#define sc              second
#define sz(a)           a.size()
#define min3(a,b,c)     min(a,min(b,c))
#define max3(a,b,c)     max(a,max(b,c))
#define min4(a,b,c,d)   min(a,min(b,min(c,d)))
#define max4(a,b,c,d)   max(a,max(b,max(c,d)))
#define MEM(a,x)        memset(a,x,sizeof(a))
#define SORT(v)         sort(v.begin(),v.end())
#define REV(v)          reverse(v.begin(),v.end())
#define buga(i,n,a)     for(i = 0; i < n; ++i) cout << a[i] << " ";
#define bugv(i,n,v)     cout << endl; for(i = 0; i < n; ++i) cout << v[i].first << " " << v[i].second << endl; cout << endl;

using namespace std;

/*
ll myceil(ll a, ll b)
{
	return ((a+b-1)/b);
}

ll myfloor(ll a, ll b)
{
	return a/b;
}
*/

void solve()
{
	ll a, b, c, d, i, j, k, l, m, n, x, y, z, r, ans = 0, sum = 0;
	//string s, t;
	cin >> n >> a >> b;
	vpll p;
	l = r = 0;
	for(i = 0; i < n; i++) {
		cin >> x >> y;
		if(x >= a)
			r++;
		else
			l++;
		p.pb(mp(x,y));
	}
	//bugv(i, n, p);
	ans = max(l, r);
	if(ans == r) {
		c = a+1, d = b;
	}
	else if(ans == l) {
		c = a-1, d = b;
	}
	cout << ans << "\n" << c <<" " << d;

}

int main()
{
    IOS;
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
        cout << endl;
    }

    return 0;
}


#include <bits/stdc++.h>

#define ll              long long
#define LMx             LONG_MAX
#define LMn             LONG_MIN
#define endl            '\n'
#define cd              cout << '\n';
#define ys              cout << "YES"; return;
#define no              cout << "NO"; return;
#define pii             pair<int,int>
#define IOS             ios::sync_with_stdio(0);
#define vi              vector<int>
#define vll             vector<long long>
#define vpii            vector<pair<int,int>>
#define vpll            vector<pair<long long, long long>>
#define pb              push_back
#define in              insert
#define mp              make_pair
#define all(a)          a.begin(),a.end()
#define rall(a)         a.rbegin(),a.rend()
#define fr              first
#define sc              second
#define sz(a)           a.size()
#define min3(a,b,c)     min(a,min(b,c))
#define max3(a,b,c)     max(a,max(b,c))
#define min4(a,b,c,d)   min(a,min(b,min(c,d)))
#define max4(a,b,c,d)   max(a,max(b,max(c,d)))
#define MEM(a,x)        memset(a,x,sizeof(a))
#define SORT(v)         sort(v.begin(),v.end())
#define REV(v)          reverse(v.begin(),v.end())
#define buga(i,n,a)     for(i = 0; i < n; ++i) cout << a[i] << " ";
#define bugv(i,n,v)     cout << endl; for(i = 0; i < n; ++i) cout << v[i].first << " " << v[i].second << endl; cout << endl;

using namespace std;

/*
ll myceil(ll a, ll b)
{
	return ((a+b-1)/b);
}

ll myfloor(ll a, ll b)
{
	return a/b;
}
*/

void solve()
{
	ll a, b, c, d, i, j, k, l, m, n, x, y, z, r, ans = 0, sum = 0;
	//string s, t;
	cin >> n >> a >> b;
	//vpll p;
	ll u;
	l = r = u = d = 0;
	for(i = 0; i < n; i++) {
		cin >> x >> y;
		if(x > a)
			r++;
		if(x < a)
			l++;
		if(y > b)
			u++;
		if(y < b)
			d++;
		//p.pb(mp(x,y));
	}
	//bugv(i, n, p);
	ans = max4(l, r, u, d);
	if(ans == r) {
		i = a+1, j = b;
	}
	else if(ans == l) {
		i = a-1, j = b;
	}
	else if(ans == u) {
		i = a, j = b+1;
	}
	else if(ans == d) {
		i = a, j = b-1;
	}
	cout << ans << "\n" << i <<" " << j;

}

int main()
{
    IOS;
    int t=1;
    //cin >> t;
    while (t--) {
        solve();
        cout << endl;
    }

    return 0;
}


#include <bits/stdc++.h>

#define ll              long long
#define LMx             LONG_MAX
#define LMn             LONG_MIN
#define endl            '\n'
#define cd              cout << '\n';
#define ys              cout << "YES"; return;
#define no              cout << "NO"; return;
#define pii             pair<int,int>
#define IOS             ios::sync_with_stdio(0);
#define vi              vector<int>
#define vll             vector<long long>
#define vpii            vector<pair<int,int>>
#define vpll            vector<pair<long long, long long>>
#define pb              push_back
#define in              insert
#define mp              make_pair
#define all(a)          a.begin(),a.end()
#define rall(a)         a.rbegin(),a.rend()
#define fr              first
#define sc              second
#define sz(a)           a.size()
#define min3(a,b,c)     min(a,min(b,c))
#define max3(a,b,c)     max(a,max(b,c))
#define min4(a,b,c,d)   min(a,min(b,min(c,d)))
#define max4(a,b,c,d)   max(a,max(b,max(c,d)))
#define MEM(a,x)        memset(a,x,sizeof(a))
#define SORT(v)         sort(v.begin(),v.end())
#define REV(v)          reverse(v.begin(),v.end())
#define buga(i,n,a)     for(i = 0; i < n; ++i) cout << a[i] << " ";
#define bugv(i,n,v)     cout << endl; for(i = 0; i < n; ++i) cout << v[i].first << " " << v[i].second << endl; cout << endl;

using namespace std;

/*
ll myceil(ll a, ll b)
{
	return ((a+b-1)/b);
}

ll myfloor(ll a, ll b)
{
	return a/b;
}
*/

void solve()
{
	ll a, b, c, d, i, j, k, l, m, n, x, y, z, r, ans = 0, sum = 0;
	//string s, t;
	cin >> n >> a >> b;
	vpll p;
	l = r = 0;
	for(i = 0; i < n; i++) {
		cin >> x >> y;
		if(x >= a)
			r++;
		if(x <= a)
			l++;
		p.pb(mp(x,y));
	}
	//bugv(i, n, p);
	ans = max(l, r);
	if(ans == r) {
		c = a+1, d = b;
	}
	else if(ans == l) {
		c = a-1, d = b;
	}
	cout << ans << "\n" << c <<" " << d;

}

int main()
{
    IOS;
    int t=1;
    //cin >> t;
    while (t--) {
        solve();
        cout << endl;
    }

    return 0;
}


#include <bits/stdc++.h>

#define ll              long long
#define LMx             LONG_MAX
#define LMn             LONG_MIN
#define endl            '\n'
#define cd              cout << '\n';
#define ys              cout << "YES"; return;
#define no              cout << "NO"; return;
#define pii             pair<int,int>
#define IOS             ios::sync_with_stdio(0);
#define vi              vector<int>
#define vll             vector<long long>
#define vpii            vector<pair<int,int>>
#define vpll            vector<pair<long long, long long>>
#define pb              push_back
#define in              insert
#define mp              make_pair
#define all(a)          a.begin(),a.end()
#define rall(a)         a.rbegin(),a.rend()
#define fr              first
#define sc              second
#define sz(a)           a.size()
#define min3(a,b,c)     min(a,min(b,c))
#define max3(a,b,c)     max(a,max(b,c))
#define min4(a,b,c,d)   min(a,min(b,min(c,d)))
#define max4(a,b,c,d)   max(a,max(b,max(c,d)))
#define MEM(a,x)        memset(a,x,sizeof(a))
#define SORT(v)         sort(v.begin(),v.end())
#define REV(v)          reverse(v.begin(),v.end())
#define buga(i,n,a)     for(i = 0; i < n; ++i) cout << a[i] << " ";
#define bugv(i,n,v)     cout << endl; for(i = 0; i < n; ++i) cout << v[i].first << " " << v[i].second << endl; cout << endl;

using namespace std;

/*
ll myceil(ll a, ll b)
{
	return ((a+b-1)/b);
}

ll myfloor(ll a, ll b)
{
	return a/b;
}
*/

void solve()
{
	ll a, b, c, d, i, j, k, l, m, n, x, y, z, r, ans = 0, sum = 0;
	//string s, t;
	cin >> n >> a >> b;
	vpll p;
	l = r = 0;
	for(i = 0; i < n; i++) {
		cin >> x >> y;
		if(x >= a)
			r++;
		if(x <= a)
			l++;
		p.pb(mp(x,y));
	}
	//bugv(i, n, p);
	ans = max(l, r);
	if(ans == r) {
		c = a+1, d = b;
	}
	else if(ans == l) {
		c = a-1, d = b;
	}
	cout << ans << "\n" << c <<" " << d;

}

int main()
{
    IOS;
    int t;
    cin >> t;
    while (t--) {
        solve();
        cout << endl;
    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
const int MOD=1e9+7;
#define loopf(i,a,b) for(int i=(a);i<(b);i++)
#define mll map<ll,ll>
#define mii map<int,int>
#define pb push_back
#define pi 3.141592653589
#define vll vector<ll>
#define vii vector<int>
#define iter vector<ll>::iterator
#define endl '\n'

int main(){
  ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  ll n,sx,sy;
  cin>>n>>sx>>sy;
  int x[n],y[n],a,b,c,d;
  a=b=c=d=0;
  loopf(i,0,n){
    cin>>x[i]>>y[i];
    if(x[i]<=sx && y[i]<=sy)
    a++;
    if(x[i]>=sx && y[i]<=sy)
    b++;
    if(x[i]>=sx && y[i]>=sy)
    c++;
    if(x[i]<=sx && y[i]>=sy)
    d++;
  }
  int arr[4];
  arr[0]=a+b;
  arr[1]=b+c;
  arr[2]=c+d;
  arr[3]=d+a;
  sort(arr,arr+4);
  int max=arr[3];
  int second=arr[2];
  int count=0;
  //if((max == a && second == b) || (max == b && second == a))
  if(max==a+b){
    loopf(i,0,n){
      if(y[i]<=sy-1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx<<" "<<sy-1<<endl;
  }
  //else if((max == b && second == c) || (max == c && second == b))
  else if(max==b+c){
    loopf(i,0,n){
      if(x[i]>=sx+1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx+1<<" "<<sy<<endl;
  }
  //else if((max == c && second == d) || (max == d && second == c))
  else if(max==c+d){
    loopf(i,0,n){
      if(y[i]>=sy+1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx<<" "<<sy+1<<endl;
  }
  //else if((max == d && second == a) || (max == a && second == d))
  else if(max==d+a){
    loopf(i,0,n){
      if(x[i]<=sx-1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx-1<<" "<<sy<<endl;
  }

  return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
const int MOD=1e9+7;
#define loopf(i,a,b) for(int i=(a);i<(b);i++)
#define mll map<ll,ll>
#define mii map<int,int>
#define pb push_back
#define pi 3.141592653589
#define vll vector<ll>
#define vii vector<int>
#define iter vector<ll>::iterator
#define endl '\n'

int main(){
  ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  ll n,sx,sy;
  cin>>n>>sx>>sy;
  int x[n],y[n],a,b,c,d;
  a=b=c=d=0;
  loopf(i,0,n){
    cin>>x[i]>>y[i];
    if(x[i]<=sx && y[i]<=sy)
    a++;
    if(x[i]>=sx && y[i]<=sy)
    b++;
    if(x[i]>=sx && y[i]>=sy)
    c++;
    if(x[i]<=sx && y[i]>=sy)
    d++;
  }
  int arr[4];
  arr[0]=a+b;
  arr[1]=b+c;
  arr[2]=c+d;
  arr[3]=d+a;
  sort(arr,arr+4);
  int max=arr[3];
  int second=arr[2];
  int count1,count2,count3,count4,tx[4],ty[4];
  count1=count2=count3=count4=0;
  if(max==a+b){
    loopf(i,0,n){
      if(y[i]<=sy-1)
      count1++;
    }
    tx[0]=sx;
    ty[0]=sy-1;
  }
  if(max==b+c){
    loopf(i,0,n){
      if(x[i]>=sx+1)
      count2++;
    }
    tx[1]=sx+1;
    ty[1]=sy;
  }
  if(max==c+d){
    loopf(i,0,n){
      if(y[i]>=sy+1)
      count3++;
    }
    tx[2]=sx;
    ty[2]=sy+1;
  }
  if(max==d+a){
    loopf(i,0,n){
      if(x[i]<=sx-1)
      count4++;
    }
    tx[3]=sx-1;
    ty[3]=sy;
  }
  if(count1>count2 && count1>count3 && count1>count4){
    cout<<count1<<endl;
    cout<<tx[0]<<" "<<ty[0]<<endl;
  }
  else if(count2>count1 && count2>count3 && count2>count4){
    cout<<count2<<endl;
    cout<<tx[1]<<" "<<ty[1]<<endl;
  }
  else if(count3>count1 && count3>count2 && count3>count4){
    cout<<count3<<endl;
    cout<<tx[2]<<" "<<ty[2]<<endl;
  }
  else{
    cout<<count4<<endl;
    cout<<tx[3]<<" "<<ty[3]<<endl;
  }

  return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
const int MOD=1e9+7;
#define loopf(i,a,b) for(int i=(a);i<(b);i++)
#define mll map<ll,ll>
#define mii map<int,int>
#define pb push_back
#define pi 3.141592653589
#define vll vector<ll>
#define vii vector<int>
#define iter vector<ll>::iterator
#define endl '\n'

int main(){
  ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  ll n,sx,sy;
  cin>>n>>sx>>sy;
  int x[n],y[n],a,b,c,d;
  a=b=c=d=0;
  loopf(i,0,n){
    cin>>x[i]>>y[i];
    if(x[i]<=sx && y[i]<=sy)
    a++;
    if(x[i]>=sx && y[i]<=sy)
    b++;
    if(x[i]>=sx && y[i]>=sy)
    c++;
    if(x[i]<=sx && y[i]>=sy)
    d++;
  }
  int arr[4];
  arr[0]=a+b;
  arr[1]=b+c;
  arr[2]=c+d;
  arr[3]=d+a;
  sort(arr,arr+4);
  int max=arr[3];
  int second=arr[2];
  int count1,count2,count3,count4,tx[4],ty[4];
  count1=count2=count3=count4=0;
  if(max==a+b){
    loopf(i,0,n){
      if(y[i]<=sy-1)
      count1++;
    }
    tx[0]=sx;
    ty[0]=sy-1;
  }
  if(max==b+c){
    loopf(i,0,n){
      if(x[i]>=sx+1)
      count2++;
    }
    tx[1]=sx+1;
    ty[1]=sy;
  }
  if(max==c+d){
    loopf(i,0,n){
      if(y[i]>=sy+1)
      count3++;
    }
    tx[2]=sx;
    ty[2]=sy+1;
  }
  if(max==d+a){
    loopf(i,0,n){
      if(x[i]<=sx-1)
      count4++;
    }
    tx[3]=sx-1;
    ty[3]=sy;
  }
  if(count1>=count2 && count1>=count3 && count1>=count4){
    cout<<count1<<endl;
    cout<<tx[0]<<" "<<ty[0]<<endl;
  }
  else if(count2>=count1 && count2>=count3 && count2>=count4){
    cout<<count2<<endl;
    cout<<tx[1]<<" "<<ty[1]<<endl;
  }
  else if(count3>=count1 && count3>=count2 && count3>=count4){
    cout<<count3<<endl;
    cout<<tx[2]<<" "<<ty[2]<<endl;
  }
  else{
    cout<<count4<<endl;
    cout<<tx[3]<<" "<<ty[3]<<endl;
  }

  return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
const int MOD=1e9+7;
#define loopf(i,a,b) for(int i=(a);i<(b);i++)
#define mll map<ll,ll>
#define mii map<int,int>
#define pb push_back
#define pi 3.141592653589
#define vll vector<ll>
#define vii vector<int>
#define iter vector<ll>::iterator
#define endl '\n'

int main(){
  ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  ll n,sx,sy;
  cin>>n>>sx>>sy;
  int x[n],y[n],a,b,c,d;
  a=b=c=d=0;
  loopf(i,0,n){
    cin>>x[i]>>y[i];
    if(x[i]<=sx && y[i]<=sy)
    a++;
    if(x[i]>=sx && y[i]<=sy)
    b++;
    if(x[i]<=sx && y[i]>=sy)
    c++;
    if(x[i]>=sx && y[i]>=sy)
    d++;
  }
  int arr[4];
  arr[0]=a;
  arr[1]=b;
  arr[2]=c;
  arr[3]=d;
  sort(arr,arr+4);
  int max=arr[3];
  int second=arr[2];
  int count=0;
  if((max == a && second == b) || (max == b && second == a)){
    loopf(i,0,n){
      if(y[i]<=sy-1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx<<" "<<sy-1<<endl;
  }
  else if((max == b && second == c) || (max == c && second == b)){
    loopf(i,0,n){
      if(x[i]>=sx+1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx+1<<" "<<sy<<endl;
  }
  else if((max == c && second == d) || (max == d && second == c)){
    loopf(i,0,n){
      if(y[i]>=sy+1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx<<" "<<sy+1<<endl;
  }
  else if((max == d && second == a) || (max == a && second == d)){
    loopf(i,0,n){
      if(x[i]<=sx-1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx-1<<" "<<sy<<endl;
  }

  return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
const int MOD=1e9+7;
#define loopf(i,a,b) for(int i=(a);i<(b);i++)
#define mll map<ll,ll>
#define mii map<int,int>
#define pb push_back
#define pi 3.141592653589
#define vll vector<ll>
#define vii vector<int>
#define iter vector<ll>::iterator
#define endl '\n'

int main(){
  ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  ll n,sx,sy;
  cin>>n>>sx>>sy;
  ll x[n],y[n],a,b,c,d;
  a=b=c=d=0;
  loopf(i,0,n){
    cin>>x[i]>>y[i];
    if(x[i]<=sx && y[i]<=sy)
    a++;
    if(x[i]>=sx && y[i]<=sy)
    b++;
    if(x[i]<=sx && y[i]>=sy)
    c++;
    if(x[i]>=sx && y[i]>=sy)
    d++;
  }
  ll arr[4];
  arr[0]=a;
  arr[1]=b;
  arr[2]=c;
  arr[3]=d;
  sort(arr,arr+4);
  ll max=arr[3];
  ll second=arr[2];
  ll count=0;
  if((max == a && second == b) || (max == b && second == a)){
    loopf(i,0,n){
      if(y[i]<=sy-1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx<<" "<<sy-1<<endl;
  }
  else if((max == b && second == c) || (max == c && second == b)){
    loopf(i,0,n){
      if(x[i]>=sx+1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx+1<<" "<<sy<<endl;
  }
  else if((max == c && second == d) || (max == d && second == c)){
    loopf(i,0,n){
      if(y[i]>=sy+1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx<<" "<<sy+1<<endl;
  }
  else if((max == d && second == a) || (max == a && second == d)){
    loopf(i,0,n){
      if(x[i]<=sx-1)
      count++;
    }
    cout<<count<<endl;
    cout<<sx-1<<" "<<sy<<endl;
  }

  return 0;
}


#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<cstring>
#include<vector>
#include<unordered_map>
using namespace std;
//#define  pb push_back
/*long long gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}*/
/*long long  func(long long k){
    long long   count=0;h
	while(k)
	{k&=(k-1);
	count++;

	}
	return count;
}*//*
bool isprime(int n)
{
    // Corner cases
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;

    return true;
}*/

/*// Two pointer technique based solution to find
// if there is a pair in A[0..N-1] with a given sum.
bool isPairSum(A[], N, X)
{
	// represents first pointer
	int i = 0;

	// represents second pointer
	int j = N - 1;

	while (i < j) {

		// If we find a pair
		if (A[i] + A[j] == X)
			return true;

		// If sum of elements at current
		// pointers is less, we move towards
		// higher values by doing i++
		else if (A[i] + A[j] < X)
			i++;

		// If sum of elements at current
		// pointers is more, we move towards
		// lower values by doing j--
		else
			j--;
	}
	return false;
}

*//*
long long mx(long long n)
{long long temp=0,a;
    while(n)
    {a=n%10;
    temp=max(temp,a);
    n=n/10;
    }
    return temp;

}
long long mn(long long n)
{long long temp=INT_MAX,a;
    while(n)
    {a=n%10;
    temp=min(temp,a);
    n=n/10;
    }
    return temp;

}*/
/*long long div(long long n)
{long long s,i;
    for(int i = 2; i<=n; i++){
if(n % i == 0)
{s=i;break;}
}

    return s;
}*/

/*#define MAX 10000001
int iscat[MAX];
bool visited[MAX];
vector<vector<int> > graph(MAX);
int n , m , ans = 0;
void dfs(int u,int sum_cat)
{if(sum_cat>m)
return;
int sum=0;
visited[u]=true;
int i;
bool ok=false;
for(i=0;i<graph[u].size();i++)
if (!visited[graph[u][i]])
{
    iscat[graph[u][i]]?sum=sum_cat+1:sum=0;
    dfs(graph[u][i],sum);
    ok=true;
}
if(!ok)
ans++;

}*/
void solve(){
int n,X,Y,x,y,mx,l=0,r=0,u=0,d=0,i;

    cin>>n>>X>>Y;
    for(i=0;i<n;i++){cin>>x>>y;if(x<X)l++;if(x>X)r++;if(y<Y)d++;if(y>Y)u++;}
    mx=max(max(l,r),max(d,u));
    if(mx==l)X--;else if(mx==r)X++;else if(mx==d)Y--;else Y++;
    cout<<mx<<'\n'<<X<<' '<<Y;
}

/*long long n,a,b,x,y,r=0,l=0,u=0,d=0,i,s;
cin>>n>>a>>b;
for(i=0;i<n;i++)
{cin>>x>>y;
if(x>a)
r++;
else if(x<a)
l++;
else if(y>b)
u++;
else if(y<b)
d++;

}

s=max(max(l,r),max(u,d));
if(s==r)
a++;
else if(s==l)
a--;
else if(s==u)
b++;
else if(s==d)
b--;

 cout<<s<<"\n"<<a<<" "<<b;

}*/

int main()
{ long long a;
//cin>>a;
//while(a--)
solve();
return 0;
}


#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<cstring>
#include<vector>
#include<unordered_map>
using namespace std;
//#define  pb push_back
/*long long gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}*/
/*long long  func(long long k){
    long long   count=0;h
	while(k)
	{k&=(k-1);
	count++;

	}
	return count;
}*//*
bool isprime(int n)
{
    // Corner cases
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;

    return true;
}*/

/*// Two pointer technique based solution to find
// if there is a pair in A[0..N-1] with a given sum.
bool isPairSum(A[], N, X)
{
	// represents first pointer
	int i = 0;

	// represents second pointer
	int j = N - 1;

	while (i < j) {

		// If we find a pair
		if (A[i] + A[j] == X)
			return true;

		// If sum of elements at current
		// pointers is less, we move towards
		// higher values by doing i++
		else if (A[i] + A[j] < X)
			i++;

		// If sum of elements at current
		// pointers is more, we move towards
		// lower values by doing j--
		else
			j--;
	}
	return false;
}

*//*
long long mx(long long n)
{long long temp=0,a;
    while(n)
    {a=n%10;
    temp=max(temp,a);
    n=n/10;
    }
    return temp;

}
long long mn(long long n)
{long long temp=INT_MAX,a;
    while(n)
    {a=n%10;
    temp=min(temp,a);
    n=n/10;
    }
    return temp;

}*/
/*long long div(long long n)
{long long s,i;
    for(int i = 2; i<=n; i++){
if(n % i == 0)
{s=i;break;}
}

    return s;
}*/

/*#define MAX 10000001
int iscat[MAX];
bool visited[MAX];
vector<vector<int> > graph(MAX);
int n , m , ans = 0;
void dfs(int u,int sum_cat)
{if(sum_cat>m)
return;
int sum=0;
visited[u]=true;
int i;
bool ok=false;
for(i=0;i<graph[u].size();i++)
if (!visited[graph[u][i]])
{
    iscat[graph[u][i]]?sum=sum_cat+1:sum=0;
    dfs(graph[u][i],sum);
    ok=true;
}
if(!ok)
ans++;

}*/
void solve(){
int n,X,Y,x,y,mx,l,r,u,d,i;

    cin>>n>>X>>Y;
    for(;i<n;i++){cin>>x>>y;if(x<X)l++;if(x>X)r++;if(y<Y)d++;if(y>Y)u++;}
    mx=max(max(l,r),max(d,u));
    if(mx==l)X--;else if(mx==r)X++;else if(mx==d)Y--;else Y++;
    cout<<mx<<'\n'<<X<<' '<<Y;
}

/*long long n,a,b,x,y,r=0,l=0,u=0,d=0,i,s;
cin>>n>>a>>b;
for(i=0;i<n;i++)
{cin>>x>>y;
if(x>a)
r++;
else if(x<a)
l++;
else if(y>b)
u++;
else if(y<b)
d++;

}

s=max(max(l,r),max(u,d));
if(s==r)
a++;
else if(s==l)
a--;
else if(s==u)
b++;
else if(s==d)
b--;

 cout<<s<<"\n"<<a<<" "<<b;
*/

}

int main()
{ long long a;
//cin>>a;
//while(a--)
solve();
return 0;
}


#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<cstring>
#include<vector>
#include<unordered_map>
using namespace std;
//#define  pb push_back
/*long long gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}*/
/*long long  func(long long k){
    long long   count=0;h
	while(k)
	{k&=(k-1);
	count++;

	}
	return count;
}*//*
bool isprime(int n)
{
    // Corner cases
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;

    return true;
}*/

/*// Two pointer technique based solution to find
// if there is a pair in A[0..N-1] with a given sum.
bool isPairSum(A[], N, X)
{
	// represents first pointer
	int i = 0;

	// represents second pointer
	int j = N - 1;

	while (i < j) {

		// If we find a pair
		if (A[i] + A[j] == X)
			return true;

		// If sum of elements at current
		// pointers is less, we move towards
		// higher values by doing i++
		else if (A[i] + A[j] < X)
			i++;

		// If sum of elements at current
		// pointers is more, we move towards
		// lower values by doing j--
		else
			j--;
	}
	return false;
}

*//*
long long mx(long long n)
{long long temp=0,a;
    while(n)
    {a=n%10;
    temp=max(temp,a);
    n=n/10;
    }
    return temp;

}
long long mn(long long n)
{long long temp=INT_MAX,a;
    while(n)
    {a=n%10;
    temp=min(temp,a);
    n=n/10;
    }
    return temp;

}*/
/*long long div(long long n)
{long long s,i;
    for(int i = 2; i<=n; i++){
if(n % i == 0)
{s=i;break;}
}

    return s;
}*/

/*#define MAX 10000001
int iscat[MAX];
bool visited[MAX];
vector<vector<int> > graph(MAX);
int n , m , ans = 0;
void dfs(int u,int sum_cat)
{if(sum_cat>m)
return;
int sum=0;
visited[u]=true;
int i;
bool ok=false;
for(i=0;i<graph[u].size();i++)
if (!visited[graph[u][i]])
{
    iscat[graph[u][i]]?sum=sum_cat+1:sum=0;
    dfs(graph[u][i],sum);
    ok=true;
}
if(!ok)
ans++;

}*/
void solve(){
long long n,a,b,x,y,r=0,l=0,u=0,d=0,i,s;
cin>>n>>a>>b;
for(i=0;i<n;i++)
{cin>>x>>y;
if(x>a)
r++;
else if(x<a)
l++;
else if(y>b)
u++;
else if(y<b)
d++;}

s=max(max(l,r),max(u,d));
if(s==r)
a++;
else if(s==l)
a--;
else if(s==u)
b++;
else if(s==d)
b--;

 cout<<s<<"\n"<<a<<" "<<b;

}

int main()
{ long long a;
//cin>>a;
//while(a--)
solve();
return 0;
}


#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<cstring>
#include<vector>
#include<unordered_map>
using namespace std;
//#define  pb push_back
/*long long gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}*/
/*long long  func(long long k){
    long long   count=0;h
	while(k)
	{k&=(k-1);
	count++;

	}
	return count;
}*//*
bool isprime(int n)
{
    // Corner cases
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;

    return true;
}*/

/*// Two pointer technique based solution to find
// if there is a pair in A[0..N-1] with a given sum.
bool isPairSum(A[], N, X)
{
	// represents first pointer
	int i = 0;

	// represents second pointer
	int j = N - 1;

	while (i < j) {

		// If we find a pair
		if (A[i] + A[j] == X)
			return true;

		// If sum of elements at current
		// pointers is less, we move towards
		// higher values by doing i++
		else if (A[i] + A[j] < X)
			i++;

		// If sum of elements at current
		// pointers is more, we move towards
		// lower values by doing j--
		else
			j--;
	}
	return false;
}

*//*
long long mx(long long n)
{long long temp=0,a;
    while(n)
    {a=n%10;
    temp=max(temp,a);
    n=n/10;
    }
    return temp;

}
long long mn(long long n)
{long long temp=INT_MAX,a;
    while(n)
    {a=n%10;
    temp=min(temp,a);
    n=n/10;
    }
    return temp;

}*/
/*long long div(long long n)
{long long s,i;
    for(int i = 2; i<=n; i++){
if(n % i == 0)
{s=i;break;}
}

    return s;
}*/

/*#define MAX 10000001
int iscat[MAX];
bool visited[MAX];
vector<vector<int> > graph(MAX);
int n , m , ans = 0;
void dfs(int u,int sum_cat)
{if(sum_cat>m)
return;
int sum=0;
visited[u]=true;
int i;
bool ok=false;
for(i=0;i<graph[u].size();i++)
if (!visited[graph[u][i]])
{
    iscat[graph[u][i]]?sum=sum_cat+1:sum=0;
    dfs(graph[u][i],sum);
    ok=true;
}
if(!ok)
ans++;

}*/
void solve(){
int n,a,b,x,y,r=0,l=0,u=0,d=0,i,s;
cin>>n>>a>>b;
for(i=0;i<n;i++)
{cin>>x>>y;
if(x>a)
r++;
else if(x<a)
l++;
else if(y>b)
u++;
else if(y<b)
d++;}

s=max(max(l,r),max(u,d));
if(s==r)
a++;
else if(s==l)
a--;
else if(s==u)
b++;
else if(s==d)
b--;

 cout<<s<<"\n"<<a<<" "<<b;

}

int main()
{ long long a;
//cin>>a;
//while(a--)
solve();
return 0;
}


#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<cstring>
#include<vector>
#include<unordered_map>
using namespace std;
//#define  pb push_back
/*long long gcd(long long a, long long b)
{
    if (a == 0)
        return b;
    return gcd(b % a, a);
}*/
/*long long  func(long long k){
    long long   count=0;h
	while(k)
	{k&=(k-1);
	count++;

	}
	return count;
}*//*
bool isprime(int n)
{
    // Corner cases
    if (n <= 1)
        return false;
    if (n <= 3)
        return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n % 2 == 0 || n % 3 == 0)
        return false;

    for (int i = 5; i * i <= n; i = i + 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;

    return true;
}*/

/*// Two pointer technique based solution to find
// if there is a pair in A[0..N-1] with a given sum.
bool isPairSum(A[], N, X)
{
	// represents first pointer
	int i = 0;

	// represents second pointer
	int j = N - 1;

	while (i < j) {

		// If we find a pair
		if (A[i] + A[j] == X)
			return true;

		// If sum of elements at current
		// pointers is less, we move towards
		// higher values by doing i++
		else if (A[i] + A[j] < X)
			i++;

		// If sum of elements at current
		// pointers is more, we move towards
		// lower values by doing j--
		else
			j--;
	}
	return false;
}

*//*
long long mx(long long n)
{long long temp=0,a;
    while(n)
    {a=n%10;
    temp=max(temp,a);
    n=n/10;
    }
    return temp;

}
long long mn(long long n)
{long long temp=INT_MAX,a;
    while(n)
    {a=n%10;
    temp=min(temp,a);
    n=n/10;
    }
    return temp;

}*/
/*long long div(long long n)
{long long s,i;
    for(int i = 2; i<=n; i++){
if(n % i == 0)
{s=i;break;}
}

    return s;
}*/

/*#define MAX 10000001
int iscat[MAX];
bool visited[MAX];
vector<vector<int> > graph(MAX);
int n , m , ans = 0;
void dfs(int u,int sum_cat)
{if(sum_cat>m)
return;
int sum=0;
visited[u]=true;
int i;
bool ok=false;
for(i=0;i<graph[u].size();i++)
if (!visited[graph[u][i]])
{
    iscat[graph[u][i]]?sum=sum_cat+1:sum=0;
    dfs(graph[u][i],sum);
    ok=true;
}
if(!ok)
ans++;

}*/
void solve(){
int n,X,Y,x,y,mx,l,r,u,d,i;

    cin>>n>>X>>Y;
    for(;i<n;i++){cin>>x>>y;if(x<X)l++;if(x>X)r++;if(y<Y)d++;if(y>Y)u++;}
    mx=max(max(l,r),max(d,u));
    if(mx==l)X--;else if(mx==r)X++;else if(mx==d)Y--;else Y++;
    cout<<mx<<'\n'<<X<<' '<<Y;
}

/*long long n,a,b,x,y,r=0,l=0,u=0,d=0,i,s;
cin>>n>>a>>b;
for(i=0;i<n;i++)
{cin>>x>>y;
if(x>a)
r++;
else if(x<a)
l++;
else if(y>b)
u++;
else if(y<b)
d++;

}

s=max(max(l,r),max(u,d));
if(s==r)
a++;
else if(s==l)
a--;
else if(s==u)
b++;
else if(s==d)
b--;

 cout<<s<<"\n"<<a<<" "<<b;

}*/

int main()
{ long long a;
//cin>>a;
//while(a--)
solve();
return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    long long n , si , sj;
    cin >> n >> si >> sj;
    long long cnt1 = 0;
    long long cnt2 = 0;
    long long cnt3 = 0;
    long long cnt4 = 0;
    for(long long i = 1; i <= n; i++){
        long long x , y;
        cin >> x >> y;
        if(x < si){
            ++cnt1;
        }
        if(x > si){
            ++cnt2;
        }
        if(y > sj){
            ++cnt3;
        }
        if(y < sj){
            ++cnt4;
        }
    }
    long long mx = max(cnt1 , max(cnt2 , max(cnt3 , cnt4)));
    if(cnt1 == mx){
        cout << cnt1 << " ";
        cout << si - 1 << " " << sj;
        return  0;
    }
    if(cnt2 == mx){
        cout << cnt2 << " ";
        cout << si + 1 << " " << sj;
        return  0;
    }
    if(cnt3 == mx){
        cout << cnt3 << " ";
        cout << si << " " << sj + 1;
        return  0;
    }
    if(cnt4 == mx){
        cout << cnt2 << " ";
        cout << si << " " << sj - 1;
        return 0;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    long long n , si , sj;
    cin >> n >> si >> sj;
    long long cnt1 = 0;
    long long cnt2 = 0;
    long long cnt3 = 0;
    long long cnt4 = 0;
    for(long long i = 1; i <= n; i++){
        long long x , y;
        cin >> x >> y;
        if(x < si){
            ++cnt1;
        }
        if(x > si){
            ++cnt2;
        }
        if(y > sj){
            ++cnt3;
        }
        if(y < sj){
            ++cnt4;
        }
    }
    long long mx = max(cnt1 , max(cnt2 , max(cnt3 , cnt4)));
    if(cnt1 == mx){
        cout << cnt1 << " ";
        cout << si - 1 << " " << sj;
        return  0;
    }
    if(cnt2 == mx){
        cout << cnt2 << " ";
        cout << si + 1 << " " << sj;
        return  0;
    }
    if(cnt3 == mx){
        cout << cnt3 << " ";
        cout << si << " " << sj - 1;
        return  0;
    }
    if(cnt4 == mx){
        cout << cnt2 << " ";
        cout << si << " " << sj + 1;
        return 0;
    }
    return 0;
}


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

typedef long long ll;

ll n,sx,sy;
ll l,r,u,d;

int main(){
    cin>>n;
    ll a,b;
    cin>>sx>>sy;
    for(int i=1;i<=n;i++){
        cin>>a>>b;
        if(a<sx)l++;
        if(a>sx)r++;
        if(b<sy)u++;
        if(b>sy)d++;
    }
    ll mx=max(d,max(u,max(l,r)));
    if(mx==d){
        cout<<d<<endl;
        cout<<sx<<" "<<sy+1;
    }
    else if(mx==u){
        cout<<u<<endl;
        cout<<sx<<" "<<sy-1;
    }
    else if(mx==l){
        cout<<l<<endl;
        cout<<sx-1<<" "<<sy;
    }
    else if(mx==r){
        cout<<r<<endl;
        cout<<sx+1<<" "<<sy;
    }
    return 0;
}


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

int main(){
    long long n , si , sj;
    cin >> n >> si >> sj;
    long long cnt1 = 0;
    long long cnt2 = 0;
    long long cnt3 = 0;
    long long cnt4 = 0;
    for(int i = 1; i <= n; i++){
        long long x , y;
        cin >> x >> y;
        if(x < si){
            ++cnt1;
        }
        if(x > si){
            ++cnt2;
        }
        if(y > sj){
            ++cnt3;
        }
        if(y < sj){
            ++cnt4;
        }
    }
    long long mx = max(cnt1 , max(cnt2 , max (cnt3 , cnt4)));
    if(cnt1 == mx){

        cout << cnt1 << " ";
        cout << si - 1 << " " << sj;
        return  0;
    }
    if(cnt2 == mx){
        cout << cnt2 << " ";
        cout << si + 1 << " " << sj;
        return  0;
    }
    if(cnt3 == mx){

        cout << cnt3 << " ";
        cout << si << " " << sj + 1;
        return  0;
    }
    if(cnt4 == mx){
        cout << cnt2 << " ";
        cout << si << " " << sj - 1;
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main(){
    long long n , si , sj;
    cin >> n >> si >> sj;
    long long cnt1 = 0;
    long long cnt2 = 0;
    long long cnt3 = 0;
    long long cnt4 = 0;
    for(long long i = 1; i <= n; i++){
        long long x , y;
        cin >> x >> y;
        if(x < si){
            ++cnt1;
        }
        if(x > si){
            ++cnt2;
        }
        if(y > sj){
            ++cnt3;
        }
        if(y < sj){
            ++cnt4;
        }
    }
    long long mx = max(cnt1 , max(cnt2 , max (cnt3 , cnt4)));
    if(cnt1 == mx){
        cout << cnt1 << " ";
        cout << si - 1 << " " << sj;
        return  0;
    }
    if(cnt2 == mx){
        cout << cnt2 << " ";
        cout << si + 1 << " " << sj;
        return  0;
    }
    if(cnt3 == mx){
        cout << cnt3 << " ";
        cout << si << " " << sj + 1;
        return  0;
    }
    if(cnt4 == mx){
        cout << cnt2 << " ";
        cout << si << " " << sj - 1;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, sx, sy;
	cin>>n>>sx>>sy;
	int a[4] = {0};
	for(int i=0; i<n; i++){
		int x, y;
		cin>>x>>y;
		if(x == sx ){
			if( y > sy) a[1]++;
			else a[3]++;
			continue;
		}
		if( y == sy){
			if(sx > x) a[0]++;
			else a[2]++;
			continue;
		}
		if(x > sy) a[2]++;
		if(y > sy) a[1]++;
		if(x < sx) a[0]++;
		if(y < sy) a[3]++;
	}
	int ans = max({a[0], a[1], a[2], a[3]});
	cout<<ans<<endl;
	if(ans == a[0]){
		cout<<sx-1<<" "<<sy;
		return 0;
	}
	if(ans == a[1]){
		cout<<sx<<" "<<sy+1;
		return 0;
	}
	if(ans == a[2]){
		cout<<sx+1<<" "<<sy;
		return 0;
	}
	if(ans == a[3]){
		cout<<sx-1<<" "<<sy;
		return 0;
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, sx, sy;
	cin>>n>>sx>>sy;
	int a[4] = {0};
	for(int i=0; i<n; i++){
		int x, y;
		cin>>x>>y;
		if(x == sx ){
			if( y > sy) a[1]++;
			else a[3]++;
			continue;
		}
		if( y == sy){
			if(x < sx) a[0]++;
			else a[2]++;
			continue;
		}
		if(x > sx) a[2]++;
		if(y > sy) a[1]++;
		if(x < sx) a[0]++;
		if(y < sy) a[3]++;
	}
	int ans = max({a[0], a[1], a[2], a[3]});
// 	for(int i=0; i<4; i++) cout<<a[i];
// 	cout<<endl;
	cout<<ans<<endl;
	if(ans == a[0]){
		cout<<sx-1<<" "<<sy;
		return 0;
	}
	if(ans == a[1]){
		cout<<sx<<" "<<sy+1;
		return 0;
	}
	if(ans == a[2]){
		cout<<sx+1<<" "<<sy;
		return 0;
	}
	if(ans == a[3]){
		cout<<sx<<" "<<sy-1;
		return 0;
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, sx, sy;
	cin>>n>>sx>>sy;
	int a[4] = {0};
	for(int i=0; i<n; i++){
		int x, y;
		cin>>x>>y;
		if(x == sx ){
			if( y > sy) a[3]++;
			else a[1]++;
			continue;
		}
		if( y == sy){
			if(x < sx) a[0]++;
			else a[2]++;
			continue;
		}
		if(x > sx) a[2]++;
		if(y > sy) a[1]++;
		if(x < sx) a[0]++;
		if(y < sy) a[3]++;
	}
	int ans = max({a[0], a[1], a[2], a[3]});
// 	for(int i=0; i<4; i++) cout<<a[i];
// 	cout<<endl;
	cout<<ans<<endl;
	if(ans == a[0]){
		cout<<sx-1<<" "<<sy;
		return 0;
	}
	if(ans == a[1]){
		cout<<sx<<" "<<sy+1;
		return 0;
	}
	if(ans == a[2]){
		cout<<sx+1<<" "<<sy;
		return 0;
	}
	if(ans == a[3]){
		cout<<sx<<" "<<sy-1;
		return 0;
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, sx, sy;
	cin>>n>>sx>>sy;
	int a[4] = {0};
	for(int i=0; i<n; i++){
		int x, y;
		cin>>x>>y;
		if(x == sx ){
			if( y > sy) a[3]++;
			else a[1]++;
			continue;
		}
		if( y == sy){
			if(x < sx) a[0]++;
			else a[3]++;
			continue;
		}
		if(x > sx) a[2]++;
		if(y > sy) a[1]++;
		if(x < sx) a[0]++;
		if(y < sy) a[3]++;
	}
	int ans = max({a[0], a[1], a[2], a[3]});
	cout<<ans<<endl;
	if(ans == a[0]){
		cout<<sx-1<<" "<<sy;
		return 0;
	}
	if(ans == a[1]){
		cout<<sx<<" "<<sy+1;
		return 0;
	}
	if(ans == a[2]){
		cout<<sx+1<<" "<<sy;
		return 0;
	}
	if(ans == a[3]){
		cout<<sx-1<<" "<<sy;
		return 0;
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, sx, sy;
	cin>>n>>sx>>sy;
	int a[4] = {0};
	for(int i=0; i<n; i++){
		int x, y;
		cin>>x>>y;
		if(x > sx) a[2]++;
		if(y > sy) a[1]++;
		if(x < sx) a[0]++;
		if(y < sy) a[3]++;
	}
	int ans = max({a[0], a[1], a[2], a[3]});
	cout<<ans<<endl;
	if(ans == a[0]){
		cout<<sx-1<<" "<<sy;
		return 0;
	}
	if(ans == a[1]){
		cout<<sx<<" "<<sy+1;
		return 0;
	}
	if(ans == a[2]){
		cout<<sx+1<<" "<<sy;
		return 0;
	}
	if(ans == a[3]){
		cout<<sx<<" "<<sy-1;
		return 0;
	}
}


//Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>
#define PI             acos(-1.0)
#define IOS            ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ms(a,b)         memset(a, b, sizeof(a))
#define check          cout<<"I am in here BRO!"<<endl;
#define ll long long int
using namespace std;
const int MOD = (int)1e9+7;
void solve()
{
    ll n,sx,sy;
    cin>>n>>sx>>sy;
    vector<pair<ll,ll>>pr;
    for(ll i=0;i<n;i++)
    {
        ll x,y;
        cin>>x>>y;
        pr.push_back(make_pair(x,y));
    }
    sort(pr.begin(),pr.end());
    ll choto=0,chotox=0,chotoy=0,boro=0,borox=0,boroy=0;
    for(int i=0;i<n;i++)
    {
        //cout<<choto<<" "<<boro<<endl;
        ll x=pr[i].first;
        ll y=pr[i].second;
        if(x<sx){chotox++;}
        if(y<sy){chotoy++;}
        if(x>sx){borox++;}
        if(y>sy){boroy++;}
    }
    //cout<<choto<<" "<<boro<<endl;
                if(borox>=boroy&& borox>=chotox && borox>=chotoy)
           {
            cout<<borox<<endl;
            cout<<sx+1<<" "<<sy<<endl;
           }
           else if(boroy>=borox&& boroy>=chotox && boroy>=chotoy)
           {
            cout<<boroy<<endl;
            cout<<sx<<" "<<sy+1<<endl;
           }
            else if(chotoy>=boroy&& chotoy>=borox && chotoy>=chotox)
           {
            cout<<chotoy<<endl;
            cout<<sx<<" "<<sy-1<<endl;
           }
          else if(chotox>=boroy&& chotox>=borox && chotox>=chotoy)
           {
            cout<<chotox<<endl;
            cout<<sx-1<<" "<<sy<<endl;
           }

}
int  main()
{
    IOS
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","wt",stdout);
    solve();
    return 0;
}


//Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>
#define PI             acos(-1.0)
#define IOS            ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ms(a,b)         memset(a, b, sizeof(a))
#define check          cout<<"I am in here BRO!"<<endl;
#define ll long long int
using namespace std;
const int MOD = (int)1e9+7;
void solve()
{
    ll n,sx,sy;
    cin>>n>>sx>>sy;
    vector<pair<ll,ll>>pr;
    for(ll i=0;i<n;i++)
    {
        ll x,y;
        cin>>x>>y;
        pr.push_back(make_pair(x,y));
    }
    sort(pr.begin(),pr.end());
    ll choto=0,chotox=0,chotoy=0,boro=0,borox=0,boroy=0;
    for(int i=0;i<n;i++)
    {
        //cout<<choto<<" "<<boro<<endl;
        ll x=pr[i].first;
        ll y=pr[i].second;
        if(x<sx){choto++;chotox++;}
        else if(x==sx && y<sy){choto++;chotoy++;}
        else if(x>sx){boro++;borox++;}
        else if(x==sx && y>sy){boro++;boroy++;}
    }
    //cout<<choto<<" "<<boro<<endl;
    if(choto>boro)
    {
            if(chotox<chotoy)
           {
            cout<<choto<<endl;
            cout<<sx<<" "<<sy-1<<endl;
           }
           else
           {
               cout<<choto<<endl;
            cout<<sx-1<<" "<<sy<<endl;
           }
    }
    else
    {
        if(borox<boroy){
            cout<<boro<<endl;
            cout<<sx<<" "<<sy+1<<endl;
        }
        else{
            cout<<boro<<endl;
            cout<<sx+1<<" "<<sy<<endl;
        }
    }
}
int  main()
{
    IOS
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","wt",stdout);
    solve();
    return 0;
}


//Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>
#define PI             acos(-1.0)
#define IOS            ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ms(a,b)         memset(a, b, sizeof(a))
#define check          cout<<"I am in here BRO!"<<endl;
#define ll long long int
using namespace std;
const int MOD = (int)1e9+7;
void solve()
{
    ll n,sx,sy;
    cin>>n>>sx>>sy;
    vector<pair<ll,ll>>pr;
    for(ll i=0;i<n;i++)
    {
        ll x,y;
        cin>>x>>y;
        pr.push_back(make_pair(x,y));
    }
    sort(pr.begin(),pr.end());
    ll choto=0,chotox=0,chotoy=0,boro=0,borox=0,boroy=0;
    for(int i=0;i<n;i++)
    {
        //cout<<choto<<" "<<boro<<endl;
        ll x=pr[i].first;
        ll y=pr[i].second;
        if(x<sx){choto++;chotox++;}
        else if(x==sx && y<sy){choto++;chotoy++;}
        else if(x>sx){boro++;borox++;}
        else if(x==sx && y>sy){boro++;boroy++;}
    }
    //cout<<choto<<" "<<boro<<endl;
    if(choto>boro)
    {
            if(chotox<chotoy)
           {
            ll tmx=sx;
            ll tmy=sy-1;

            ll Cnt=0;
            for(int i=0;i<n;i++)
            {
                 ll x=pr[i].first;
            ll y=pr[i].second;
                if((abs(sx-x)+abs(sy-y))>=(abs(tmx-x)+abs(tmy-y)))Cnt++;
            }
            cout<<Cnt<<endl;
              cout<<tmx<<" "<<tmy<<endl;
           }
           else
           {
              ll tmx=sx-1;
            ll tmy=sy;

            ll Cnt=0;
            for(int i=0;i<n;i++)
            {
                ll x=pr[i].first;
            ll y=pr[i].second;
                if((abs(sx-x)+abs(sy-y))>=(abs(tmx-x)+abs(tmy-y)))Cnt++;
            }
            cout<<Cnt<<endl;
              cout<<tmx<<" "<<tmy<<endl;
           }
    }
    else
    {
        if(borox<boroy){
            ll tmx=sx;
            ll tmy=sy+1;

            ll Cnt=0;
            for(int i=0;i<n;i++)
            {
                ll x=pr[i].first;
            ll y=pr[i].second;
                if((abs(sx-x)+abs(sy-y))>=(abs(tmx-x)+abs(tmy-y)))Cnt++;
            }
            cout<<Cnt<<endl;
              cout<<tmx<<" "<<tmy<<endl;
        }
        else{
            ll tmx=sx+1;
            ll tmy=sy;

            ll Cnt=0;
            for(int i=0;i<n;i++)
            {
                ll x=pr[i].first;
            ll y=pr[i].second;
                if((abs(sx-x)+abs(sy-y))>=(abs(tmx-x)+abs(tmy-y)))Cnt++;
            }
            cout<<Cnt<<endl;
            cout<<tmx<<" "<<tmy<<endl;
        }
    }
}
int  main()
{
    IOS
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","wt",stdout);
    solve();
    return 0;
}


//Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>
#define PI             acos(-1.0)
#define IOS            ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ms(a,b)         memset(a, b, sizeof(a))
#define check          cout<<"I am in here BRO!"<<endl;
#define ll long long int
using namespace std;
const int MOD = (int)1e9+7;
void solve()
{
    ll n,sx,sy;
    cin>>n>>sx>>sy;
    vector<pair<ll,ll>>pr;
    for(ll i=0;i<n;i++)
    {
        ll x,y;
        cin>>x>>y;
        pr.push_back(make_pair(x,y));
    }
    sort(pr.begin(),pr.end());
    ll choto=0,chotox=0,chotoy=0,boro=0,borox=0,boroy=0;
    for(int i=0;i<n;i++)
    {
        //cout<<choto<<" "<<boro<<endl;
        ll x=pr[i].first;
        ll y=pr[i].second;
        if(x<sx){choto++;chotox++;}
        else if(x>sx){boro++;borox++;}
    }
    //cout<<choto<<" "<<boro<<endl;
    if(choto>boro)
    {
            cout<<choto<<endl;
            cout<<sx+1<<" "<<sy<<endl;
    }
    else
    {
            cout<<boro<<endl;
            cout<<sx+1<<" "<<sy<<endl;
    }
}
int  main()
{
    IOS
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","wt",stdout);
    solve();
    return 0;
}


//Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>
#define PI             acos(-1.0)
#define IOS            ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ms(a,b)         memset(a, b, sizeof(a))
#define check          cout<<"I am in here BRO!"<<endl;
#define ll long long int
using namespace std;
const int MOD = (int)1e9+7;
void solve()
{
    ll n,sx,sy;
    cin>>n>>sx>>sy;
    vector<pair<ll,ll>>pr;
    for(ll i=0;i<n;i++)
    {
        ll x,y;
        cin>>x>>y;
        pr.push_back(make_pair(x,y));
    }
    sort(pr.begin(),pr.end());
    ll choto=0,chotox=0,chotoy=0,boro=0,borox=0,boroy=0;
    for(int i=0;i<n;i++)
    {
        //cout<<choto<<" "<<boro<<endl;
        ll x=pr[i].first;
        ll y=pr[i].second;
        if(x<sx){choto++;chotox++;}
        else if(x>sx){boro++;borox++;}
    }
    //cout<<choto<<" "<<boro<<endl;
    if(choto>boro)
    {
            cout<<choto<<endl;
            cout<<sx-1<<" "<<sy<<endl;
    }
    else
    {
            cout<<boro<<endl;
            cout<<sx+1<<" "<<sy<<endl;
    }
}
int  main()
{
    IOS
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","wt",stdout);
    solve();
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long maxx(long long a,long long b)
{
	if(a>b)
		return a;
	return b;
}
int main()
{
	long long n;
	long long a,b;
	long long c,d,e,f;
	c=e=d=f=0;
	cin>>n>>a>>b;
	for(long long i=0;i<n;++i)
	{
		long long j,k;
		cin>>j>>k;
		if(j<a)
			c++;
		if(j>a)
		{
			d++;
		}
		if(k<a)
			e++;
		if(k>a)
			f++;
	}
	long long m=maxx(maxx(c,d),maxx(e,f));
	if(m==c)
	{
		cout<<m<<endl<<a-1<<" "<<b;
	}
	else if(m==d)
	{
		cout<<m<<endl<<a+1<<" "<<b;
	}
	else if(m==d)
	{
		cout<<m<<endl<<a<<" "<<b-1;
	}
	else if(m==d)
	{
		cout<<m<<endl<<a<<" "<<b+1;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long n;
	long long a,b;
	long long c,d,e,f;
	c=e=d=f=0;
	cin>>n>>a>>b;
	for(long long i=0;i<n;++i)
	{
		long long j,k;
		cin>>j>>k;
		if(j<a)
			c++;
		if(j>a)
		{
			d++;
		}
		if(k<a)
			e++;
		if(k>a)
			f++;
	}
	long long m=max(max(c,d),max(e,f));
	if(m==c)
	{
		cout<<m<<endl<<a-1<<" "<<b;
	}
	else if(m==d)
	{
		cout<<m<<endl<<a+1<<" "<<b;
	}
	else if(m==e)
	{
		cout<<m<<endl<<a<<" "<<b-1;
	}
	else if(m==f)
	{
		cout<<m<<endl<<a<<" "<<b+1;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	int a,b;
	int c,d,e,f;
	c=e=d=f=0;
	cin>>n>>a>>b;
	for(int i=0;i<n;++i)
	{
		int j,k;
		cin>>j>>k;
		if(j<a)
			c++;
		if(j>a)
		{
			d++;
		}
		if(k<a)
			e++;
		if(k>a)
			f++;
	}
	int m=max(max(c,d),max(e,f));
	if(m==c)
	{
		cout<<m<<endl<<a-1<<" "<<b;
	}
	else if(m==d)
	{
		cout<<m<<endl<<a+1<<" "<<b;
	}
	else if(m==d)
	{
		cout<<m<<endl<<a<<" "<<b-1;
	}
	else if(m==d)
	{
		cout<<m<<endl<<a<<" "<<b+1;
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long n;
	long long a,b;
	long long c,d,e,f;
	c=e=d=f=0;
	cin>>n>>a>>b;
	for(long long i=0;i<n;++i)
	{
		long long j,k;
		cin>>j>>k;
		if(j<a)
			c++;
		if(j>a)
		{
			d++;
		}
		if(k<a)
			e++;
		if(k>a)
			f++;
	}
	long long m=max(max(c,d),max(e,f));
	if(m==c)
	{
		cout<<m<<endl<<a-1<<" "<<b;
	}
	else if(m==d)
	{
		cout<<m<<endl<<a+1<<" "<<b;
	}
	else if(m==d)
	{
		cout<<m<<endl<<a<<" "<<b-1;
	}
	else if(m==d)
	{
		cout<<m<<endl<<a<<" "<<b+1;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long n;
	long long a,b;
	long long c,d,e,f;
	c=e=d=f=0;
	cin>>n>>a>>b;
	for(long long i=0;i<n;++i)
	{
		long long j,k;
		cin>>j>>k;
		if(j<a)
			c++;
		if(j>a)
		{
			d++;
		}
		if(k<b)
			e++;
		if(k>b)
			f++;
	}
	long long m=max(max(c,d),max(e,f));
	if(m==c)
	{
		cout<<m<<endl<<a-1<<" "<<b;
	}
	else if(m==d)
	{
		cout<<m<<endl<<a+1<<" "<<b;
	}
	else if(m==e)
	{
		cout<<m<<endl<<a<<" "<<b-1;
	}
	else if(m==f)
	{
		cout<<m<<endl<<a<<" "<<b+1;
	}
	return 0;
}


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

int n, sx, sy, l, r, u, d;

int main ()
{
	cin >> n >> sx >> sy;

	for(int i=0, x, y; i<n; ++i)
	{
		cin >> x >> y;
		if(x<sx) ++l; if(x>sx) ++r;
		if(y>sy) ++u; if(x<sx) ++d;
	}

	int ma = max({u,d,l,r});

	if(ma==l) cout << l << ' ' << --sx << ' ' << sy;
	else if(ma==r) cout << r << ' ' << ++sx << ' ' << sy;
	else if(ma==u) cout << u << ' ' << sx << ' ' << ++sy;
	else if(ma==d) cout << d <<' ' << sx << ' ' << --sy;
}


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

int n, sx, sy, l, r, u, d;

int main ()
{
	cin >> n >> sx >> sy;

	for(int i=0, x, y; i<n; ++i)
	{
		cin >> x >> y;
		if(x<sx) ++l; if(x>sx) ++r;
		if(y>sy) ++u; if(x<sx) ++d;
	}

	int ma = max({u,d,l,r});

	if(ma==l) cout << l << ' ' << --sx << ' ' << sy;
	else if(ma==r) cout << r << ' ' << ++sx << ' ' << sy;
	else if(ma==u) cout << u << ' ' << sx << ' ' << --sy;
	else if(ma==d) cout << d <<' ' << sx << ' ' << ++sy;
}


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

int n, sx, sy, l, r, u, d;

int main ()
{
	cin >> n >> sx >> sy;

	for(int i=0, x, y; i<n; ++i)
	{
		cin >> x >> y;
		if(x<sx) ++l; if(x>sx) ++r;
		if(y<sy) ++u; if(x>sx) ++d;
	}

	int ma = max({u,d,l,r});

	if(ma==l) cout << --sx << ' ' << sy;
	else if(ma==r) cout << ++sx << ' ' << sy;
	else if(ma==u) cout <<sx << ' ' << --sy;
	else if(ma==d) cout << sx << ' ' << ++sy;
}


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

int n, sx, sy, l, r, u, d;

int main ()
{
  cin >> n >> sx >> sy;

  for(int i=0, x, y; i<n; ++i)
  {
    cin >> x >> y;
    if(x<sx) ++l; if(x>sx) ++r;
    if(y>sy) ++u; if(y<sy) ++d;
  }

  int ma = max({u,d,l,r});

  cout << ma << ' ';

  if(ma==l) cout << --sx << ' ' << sy;
  else if(ma==r) cout << ++sx << ' ' << sy;
  else if(ma==u) cout << sx << ' ' << ++sy;
  else if(ma==d) cout << sx << ' ' << --sy;
}


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

int n, sx, sy, l, r, u, d;

int main ()
{
	cin >> n >> sx >> sy;

	for(int i=0, x, y; i<n; ++i)
	{
		cin >> x >> y;
		if(x<sx) ++l; if(x>sx) ++r;
		if(y<sy) ++u; if(x>sx) ++d;
	}

	int ma = max({u,d,l,r});

	if(ma==l) cout << l << ' ' << --sx << ' ' << sy;
	else if(ma==r) cout << r << ' ' << ++sx << ' ' << sy;
	else if(ma==u) cout << u << ' ' << sx << ' ' << --sy;
	else if(ma==d) cout << d <<' ' << sx << ' ' << ++sy;
}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define Min(x,y,z) min(x,min(y,z))
#define Max(x,y,z) max(x,max(y,z))
#define forn(i,n) for(int i=0;i<n;i++)
#define fore(i, l, r) for(int i = int(l); i <= int(r); i++)
#define pb push_back
#define All(a) a.begin(),a.end()
#define endl "\n"
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long int> vli;
typedef long double ld;
/*int ciel(int a,int b)
{
  if(a%b)
  {
    return (a/b)+1;
  }
  else
  {
    return (a/b);
  }

}*/

/*int ncr(int n,int r)
{
  if(r==1)return n;
  if(r==0)return 1;
  if(r>n)return 0;
  return (n*ncr(n-1,r-1))/r;
}
*/
/*ll lastdig(ll n){

    if(n<10)return n;
    return lastdig(n%10);
}*/
/*ll numdig(ll n){
  int c=0;
  while(n){
    n/=10;
    c++;
  }
  return c;
}*/

int32_t main()
{
   IOS;
   int n,X,Y,x,y,mx,l,r,u,d;
   cin>>n>>X>>Y;
    forn(i,n){
      cin>>x>>y;
      if(x<X)l++;
      if(x>X)r++;
      if(y<Y)d++;
      if(y>Y)u++;
      }
    mx=max(max(l,r),max(d,u));
    if(mx==l)X--;
    else if(mx==r)X++;
    else if(mx==d)Y--;
    else Y++;
    cout<<mx<<endl<<X<<' '<<Y;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define Min(x,y,z) min(x,min(y,z))
#define Max(x,y,z) max(x,max(y,z))
#define forn(i,n) for(int i=0;i<n;i++)
#define fore(i, l, r) for(int i = int(l); i <= int(r); i++)
#define pb push_back
#define All(a) a.begin(),a.end()
#define endl "\n"
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long int> vli;
typedef long double ld;
/*int ciel(int a,int b)
{
  if(a%b)
  {
    return (a/b)+1;
  }
  else
  {
    return (a/b);
  }

}*/

/*int ncr(int n,int r)
{
  if(r==1)return n;
  if(r==0)return 1;
  if(r>n)return 0;
  return (n*ncr(n-1,r-1))/r;
}
*/
/*ll lastdig(ll n){

    if(n<10)return n;
    return lastdig(n%10);
}*/
/*ll numdig(ll n){
  int c=0;
  while(n){
    n/=10;
    c++;
  }
  return c;
}*/

int32_t main()
{
    IOS;
    int n,sx,sy,ans;
    cin>>n>>sx>>sy;
    vi x(n),y(n),before_sx,after_sx,before_sy,after_sy,sz;
    forn(i,n){
      cin>>x[i]>>y[i];

        (y[i]>sy)?after_sy.pb(y[i]):before_sy.pb(y[i]);

       (x[i]>sx)?after_sx.pb(x[i]):before_sx.pb(x[i]);

    }
    sort(All(after_sx));
    sort(All(before_sx));
    sort(All(after_sy));
    sort(All(before_sy));
    sz.pb(after_sx.size());
    sz.pb(before_sx.size());
    sz.pb(after_sy.size());
    sz.pb(before_sy.size());
    sort(All(sz));
    cout<<sz[3]<<endl;
    if(sz[3]==after_sx.size()){
      cout<<after_sx[0]<<" "<<sy;
      return 0;
    }
    else if(sz[3]==before_sx.size()){
      cout<<before_sx[before_sx.end()]<<" "<<sy;
      return 0;
    }
    else if(sz[3]==after_sy.size()){
      cout<<sx<<" "<<after_sy[0];
      return 0;
    }
    else{
      cout<<sx<<" "<<before_sy[before_sy.end()];
      return 0;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define Min(x,y,z) min(x,min(y,z))
#define Max(x,y,z) max(x,max(y,z))
#define forn(i,n) for(int i=0;i<n;i++)
#define fore(i, l, r) for(int i = int(l); i <= int(r); i++)
#define pb push_back
#define All(a) a.begin(),a.end()
#define endl "\n"
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long int> vli;
typedef long double ld;
/*int ciel(int a,int b)
{
  if(a%b)
  {
    return (a/b)+1;
  }
  else
  {
    return (a/b);
  }

}*/

/*int ncr(int n,int r)
{
  if(r==1)return n;
  if(r==0)return 1;
  if(r>n)return 0;
  return (n*ncr(n-1,r-1))/r;
}
*/
/*ll lastdig(ll n){

    if(n<10)return n;
    return lastdig(n%10);
}*/
/*ll numdig(ll n){
  int c=0;
  while(n){
    n/=10;
    c++;
  }
  return c;
}*/

int32_t main()
{
    IOS;
    int n,sx,sy,ans;
    cin>>n>>sx>>sy;
    vi x(n),y(n),before_sx,after_sx,before_sy,after_sy,sz;
    forn(i,n){
      cin>>x[i]>>y[i];
      if(sx==x[i]){
        (y[i]>sy)?after_sy.pb(y[i]):before_sy.pb(y[i]);
      }
      else{
       (x[i]>sx)?after_sx.pb(x[i]):before_sx.pb(x[i]);
      }
    }
    sort(All(after_sx));
    sort(All(before_sx));
    sort(All(after_sy));
    sort(All(before_sy));
    sz.pb(after_sx.size());
    sz.pb(before_sx.size());
    sz.pb(after_sy.size());
    sz.pb(before_sy.size());
    sort(All(sz));
    cout<<sz[3]<<endl;
    if(sz[3]==after_sx.size()){
      cout<<after_sx[0]<<" "<<sy;
      return 0;
    }
    else if(sz[3]==before_sx.size()){
      cout<<before_sx[0]<<" "<<sy;
      return 0;
    }
    else if(sz[3]==after_sy.size()){
      cout<<sx<<" "<<after_sy[0];
      return 0;
    }
    else{
      cout<<sx<<" "<<before_sy[0];
      return 0;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define Min(x,y,z) min(x,min(y,z))
#define Max(x,y,z) max(x,max(y,z))
#define forn(i,n) for(int i=0;i<n;i++)
#define fore(i, l, r) for(int i = int(l); i <= int(r); i++)
#define pb push_back
#define All(a) a.begin(),a.end()
#define endl "\n"
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long int> vli;
typedef long double ld;
/*int ciel(int a,int b)
{
  if(a%b)
  {
    return (a/b)+1;
  }
  else
  {
    return (a/b);
  }

}*/

/*int ncr(int n,int r)
{
  if(r==1)return n;
  if(r==0)return 1;
  if(r>n)return 0;
  return (n*ncr(n-1,r-1))/r;
}
*/
/*ll lastdig(ll n){

    if(n<10)return n;
    return lastdig(n%10);
}*/
/*ll numdig(ll n){
  int c=0;
  while(n){
    n/=10;
    c++;
  }
  return c;
}*/

int32_t main()
{
    IOS;
    int n,sx,sy,ans;
    cin>>n>>sx>>sy;
    vi x(n),y(n),before_sx,after_sx,before_sy,after_sy,sz;
    forn(i,n){
      cin>>x[i]>>y[i];

        (y[i]>sy)?after_sy.pb(y[i]):before_sy.pb(y[i]);

       (x[i]>sx)?after_sx.pb(x[i]):before_sx.pb(x[i]);

    }
    sort(All(after_sx));
    sort(All(before_sx));
    sort(All(after_sy));
    sort(All(before_sy));
    sz.pb(after_sx.size());
    sz.pb(before_sx.size());
    sz.pb(after_sy.size());
    sz.pb(before_sy.size());
    sort(All(sz));
    cout<<sz[3]<<endl;
    if(sz[3]==after_sx.size()){
      cout<<after_sx[0]<<" "<<sy;
      return 0;
    }
    else if(sz[3]==before_sx.size()){
      cout<<before_sx[before_sx.size()-1]<<" "<<sy;
      return 0;
    }
    else if(sz[3]==after_sy.size()){
      cout<<sx<<" "<<after_sy[0];
      return 0;
    }
    else{
      cout<<sx<<" "<<before_sy[before_sy.size()-1];
      return 0;
    }
}


#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define Min(x,y,z) min(x,min(y,z))
#define Max(x,y,z) max(x,max(y,z))
#define forn(i,n) for(int i=0;i<n;i++)
#define fore(i, l, r) for(int i = int(l); i <= int(r); i++)
#define pb push_back
#define All(a) a.begin(),a.end()
#define endl "\n"
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long int> vli;
typedef long double ld;
/*int ciel(int a,int b)
{
  if(a%b)
  {
    return (a/b)+1;
  }
  else
  {
    return (a/b);
  }

}*/

/*int ncr(int n,int r)
{
  if(r==1)return n;
  if(r==0)return 1;
  if(r>n)return 0;
  return (n*ncr(n-1,r-1))/r;
}
*/
/*ll lastdig(ll n){

    if(n<10)return n;
    return lastdig(n%10);
}*/
/*ll numdig(ll n){
  int c=0;
  while(n){
    n/=10;
    c++;
  }
  return c;
}*/

int32_t main()
{
   IOS;
   int n,X,Y,x,y,mx,l=0,r=0,u=0,d=0;
   cin>>n>>X>>Y;
    forn(i,n){
      cin>>x>>y;
      if(x<X)l++;
      if(x>X)r++;
      if(y<Y)d++;
      if(y>Y)u++;
      }
    mx=max(max(l,r),max(d,u));
    if(mx==l)X--;
    else if(mx==r)X++;
    else if(mx==d)Y--;
    else Y++;
    cout<<mx<<endl<<X<<' '<<Y;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long int
#define fast ios::sync_with_stdio(false);cin.tie(0)
#define scan(arr,a,n) for(int i=(a);i<(n);i++)cin>>(arr)[i];
#define print(arr,a,n)for(int i=(a);i<(n);i++)cout<<(arr)[i]<<" ";

int32_t main()
{
    fast;
    int n,a,b;
    cin>>n>>a>>b;
    int x[n],y[n];
     int p=pow(10,9);
    int a1=0,a2=0,a3=0,a4=0;
    for(int i=0;i<n;i++)
    {
        cin>>x[i]>>y[i];
    }
    for(int i=0;i<n;i++)
    {
        if( p>=a+1 && a+1<=x[i])
          a1++;
        if(a-1>=0 && x[i]<=a-1)
        a2++;
        if( p>=b+1 && b+1<=y[i])
          a3++;
        if( b-1>=0 &&  x[i]<=b-1)
        a4++;
    }
    int m=max(max(a4,a3),max(a1,a2));

    if(a1==m)
    {
        cout<<a1<<endl;
        cout<<a+1<<" "<<b;
        return 0;
    }
    if(a2==m  )
    {
          cout<<a2<<endl;
        cout<<a-1<<" "<<b;
        return 0;
    }
    if(a3==m)
    {
          cout<<a3<<endl;
        cout<<a<<" "<<b+1;
        return 0;
    }
    if(a4==m )
    {
        cout<<a4<<endl;
        cout<<a<<" "<<b-1;
        return 0;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long int
#define fast ios::sync_with_stdio(false);cin.tie(0)
#define scan(arr,a,n) for(int i=(a);i<(n);i++)cin>>(arr)[i];
#define print(arr,a,n)for(int i=(a);i<(n);i++)cout<<(arr)[i]<<" ";

int32_t main()
{
    fast;
    int n,a,b;
    cin>>n>>a>>b;
    int x[n],y[n];
     int p=pow(10,9);
    int a1=0,a2=0,a3=0,a4=0;
    for(int i=0;i<n;i++)
    {
        cin>>x[i]>>y[i];
    }
    for(int i=0;i<n;i++)
    {
        if( p>=a+1 && a+1<=x[i])
          a1++;
        if(a-1>=0 && x[i]<=a-1)
        a2++;
        if( p>=b+1 && b+1<=y[i])
          a3++;
        if( b-1>=0 &&  x[i]<=b-1)
        a4++;
    }
    int m=max(max(a4,a3),max(a1,a2));
    cout<<m<<endl;

    if(a1==m)
    {
        cout<<a+1<<" "<<b;
        return 0;
    }
    if(a2==m  )
    {
        cout<<a-1<<" "<<b;
        return 0;
    }
    if(a3==m)
    {
        cout<<a<<" "<<b+1;
        return 0;
    }
    if(a4==m )
    {
        cout<<a<<" "<<b-1;
        return 0;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long int
#define fast ios::sync_with_stdio(false);cin.tie(0)
#define scan(arr,a,n) for(int i=(a);i<(n);i++)cin>>(arr)[i];
#define print(arr,a,n)for(int i=(a);i<(n);i++)cout<<(arr)[i]<<" ";

int32_t main()
{
    fast;
    int n,a,b;
    cin>>n>>a>>b;
    int x[n],y[n];
    int a1=0,a2=0,a3=0,a4=0;
    for(int i=0;i<n;i++)
    {
        cin>>x[i]>>y[i];
    }
    for(int i=0;i<n;i++)
    {
        if(a+1<=x[i])
          a1++;
        if(x[i]<=a-1)
        a2++;
        if(b+1<=y[i])
          a3++;
        if(x[i]<=b-1)
        a4++;
    }
    int m=max(max(a4,a3),max(a1,a2));
    cout<<m<<endl;
    if(a1==m )
    {
        cout<<a+1<<" "<<b;
        return 0;
    }
    if(a2==m && a-1>=0)
    {
        cout<<a-1<<" "<<b;
        return 0;
    }
    if(a3==m)
    {
        cout<<a<<" "<<b+1;
        return 0;
    }
    if(a4==m && b-1>=0)
    {
        cout<<a<<" "<<b-1;
        return 0;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long int
#define fast ios::sync_with_stdio(false);cin.tie(0)
#define scan(arr,a,n) for(int i=(a);i<(n);i++)cin>>(arr)[i];
#define print(arr,a,n)for(int i=(a);i<(n);i++)cout<<(arr)[i]<<" ";

int32_t main()
{
    fast;
    int n,a,b;
    cin>>n>>a>>b;
    int x[n],y[n];
     int p=1000000001;
    int a1=0,a2=0,a3=0,a4=0;
    for(int i=0;i<n;i++)
    {
        cin>>x[i]>>y[i];
    }
    for(int i=0;i<n;i++)
    {
        if( p>a+1 && a+1<=x[i])
          a1++;
        if(a-1>=0 && x[i]<=a-1)
        a2++;
        if( p>b+1 && b+1<=y[i])
          a3++;
        if( b-1>=0 &&  x[i]<=b-1)
        a4++;
    }
    int m=max({a1,a2,a3,a4});

    if(a1==m)
    {
        cout<<a1<<endl;
        cout<<a+1<<" "<<b;
        return 0;
    }
    if(a2==m  )
    {
          cout<<a2<<endl;
        cout<<a-1<<" "<<b;
        return 0;
    }
    if(a3==m)
    {
          cout<<a3<<endl;
        cout<<a<<" "<<b+1;
        return 0;
    }
    if(a4==m )
    {
        cout<<a4<<endl;
        cout<<a<<" "<<b-1;
        return 0;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long int
#define fast ios::sync_with_stdio(false);cin.tie(0)
#define scan(arr,a,n) for(int i=(a);i<(n);i++)cin>>(arr)[i];
#define print(arr,a,n)for(int i=(a);i<(n);i++)cout<<(arr)[i]<<" ";

int32_t main()
{
    fast;
    int n,a,b;
    cin>>n>>a>>b;
    int x[n],y[n];
    int a1=0,a2=0,a3=0,a4=0;
    for(int i=0;i<n;i++)
    {
        cin>>x[i]>>y[i];
    }
    for(int i=0;i<n;i++)
    {
        if(a+1<=x[i])
          a1++;
        if(x[i]<=a-1)
        a2++;
        if(b+1<=y[i])
          a3++;
        if(x[i]<=b-1)
        a4++;
    }
    int m=max(max(a4,a3),max(a1,a2));
    cout<<m<<endl;
    if(a1==m)
    {
        cout<<a+1<<" "<<b;
        return 0;
    }
    if(a2==m)
    {
        cout<<a-1<<" "<<b;
        return 0;
    }
    if(a3==m)
    {
        cout<<a<<" "<<b+1;
        return 0;
    }
    if(a4==m)
    {
        cout<<a<<" "<<b-1;
        return 0;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long int
#define fast ios::sync_with_stdio(false);cin.tie(0)
#define scan(arr,a,n) for(int i=(a);i<(n);i++)cin>>(arr)[i];
#define print(arr,a,n)for(int i=(a);i<(n);i++)cout<<(arr)[i]<<" ";

int32_t main()
{
    fast;
    int n,a,b;
    cin>>n>>a>>b;
    int x[n],y[n];
     int p=1000000001;
    int a1=0,a2=0,a3=0,a4=0;
    for(int i=0;i<n;i++)
    {
        cin>>x[i]>>y[i];
    }
    for(int i=0;i<n;i++)
    {
        if( p>a+1 && a+1<=x[i])
          a1++;
        if(a-1>=0 && x[i]<=a-1)
        a2++;
        if( p>b+1 && b+1<=y[i])
          a3++;
        if( b-1>=0 &&  y[i]<=b-1)
        a4++;
    }
    int m=max({a1,a2,a3,a4});

    if(a1==m)
    {
        cout<<a1<<endl;
        cout<<a+1<<" "<<b;
        return 0;
    }
    if(a2==m  )
    {
          cout<<a2<<endl;
        cout<<a-1<<" "<<b;
        return 0;
    }
    if(a3==m)
    {
          cout<<a3<<endl;
        cout<<a<<" "<<b+1;
        return 0;
    }
    if(a4==m )
    {
        cout<<a4<<endl;
        cout<<a<<" "<<b-1;
        return 0;
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n , sx , sy ;
cin >> n >> sx >> sy ;
int a1=0 , a2=0 , a3=0 , a4=0 ;
for (int i = 0 ; i < n ; i++){
    long long x , y ;
    cin >> x >> y ;
    if (x<sx)a1++;
    if (x>sx)a2++;
    if (y>sy)a3++;
    if (y<sy)a4++;
}
int mx = max(a1,max(a2,max(a3,a4)));
if (a1==mx)cout << a1 <<endl << sx-1 << " " <<sy ;
else if (a2==mx)cout << a2 <<endl << sx+1 << " " <<sy ;
else if (a3==mx)cout << a3 <<endl << sx << " " <<sy+1 ;
else if (a4==mx)cout << a4 <<endl << sx << " " <<sy-1 ;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n , sx , sy ;
cin >> n >> sx >> sy ;
int a1=0 , a2=0 , a3=0 , a4=0 ;
for (int i = 0 ; i < n ; i++){
    long long x , y ;
    cin >> x >> y ;
    if (x<sx)a1++;
    if (x>sx)a2++;
    if (y>sy)a3++;
    if (y<sy)a4++;
}
int mx = max(a1,max(a2,max(a3,a4)));
if (a1==mx)cout << a1 <<endl << sx-1 << " " <<sy ;
else if (a2==mx)cout << a2 <<endl << sx+1 << " " <<sy ;
else if (a3==mx)cout << a3 <<endl << sx << " " <<sy+1 ;
else if (a4==mx)cout << a4 <<endl << sx << " " <<sy-1 ;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n , sx , sy ;
cin >> n >> sx >> sy ;
int a1=0 , a2=0 , a3=0 , a4=0 ;
for (int i = 0 ; i < n ; i++){
    long long x , y ;
    cin >> x >> y ;
    if (x<sx)a1++;
    if (x>sx)a2++;
    if (y>sy)a3++;
    if (y<sy)a4++;
}
int mx = max(a1,max(a2,max(a3,a4)));
if (a1==mx)cout << a1 <<endl << sx-1 << " " <<sy ;
else if (a2==mx)cout << a2 <<endl << sx+1 << " " <<sy ;
else if (a3==mx)cout << a3 <<endl << sx << " " <<sy+1 ;
else if (a4==mx)cout << a4 <<endl << sx << " " <<sy-1 ;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n , sx , sy ;
cin >> n >> sx >> sy ;
int a1=0 , a2=0 , a3=0 , a4=0 ;
for (int i = 0 ; i < n ; i++){
    long long x , y ;
    cin >> x >> y ;
    if (x<sx)a1++;
    if (x>sx)a2++;
    if (y>sy)a3++;
    if (y<sy)a4++;
}
int mx = max(a1,max(a2,max(a3,a4)));
if (a1==mx)cout << a1 <<endl << sx-1 << " " <<sy ;
else if (a2==mx)cout << a2 <<endl << sx+1 << " " <<sy ;
else if (a3==mx)cout << a3 <<endl << sx << " " <<sy+1 ;
else if (a4==mx)cout << a4 <<endl << sx << " " <<sy-1 ;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n , sx , sy ;
cin >> n >> sx >> sy ;
int a1=0 , a2=0 , a3=0 , a4=0 ;
for (int i = 0 ; i < n ; i++){
    long long x , y ;
    cin >> x >> y ;
    if (x<sx)a1++;
    if (x>sx)a2++;
    if (y>sy)a3++;
    if (y<sy)a4++;
}
int mx = max(a1,max(a2,max(a3,a4)));
if (a1==mx)cout << a1 <<endl << sx-1 << " " <<sy ;
else if (a2==mx)cout << a2 <<endl << sx+1 << " " <<sy ;
else if (a3==mx)cout << a3 <<endl << sx << " " <<sy+1 ;
else if (a4==mx)cout << a4 <<endl << sx << " " <<sy-1 ;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n , sx , sy ;
cin >> n >> sx >> sy ;
int a1=0 , a2=0 , a3=0 , a4=0 ;
for (int i = 0 ; i < n ; i++){
    long long x , y ;
    cin >> x >> y ;
    if (x<sx)a1++;
    if (x>sx)a2++;
    if (y>sy)a3++;
    if (y<sy)a4++;
}
int mx = max(a1,max(a2,max(a3,a4)));
if (a1==mx)cout << a1 <<endl << sx-1 << " " <<sy ;
else if (a2==mx)cout << a2 <<endl << sx+1 << " " <<sy ;
else if (a3==mx)cout << a3 <<endl << sx << " " <<sy+1 ;
else cout << a4 <<endl << sx << " " <<sy-1 ;
}


#include <bits/stdc++.h>
using namespace std;
vector <int> adj[1010];

int main()
{
int n , sx , sy ;
cin >> n >> sx >> sy ;
int a1=0 , a2=0 , a3=0 , a4=0 ;
for (int i = 0 ; i < n ; i++){
    int x , y ;
    cin >> x >> y ;
    if (x<sx)a1++;
    if (x>sx)a2++;
    if (y>sy)a3++;
    if (y<sy)a4++;
}
int mx = max(a1,max(a2,max(a3,a4)));
if (a1==mx)cout << a1 <<endl << sx-1 << " " <<sy ;
else if (a2==mx)cout << a2 <<endl << sx+1 << " " <<sy ;
else if (a2==mx)cout << a3 <<endl << sx << " " <<sy+1 ;
else if (a2==mx)cout << a4 <<endl << sx << " " <<sy-1 ;
}


#include <bits/stdc++.h>
using namespace std;
vector <int> adj[1010];

int main()
{
long long n , sx , sy ;
cin >> n >> sx >> sy ;
int a1=0 , a2=0 , a3=0 , a4=0 ;
for (int i = 0 ; i < n ; i++){
    long long x , y ;
    cin >> x >> y ;
    if (x<sx)a1++;
    if (x>sx)a2++;
    if (y>sy)a3++;
    if (y<sy)a4++;
}
int mx = max(a1,max(a2,max(a3,a4)));
if (a1==mx)cout << a1 <<endl << sx-1 << " " <<sy ;
else if (a2==mx)cout << a2 <<endl << sx+1 << " " <<sy ;
else if (a2==mx)cout << a3 <<endl << sx << " " <<sy+1 ;
else if (a2==mx)cout << a4 <<endl << sx << " " <<sy-1 ;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n , sx , sy ;
cin >> n >> sx >> sy ;
int a1=0 , a2=0 , a3=0 , a4=0 ;
for (int i = 0 ; i < n ; i++){
    long long x , y ;
    cin >> x >> y ;
    if (x<sx)a1++;
    if (x>sx)a2++;
    if (y>sy)a3++;
    if (y<sy)a4++;
}
int mx = max(a1,max(a2,max(a3,a4)));
if (a1==mx)cout << a1 <<endl << sx-1 << " " <<sy ;
else if (a2==mx)cout << a2 <<endl << sx+1 << " " <<sy ;
else if (a3==mx)cout << a3 <<endl << sx << " " <<sy+1 ;
else cout << a4 <<endl << sx << " " <<sy-1 ;
}


#include <bits/stdc++.h>
using namespace std;
vector <int> adj[1010];

int main()
{
long long n , sx , sy ;
cin >> n >> sx >> sy ;
int a1=0 , a2=0 , a3=0 , a4=0 ;
for (int i = 0 ; i < n ; i++){
    int x , y ;
    cin >> x >> y ;
    if (x<sx)a1++;
    if (x>sx)a2++;
    if (y>sy)a3++;
    if (y<sy)a4++;
}
int mx = max(a1,max(a2,max(a3,a4)));
if (a1==mx)cout << a1 <<endl << sx-1 << " " <<sy ;
else if (a2==mx)cout << a2 <<endl << sx+1 << " " <<sy ;
else if (a2==mx)cout << a3 <<endl << sx << " " <<sy+1 ;
else if (a2==mx)cout << a4 <<endl << sx << " " <<sy-1 ;
}


/**
 *    author:  N_O_E_l
 *
**/
#include <bits/stdc++.h>

using namespace std;

#define fRead(x) freopen(x, "r", stdin);
#define fWrite(x) freopen(x, "w", stdout);

#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define vll vector<long long>
#define si set<int>
#define sll set<long long>
#define pb push_back
#define pop pob_back()
#define eb emplace_back
#define PI acos(-1.0)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<long, long>
#define Min(a, b, c)  min(a, min(b, c))
#define all(x) x.begin(), x.end()
#define aall(x, n) x, x+n
#define debug(x) cout << #x << ' ' << x << endl;
#define fast_input ios_base :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

/** -------------------------------- TEMPLATE---------------------------------- **/

void solve(void)
{
	int n;

	cin >> n;

	int s1, s2;

	cin >> s1 >> s2;

	int right = 0, left = 0, up = 0, down = 0;

	int x, y;

	while(n--)
	{
		cin >> x >> y;

		if(x == s1){
			if(y<s2) down++;
			else up++;
		}
		else if(y == s2)
		{
			if(x>s1) right++;
			else left++;
		}
		else
		{
			if(x>s1) right++;
			else left++;
		}
	}

	int mx = max(right, max(left, max(up, down)));
	if(mx == right)
	{
		cout << right << '\n';
		cout << s1+1 << ' ' << s2 << '\n';
	}else if(mx == left)
	{
		cout << left << '\n';
		cout << s1-1 << ' ' << s2 << '\n';
	}
	else if(mx == up)
	{
		cout << up << '\n';
		cout << s1 << ' ' << s2+1 << '\n';
	}
	else
	{
		cout << down << '\n';
		cout << s1<< ' ' << s2-1 << '\n';
	}
}

int main(void)
{
	fast_input

    solve();
	return 0;
}


/**
 *    author:  N_O_E_l
 *
**/
#include <bits/stdc++.h>

using namespace std;

#define fRead(x) freopen(x, "r", stdin);
#define fWrite(x) freopen(x, "w", stdout);

#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define vll vector<long long>
#define si set<int>
#define sll set<long long>
#define pb push_back
#define pop pob_back()
#define eb emplace_back
#define PI acos(-1.0)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<long, long>
#define Min(a, b, c)  min(a, min(b, c))
#define all(x) x.begin(), x.end()
#define aall(x, n) x, x+n
#define debug(x) cout << #x << ' ' << x << endl;
#define fast_input ios_base :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

/** -------------------------------- TEMPLATE---------------------------------- **/

void solve(void)
{
	ll n;

	cin >> n;

	ll s1, s2;

	cin >> s1 >> s2;

	ll right = 0, left = 0, up = 0, down = 0;

	ll x, y;

	while(n--)
	{
		cin >> x >> y;

		if(x == s1){
			if(y<s2) down++;
			else up++;
		}
		else if(y == s2)
		{
			if(x>s1) right++;
			else left++;
		}
		else
		{
			if(x>s1) right++;
			else left++;
		}

	}

	ll mx = max(right, max(left, max(up, down)));
	if(mx == right)
	{
		cout << right << '\n';
		cout << s1+1 << ' ' << s2 << '\n';
	}else if(mx == left)
	{
		cout << left << '\n';
		cout << s1-1 << ' ' << s2 << '\n';
	}
	else if(mx == up)
	{
		cout << up << '\n';
		cout << s1 << ' ' << s2+1 << '\n';
	}
	else
	{
		cout << down << '\n';
		cout << s1<< ' ' << s2-1 << '\n';
	}
}

int main(void)
{
	fast_input

    solve();
	return 0;
}

/*

..........................
..#.......................
..........................
..........................
..#.....#.................
..........................
..........................
..#.......................
..........................
..........................
..........................

*/


/**
 *    author:  N_O_E_l
 *
**/
#include <bits/stdc++.h>

using namespace std;

#define fRead(x) freopen(x, "r", stdin);
#define fWrite(x) freopen(x, "w", stdout);

#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define vll vector<long long>
#define si set<int>
#define sll set<long long>
#define pb push_back
#define pop pob_back()
#define eb emplace_back
#define PI acos(-1.0)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<long, long>
#define Min(a, b, c)  min(a, min(b, c))
#define all(x) x.begin(), x.end()
#define aall(x, n) x, x+n
#define debug(x) cout << #x << ' ' << x << endl;
#define fast_input ios_base :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

/** -------------------------------- TEMPLATE---------------------------------- **/

void solve(void)
{
	ll n;

	cin >> n;

	ll s1, s2;

	cin >> s1 >> s2;

	ll right = 0, left = 0, up = 0, down = 0;

	ll x, y;

	while(n--)
	{
		cin >> x >> y;

		if(x == s1){
			if(y<s2) down++;
			else up++;
		}
		else if(y == s2)
		{
			if(x>s1) right++;
			else left++;
		}
		else
		{
			if(x>s1)
			{
				right++;
				if(y>s2) up++;
				else down++;
			}
			else
			{
				left++;
				if(y>s2) up++;
				else down++;
			}
		}

	}

	ll mx = max(right, max(left, max(up, down)));
	if(mx == right)
	{
		cout << right << '\n';
		cout << s1+1 << ' ' << s2 << '\n';
	}else if(mx == left)
	{
		cout << left << '\n';
		cout << s1-1 << ' ' << s2 << '\n';
	}
	else if(mx == up)
	{
		cout << up << '\n';
		cout << s1 << ' ' << s2+1 << '\n';
	}
	else
	{
		cout << down << '\n';
		cout << s1<< ' ' << s2-1 << '\n';
	}
}

int main(void)
{
	fast_input

    solve();
	return 0;
}

/*

..........................
..#.......................
..........................
..........................
..#.....#.................
..........................
..........................
..#.......................
..........................
..........................
..........................

*/


/**
 *    author:  N_O_E_l
 *
**/
#include <bits/stdc++.h>

using namespace std;

#define fRead(x) freopen(x, "r", stdin);
#define fWrite(x) freopen(x, "w", stdout);

#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define vll vector<long long>
#define si set<int>
#define sll set<long long>
#define pb push_back
#define pop pob_back()
#define eb emplace_back
#define PI acos(-1.0)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<long, long>
#define Min(a, b, c)  min(a, min(b, c))
#define all(x) x.begin(), x.end()
#define aall(x, n) x, x+n
#define debug(x) cout << #x << ' ' << x << endl;
#define fast_input ios_base :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

/** -------------------------------- TEMPLATE---------------------------------- **/

void solve(void)
{
	int n;

	cin >> n;

	int s1, s2;

	cin >> s1 >> s2;

	int right = 0, left = 0, up = 0, down = 0;

	int x, y;

	while(n--)
	{
		cin >> x >> y;

		if(s1 == 0 || s2 == 0)
		{
			if(s1 == 0 && s2 == 0)
			{
				if(x == s1) up++;
				else right++;
			}
			else if(s1 == 0)
			{
				if(x == s1)
				{
					if(y>s2) up++;
					else down++;
				}
				else right++;
			}
			else
			{
				if(y == s2)
				{
					if(x>s1) right++;
					else if(x<s1)left++;
					else up++;
				}
			}
		}

		else
		{
			if(x == s1){
				if(y<s2) down++;
				else up++;
			}
			else if(y == s2)
			{
				if(x>s1) right++;
				else left++;
			}
			else
			{
				if(x>s1) right++;
				else left++;
			}
		}
	}

	int mx = max(right, max(left, max(up, down)));
	if(mx == right)
	{
		cout << right << '\n';
		cout << s1+1 << ' ' << s2 << '\n';
	}else if(mx == left)
	{
		cout << left << '\n';
		cout << s1-1 << ' ' << s2 << '\n';
	}
	else if(mx == up)
	{
		cout << up << '\n';
		cout << s1 << ' ' << s2+1 << '\n';
	}
	else
	{
		cout << down << '\n';
		cout << s1<< ' ' << s2-1 << '\n';
	}
}

int main(void)
{
	fast_input

    solve();
	return 0;
}

/*

..........................
..#.......................
..........................
..........................
..#.....#.................
..........................
..........................
..#.......................
..........................
..........................
..........................

*/


// CODE by Kazhybay Askar

//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>

using namespace std;
//using namespace __gnu_pbds;

//#pragma comment(linker, "/stack:200000000")
//#pragma GCC    optimize("Ofast")
//#pragma GCC    target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define iter   set<int>::iterator
#define f      first
#define s      second
#define pb     push_back
#define pf     push_front
#define ppb    pop_back
#define ppf    pop_front
#define mp     make_pair
#define cont   continue
#define Speed  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define sz     size()
#define all(x) x.begin(),x.end()
#define cont   continue
#define r0     return 0
#define endl   '\n'

typedef long long ll;
typedef long double   ld;
typedef pair<ll,ll>   pll;
typedef pair<int,int> pii;
typedef pair<char,char> pcc;

const int MAXN  = 5e5  + 7;
const int MOD   = 1e9  + 7;
const int INF   = 1e9  + 7;
const ll  MINF  = 1e18 + 7;
const int EPS   = 1e-6;
const int dx[]  = {0, 0, 1, -1, -1, -1, 1, 1};
const int dy[]  = {1, -1, 0, 0, -1, 1, -1, 1};
const double pi = acos(-1.0);

void freopen(){
    freopen("A.in","r",stdin);
    freopen("A.out","w",stdout);
}
ll n,sx,sy;
ll l,r,u,d;

void solve(){
    cin>>n;
        ll a,b;
    cin>>sx>>sy;
    for(int i=1;i<=n;i++){
        cin>>a>>b;
        if(a<sx)l++;
        if(a>sx)r++;
        if(b<sy)u++;
        if(b>sy)d++;
    }
    //cout<<d<<" "<<u<<" "<<l<<" "<<r<<endl;
    ll mx=max(d,max(u,max(l,r)));
    if(mx==d){
        cout<<d<<endl;
        cout<<sx<<" "<<sy+1;
    }
    else if(mx==u){
        cout<<u<<endl;
        cout<<sx<<" "<<sy-1;
    }
    else if(mx==l){
        cout<<l<<endl;
        cout<<sx-1<<" "<<sy;
    }
    else if(mx==l){
        cout<<r<<endl;
        cout<<sx+1<<" "<<sy;
    }
}

int main(){
    Speed;
    ll T=1;
    //cin>>T;
    while(T--){
        solve();
    }
    r0;
}


// CODE by Kazhybay Askar

//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>

using namespace std;
//using namespace __gnu_pbds;

//#pragma comment(linker, "/stack:200000000")
//#pragma GCC    optimize("Ofast")
//#pragma GCC    target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define iter   set<int>::iterator
#define f      first
#define s      second
#define pb     push_back
#define pf     push_front
#define ppb    pop_back
#define ppf    pop_front
#define mp     make_pair
#define cont   continue
#define Speed  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define sz     size()
#define all(x) x.begin(),x.end()
#define cont   continue
#define r0     return 0
#define endl   '\n'

typedef long long ll;
typedef long double   ld;
typedef pair<ll,ll>   pll;
typedef pair<int,int> pii;
typedef pair<char,char> pcc;

const int MAXN  = 5e5  + 7;
const int MOD   = 1e9  + 7;
const int INF   = 1e9  + 7;
const ll  MINF  = 1e18 + 7;
const int EPS   = 1e-6;
const int dx[]  = {0, 0, 1, -1, -1, -1, 1, 1};
const int dy[]  = {1, -1, 0, 0, -1, 1, -1, 1};
const double pi = acos(-1.0);

void freopen(){
    freopen("A.in","r",stdin);
    freopen("A.out","w",stdout);
}
ll n,sx,sy;
ll l,r,u,d;

void solve(){
    cin>>n;
        ll a,b;
    cin>>sx>>sy;
    for(int i=1;i<=n;i++){
        cin>>a>>b;
        if(a<sx)l++;
        if(a>sx)r++;
        if(b<sy)u++;
        if(b>sy)d++;
    }
    cout<<d<<" "<<u<<" "<<l<<" "<<r<<endl;
    ll mx=max(d,max(u,max(l,r)));
    if(mx==d){
        cout<<d<<endl;
        cout<<sx<<" "<<sy+1;
    }
    else if(mx==u){
        cout<<u<<endl;
        cout<<sx<<" "<<sy-1;
    }
    else if(mx==l){
        cout<<l<<endl;
        cout<<sx-1<<" "<<sy;
    }
    else if(mx==l){
        cout<<r<<endl;
        cout<<sx+1<<" "<<sy;
    }
}

int main(){
    Speed;
    ll T=1;
    //cin>>T;
    while(T--){
        solve();
    }
    r0;
}