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
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
#define IO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
 
using namespace std;
using namespace __gnu_pbds;
 
template<typename key> using ordered_set = tree <key, null_type, less<key>, rb_tree_tag, tree_order_statistics_node_update>;
 
int n, x, y; 
 
int main () {
   IO;
   cin >> n >> x >> y;
   int le=0, mo=0;
   vector<pair<int, int> > vru, vrd, vlu, vld, vr, vl;
   for(int i = 0; i < n; i++) {
	  int a, b;
	  cin >> a >> b;
	  if(a > x)
		 vr.push_back({a,b});
	  else if(a < x)
		 vl.push_back({a,b});
	  if(a == x) {
		 vr.push_back({a,b});
		 vl.push_back({a,b});
	  }
   }
   if(vr.size() >= vl.size()) {
	  cout << vr.size() << endl << x + 1 << " " << y;
   
   }
   else
	  cout << vl.size() << endl << x - 1 << " " << y;
   return 0;
}