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 inf = 0x3f3f3f3f;
class ss {
 public:
  int x, y;
  int num = 0;
} cnt[5];
bool comp(ss s1, ss s2) { return s1.num > s2.num; }
int main() {
  memset(cnt, 0, sizeof cnt);
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, stx, sty;
  cin >> n >> stx >> sty;
  cnt[0].y = cnt[1].y = sty;
  cnt[0].x = stx - 1;
  cnt[1].x = stx + 1;
  cnt[2].x = cnt[3].x = stx;
  cnt[2].x = sty - 1;
  cnt[3].x = sty + 1;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x < stx) cnt[0].num++;
    if (x > stx) cnt[1].num++;
    if (y < sty) cnt[2].num++;
    if (y > sty) cnt[3].num++;
  }
  sort(cnt, cnt + 4, comp);
  cout << cnt[0].num << "\n" << cnt[0].x << " " << cnt[0].y << "\n";
  return 0;
}
