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 xx[5] = {0, 0, -1, 1};
int yy[5] = {-1, 1, 0, 0};
bool check(int x1, int y1, int x2, int y2, int x3, int y3) {
  int ch = 0;
  if (x1 <= x2 && x2 <= x3 || x1 >= x2 && x2 >= x3) ch++;
  if (y1 <= y2 && y2 <= y3 || y1 >= y2 && y2 >= y3) ch++;
  return (ch == 2);
}
int pd[5];
int main() {
  int n, sx, sy;
  cin >> n >> sx >> sy;
  for (int i = 1; i <= n; i++) {
    int x, y;
    cin >> x >> y;
    for (int j = 0; j < 4; j++) {
      int nx = sx + xx[j];
      int ny = sy + yy[j];
      if (check(sx, sy, nx, ny, x, y) == 1) {
        pd[j]++;
      }
    }
  }
  int anx, any, mx = 0;
  for (int i = 0; i < 4; i++) {
    if (pd[i] > mx) {
      mx = pd[i];
      anx = sx + xx[i];
      any = sy + yy[i];
    }
  }
  cout << mx << endl << anx << ' ' << any;
  return 0;
}
