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 maxn = (int)2e5 + 100;
const int mod = (int)1e9 + 7;
int n, sx, sy;
int main() {
  scanf("%d%d%d", &n, &sx, &sy);
  int a = 0, b = 0, c = 0, d = 0;
  for (int i = (1); i <= (n); ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (x <= sx - 1) a++;
    if (x >= sx + 1) c++;
    if (y >= sy + 1) b++;
    if (y <= sy - 1) d++;
  }
  int ans = max({a, b, c, d});
  printf("%d\n", ans);
  if (ans == a)
    puts("-1 0");
  else if (ans == b)
    puts("0 1");
  else if (ans == c)
    puts("1 0");
  else
    puts("0 -1");
}
