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 n, sx, sy, cnt[4];
vector<pair<int, int> > o;
int main() {
  scanf("%d %d %d", &n, &sx, &sy);
  for (int i = 1; i <= n; i++) {
    int a, b;
    scanf(" %d %d", &a, &b);
    a -= sx, b -= sy;
    if (b > 0) cnt[0]++;
    if (b < 0) cnt[1]++;
    if (a < 0) cnt[2]++;
    if (a > 0) cnt[3]++;
  }
  printf("%d\n", *max_element(cnt, cnt + 4));
  for (int i = 0; i < 4; i++) o.push_back(make_pair(cnt[i], i));
  sort(o.begin(), o.end(), greater<pair<int, int> >());
  if (o[0].second == 0)
    printf("0 1\n");
  else if (o[0].second == 1)
    printf("0 -1\n");
  else if (o[0].second == 2)
    printf("-1 0\n");
  else
    printf("1 0\n");
}
