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 N = 1e6 + 10;
int dir[4][2] = {1, 0, -1, 0, 0, 1, 0, -1};
struct node {
  int x, y;
} a[N];
int main() {
  int n, x, y;
  cin >> n >> x >> y;
  for (int i = 1; i <= n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    a[i].x = u;
    a[i].y = v;
  }
  node ans;
  ans.x = x, ans.y = y;
  int tot = 0;
  for (int i = 0; i < 4; i++) {
    int cnt = 0;
    int xx = x + dir[i][0];
    int yy = y + dir[i][1];
    for (int j = 1; j <= n; j++) {
      if (i == 0 && a[j].x >= xx) cnt++;
      if (i == 1 && a[j].x <= xx) cnt++;
      if (i == 2 && a[j].y >= yy) cnt++;
      if (i == 3 && a[j].y <= yy) cnt++;
    }
    if (cnt > tot) tot = cnt, ans.x = xx, ans.y = yy;
  }
  cout << tot << endl;
  cout << ans.x << " " << ans.y << endl;
  return 0;
}
