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;
int main() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  int xplus = 0, xminus = 0, yplus = 0, yminus = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    x -= sx;
    y -= sy;
    if (x > 0)
      xplus++;
    else if (x < 0)
      xminus++;
    if (y > 0)
      yplus++;
    else if (y < 0)
      yminus++;
  }
  cout << max(max(max(xplus, yplus), xminus), yminus) << endl;
  if (xplus >= yplus && xplus >= yminus && xplus >= xminus)
    cout << sx + 1 << ' ' << sy;
  else if (xminus >= yplus && xminus >= yminus && xminus >= xplus)
    cout << sx - 1 << ' ' << sy;
  else if (yplus >= xplus && yplus >= yminus && yplus >= xminus)
    cout << sx << ' ' << sy + 1;
  else if (yminus >= yplus && yminus >= xplus && yminus >= xminus)
    cout << sx << ' ' << sy - 1;
}
