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 a, b, c, d, num1, num2, sum1, sum2, n;
int main() {
  a = 0, b = 0, c = 0, d = 0;
  scanf("%d%d%d", &n, &num1, &sum1);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &num2, &sum2);
    if (num2 > num1) {
      d++;
    }
    if (sum2 > sum1) {
      a++;
    }
    if (num1 > num2) {
      c++;
    }
    if (sum2 < sum2) {
      b++;
    }
  }
  bool vis = false;
  int maxx = max(max(a, b), max(c, d));
  if (maxx == a && !vis) {
    printf("%d\n", maxx);
    printf("%d %d\n", num1, (sum1 + 1));
    vis = true;
  }
  if (maxx == b && !vis) {
    printf("%d\n", maxx);
    printf("%d %d\n", num1, (sum1 - 1));
    vis = true;
  }
  if (maxx == c && !vis) {
    printf("%d\n", maxx);
    printf("%d %d\n", num1 - 1, (sum1));
    vis = true;
  }
  if (maxx == d && !vis) {
    printf("%d\n", maxx);
    printf("%d %d\n", num1 + 1, (sum1));
    vis = true;
  }
}
