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 = 1e5 + 10;
void solve() {
  long long int n, sx, sy, x, y;
  cin >> n >> sx >> sy;
  vector<long long int> dx = {-1, 1, 0, 0};
  vector<long long int> dy = {0, 0, 1, -1};
  vector<long long int> ans(4);
  for (long long int i = 0; i < n; i++) {
    cin >> x >> y;
    long long int dist = abs(sx - x) + abs(sy - y);
    for (long long int j = 0; j < 4; j++) {
      long long int xx, yy;
      xx = sx + dx[j];
      yy = sy + dy[j];
      if (abs(xx - sx) + abs(xx - x) + abs(yy - y) + abs(yy - sy) == dist)
        ans[j]++;
    }
  }
  long long int j = 0;
  for (long long int i = 0; i < 4; i++)
    if (ans[i] > ans[j]) j = i;
  cout << ans[j] << endl;
  cout << sx + dx[j] << " " << sy + dy[j] << endl;
}
void debug(long long int tt) {}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
}
