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>
using namespace std;
string st, st1;
map<long long, pair<long long, long long> > mp;
long long i, j, k, l, m, n, a, b, c, mid, hi, lo, x, y;
int main() {
  cin >> k >> x >> y;
  a = 0;
  long long a1 = 0, a2 = 0, a3 = 0, a4 = 0, x1, y1;
  while (k--) {
    cin >> x1 >> y1;
    if (x < x1) a1++;
    if (y < y1) a2++;
    if (x > x1) a3++;
    if (y > y1) a4++;
  }
  mp[a1] = {x + 1, y};
  mp[a2] = {x, y + 1};
  mp[a3] = {x - 1, y};
  mp[a4] = {x, y - 1};
  map<long long, pair<long long, long long> >::iterator it = mp.end();
  it--;
  cout << it->first << endl;
  cout << it->second.first << ' ' << it->second.second;
}
