1 1000000000 7
1000000000 9
 3 2 2
2 4
2 1
3 6
 2 1000000000 100000
1000000000 1000000
1000000000 10000
 1 100 100
50 70
 1 100 100
101 100

1
1000000000 8 2
2 3 1
1000000000 100001 1
99 100 1
101 100
/*input
3 100 100
0 0
0 0
100 200
*/

// Nihesh Anderson - knandy

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

using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> ordered_set; // find_by_order, order_of_key
ll MOD=1000000007;

#define endl '\n'
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define pb push_back
ll INF = 2000000000000000001;
long double EPS = 1e-9;
ll power(ll a, ll n, ll md){if(n==0){return 1;}else{int res=power(a,n/2,md);res=(res*res)%md;if(n%2!=0){res=(res*a)%md;}return res;}}
random_device rndm;
mt19937 grndm(rndm());
void mix(int* a, int* b){shuffle(a,b,grndm);}

int main(){
	fast_cin();
	// freopen("input.in","r",stdin);
	// freopen("output.out","w",stdout);
	map<pair<int, int>, int> f;
	int n, x, y; cin >> n >> x >> y;
	vector<pair<int, int> > v(n);
	for(int i = 0; i < n; i++) {
		cin >> v[i].first >> v[i].second;
		int q1 = 1, q2 = 1;
		if(v[i].first < x) {
			q1 = -1;
		}
		if(v[i].second < y) {
			q2 = -1;
		}
		f[{q1, q2}]++;
	}
	pair<int, pair<int, int> > best;
	best = max(best, {f[{-1, 1}] + f[{-1, -1}], {-1, 0}});
	best = max(best, {f[{-1, 1}] + f[{1, 1}], {0, 1}});
	best = max(best, {f[{1, 1}] + f[{1, -1}], {1, 0}});
	best = max(best, {f[{-1, -1}] + f[{1, -1}], {0, -1}});
	cout << best.first << endl;
	cout << x + best.second.first << " " << y + best.second.second << endl;
	return 0;
}