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 x, y, a, b;
int cnt1 = 0, cnt2 = 0, cnt3 = 0, cnt4 = 0, n;
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x, &y);
    if (x < a) cnt1++;
    if (x > a) cnt2++;
    if (y < b) cnt3++;
    if (y > b) cnt4++;
  }
  if (cnt1 > cnt2 && cnt1 > cnt3 && cnt1 > cnt4)
    return printf("%d\n%d %d", cnt1, a - 1, b) & 0;
  if (cnt2 > cnt3 && cnt2 > cnt4)
    return printf("%d\n%d %d", cnt2, a + 1, b) & 0;
  if (cnt3 > cnt4) return printf("%d\n%d %d", cnt3, a, b - 1) & 0;
  printf("%d\n%d %d", cnt4, a, b + 1);
}
