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;
const int go[4][2] = {0, 1, 1, 0, 0, -1, -1, 0};
int n, sx, sy;
int cnt[11];
int main() {
  scanf("%d%d%d", &n, &sx, &sy);
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x -= sx;
    y -= sy;
    if (y > 0) cnt[0]++;
    if (x > 0) cnt[1]++;
    if (y < 0) cnt[2]++;
    if (x < 0) cnt[3]++;
  }
  int ans = 0;
  for (int i = 1; i < 4; i++)
    if (cnt[i] > cnt[ans]) ans = i;
  printf("%d\n", cnt[ans]);
  printf("%d %d\n", sx + go[ans][0], sy + go[ans][1]);
  return 0;
}
