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;
long long mod = 1e9 + 7;
const int N = 2e5 + 5;
const double pi = acos(-1);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, sx, sy, x, y, r = 0, l = 0, u = 0, d = 0;
  cin >> n >> sx >> sy;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (sx - x < 0) r++;
    if (sx - x > 0) l++;
    if (sy - y < 0) u++;
    if (sy - y > 0) d++;
  }
  int mx = max(max(l, r), max(u, d));
  if (mx == l && sx != 0)
    cout << l << endl << sx - 1 << ' ' << sy << endl;
  else if (mx == r && sx != 1e9)
    cout << r << endl << sx + 1 << ' ' << sy << endl;
  else if (mx == u && sy != 1e9)
    cout << u << endl << sx << " " << sy + 1 << endl;
  else
    cout << d << endl << sx << ' ' << sy - 1 << endl;
}
