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;
inline int Get() {
  char c;
  bool o = false;
  while (!isdigit(c = getchar()))
    if (c == '-') o = true;
  int x = c - '0';
  while (isdigit(c = getchar())) x = x * 10 + c - '0';
  return o ? -x : x;
}
int ans[4];
int main() {
  int n = Get();
  int sx = Get(), sy = Get();
  for (int i = 1; i <= n; ++i) {
    int x = Get(), y = Get();
    if (y > sy) ++ans[0];
    if (y < sy) ++ans[1];
    if (x < sx) ++ans[2];
    if (x > sy) ++ans[3];
  }
  int k = 0;
  for (int i = 0; i < 4; ++i)
    if (ans[i] > ans[k]) k = i;
  printf("%d\n", ans[k]);
  if (k == 0) printf("%d %d\n", sx, sy + 1);
  if (k == 1) printf("%d %d\n", sx, sy - 1);
  if (k == 2) printf("%d %d\n", sx + 1, sy);
  if (k == 3) printf("%d %d\n", sx - 1, sy);
}
