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>
int main() {
  int n, sx, sy;
  scanf("%d %d %d", &n, &sx, &sy);
  int x, y;
  int path[4] = {0};
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &x, &y);
    if (x > sx) {
      path[1]++;
      if (y > sy) path[0]++;
      if (y < sy) path[2]++;
    }
    if (x < sx) {
      path[3]++;
      if (y > sy) path[0]++;
      if (y < sy) path[2]++;
    }
    if (x == sx) {
      if (y > sy)
        path[0]++;
      else
        path[2]++;
    }
  }
  int pos;
  if (path[0] > path[1]) {
    if (path[2] > path[3]) {
      if (path[0] > path[2])
        pos = 0;
      else
        pos = 2;
    } else {
      if (path[0] > path[3])
        pos = 0;
      else
        pos = 3;
    }
  } else {
    if (path[2] > path[3]) {
      if (path[1] > path[2])
        pos = 1;
      else
        pos = 2;
    } else {
      if (path[1] > path[3])
        pos = 1;
      else
        pos = 3;
    }
  }
  printf("%d\n", path[pos]);
  x = sx + round(sin(3.1415926 * pos / 2));
  y = sy + round(cos(3.1415926 * pos / 2));
  printf("%d %d", x, y);
}
